booru-armor

    0.0.15 • Public • Published

    Booru-armor

    npm Node.js CI

    Minimalist library to search Boorus with Tags/spell blocker.
    Save lots of your time to handle a bunch of inappropriate tags w/ One-liners.

    Features

    • Majority booru supported: docs
    • 0 dependencies.
    • Minimalist data received.
    • Arranged and Randomized options.
    • Choose the amount of images to get
    • Easy integration with d.js and eris Pagination.
    • Fully documented and tested i guess.
    • Spellblock.

    Installation

    yarn add booru-armor / npm i booru-armor

    Promise

    In this example, Try to search cat_girl on Gelbooru then
    whenever a images contains a loli or shota tags this wrapper will block 'em.

    const { BooruArmor } = require("booru-armor");
    const search = new BooruArmor();
    
    search.gelbooru({ tags: "cat_girl", limit: 100, pid: 1, block: "loli", shuffle: true })
      .then((res) => console.log(res));

    Async/await

    async function noLoli() {
    	const res = await search.gelbooru({
    		tags: "cat_girl",
    		limit: 25,
    		pid: 2,
    		block: "loli shota",
    		shuffle: true,
    	});
    	console.log(res);
    }
    
    noLoli()

    Returns

    {
      info: '0.76 sec.',
      message: "i've took 16 clean images of the total initial data 25",
      pattern_block: '/loli|shota/',
      clean_image: [
        'https://img3.gelbooru.com/images/91/df/91dff382786887766492e90a3d35ea8f.jpg',
        'https://img3.gelbooru.com/images/5d/5d/5d5d4a532fdbc23ac11d18312c03619c.png',
        'https://img3.gelbooru.com/images/81/6b/816ba1a5682da3f813ffcc9615815b3e.jpg',
        'https://img3.gelbooru.com/images/68/51/6851874e1be69675584a1c25503001f1.jpeg',
        'https://img3.gelbooru.com/images/01/a8/01a853795775c6a787807c0107bb5c21.png',
        'https://img3.gelbooru.com/images/86/aa/86aa9e134633c81965690b7db336f615.png',
        'https://img3.gelbooru.com/images/27/73/2773f91aa92e8565970782553c035d9b.jpg',
        'https://img3.gelbooru.com/images/22/ab/22abe473bc51d50d39b2e76a66004390.jpg',
        'https://img3.gelbooru.com/images/f6/22/f62220e104ae8a43804e5ec80c55fd7e.jpeg',
        'https://img3.gelbooru.com/images/86/21/86216214f86b9933209e9487a5125a3b.jpg',
        'https://img3.gelbooru.com/images/56/e4/56e4910def7ea59e2cfc995475ef07be.jpg',
        'https://img3.gelbooru.com/images/3b/c7/3bc78a0d268a14a40c4fa5a811f07825.png',
        'https://img3.gelbooru.com/images/e7/07/e7071a12976f0496e2646a0ab66b3805.png',
        'https://img3.gelbooru.com/images/b1/94/b1941edb03379519b41df4eb2d0d8f25.jpg',
        'https://img3.gelbooru.com/images/11/69/11691ec2c11c0c78edc0248f6190ebd3.jpg',
        'https://img3.gelbooru.com/images/00/b6/00b6557711fa3e118ef86974f3784d99.jpg'
      ],
      is_shuffle: true,
      from_booru: 'gelbooru'
    }

    Docs

    Documentation

    Useful keys:

    • res.pattern_block Pattern regex to match the image url
    • res.clean_image Array of image urls

    Legal

    This tool can be freely copied, modified, altered, distributed without any attribution whatsoever. However, if you feel like this tool deserves an attribution, mention it. It won't hurt anybody :)

    Please, read the license terms. Don't worry, it can be read in less than 30 seconds, unless you have some sort of reading disability - in that case, I'm wondering why you're still reading this text. Really. Stop. Please. I mean, seriously. Why are you still reading?

    Acknowledgements

    Since this tool includes some contributions, I'll publically thank the following users for their help:

    Install

    npm i booru-armor

    DownloadsWeekly Downloads

    15

    Version

    0.0.15

    License

    MIT

    Unpacked Size

    39.6 kB

    Total Files

    12

    Last publish

    Collaborators

    • sinkaroid