Git Product home page Git Product logo

nuko's Introduction

nuko

nuko is a small file uploader to <catbox.moe> and <litterbox.catbox.moe>.

it is also an exercise in learning and writing Zig.

installing

TODO

usage

Note

album creation and management is not implemented yet.

usage: nuko [-h] [-l] [-t {1,12,24,72}] [file, ...]

a small file uploader to [litter.]catbox.moe

positional arguments:
  file                path(s) to file to read

optional arguments:
  -h, --help          show this help message and exit
  -v, --version       show program's version number and exit
  -l, --litterbox     use litterbox.catbox.moe instead of catbox.moe
  -t {1,12,24,72}, --time {1,12,24,72}
                      (for litterbox) how long the file should be kept
  -u USERHASH, --userhash USERHASH
                      (for catbox) specify a userhash for non-anonymous uploads
  -a [SHORT], --album [SHORT]
                      (for catbox) create a new album if short is not specified
                      add an '/edit' '/add' or 'remove' suffix to edit images,
                      add images to and remove images from an already existing
                      album respectively. 
                      when given, files parameter are shorts of files already on
                      catbox.

                      shorts are the short identifiers of catbox files.
                      e.g., the short of 'https://files.catbox.moe/0k6bpc.jpg'
                      is '0k6bpc.jpg'
                      same goes for albums, but without the preceding '.../c/'

examples

Note

the command line parsing in nuko is written from scratch, and as such is not thorough.
chaining of flags such as -lt is not supported.

  1. upload a file to catbox.moe anonymously

    nuko file.webm
    
  2. upload a file to litter.catbox.moe anonymously

    nuko -l file.webm
    
  3. upload a file to litter.catbox.moe anonymously and set an expiration of 24 hours

    nuko -l -t 24 file.webm
    
  4. make an album on catbox.moe with two files

    [!IMPORTANT]
    albums can only be modified if a userhash is given.

    nuko -a -u a_unique_user_hash 7lbgmz.jpg wgg3yb.jpg v7u0xs.jpg
    
  5. remove an image from an album on catbox.moe

    [!NOTE]
    when an album has a modification suffix like /edit, /add and remove, files given to nuko are treated as shorts (shortened versions of a catbox URL) of files already on catbox.

    nuko -a v90wjs/remove -u a_unique_user_hash 7lbgmz.jpg
    

note on album modification suffixes:

  • /edit is used to completely change the contents of an album, the list of shorts given to nuko will be the new contents of the album.

  • /add is used to add files to an album, the list of shorts given to nuko will be added to the album.

  • /remove is used to remove files from an album, the list of shorts given to nuko will be removed from the album.

developing

TODO

licence

nuko is free and unencumbered software released into the public domain. For more information, please refer to http://unlicense.org/ or the UNLICENCE file.

nuko's People

Contributors

markjoshwel avatar

Watchers

 avatar

nuko's Issues

zig 0.12 migrations

  1. std.os has been renamed to std.posix
    as such, as per the release notes nuko will henceforth use std.process.exit

  2. lowercase enum fields

    Zig 0.12.0 takes the opportunity to adjust the field names of some enums in std.builtin to align with our current naming conventions, which dictate that enum fields should be snake_case. The following enums have been updated:

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.