An 0x0.st uploader helper.
Go to file
grym 884408fac2 Add license 2022-12-02 17:23:47 -05:00
tests Simplify project layout, re-add support for python 3.7 2022-12-01 12:08:16 -05:00
.gitignore Drop poetry 2022-02-18 10:20:56 -05:00
.pre-commit-config.yaml Simplify project layout, re-add support for python 3.7 2022-12-01 12:08:16 -05:00
LICENSE Add license 2022-12-02 17:23:47 -05:00
Makefile Simplify project layout, re-add support for python 3.7 2022-12-01 12:08:16 -05:00
README.org Expand help text 2022-12-02 17:05:19 -05:00
oxo.py Enable specification of expiration time 2022-12-02 15:49:23 -05:00
pyproject.toml Simplify project layout, re-add support for python 3.7 2022-12-01 12:08:16 -05:00

README.org

0x0 uploader

This is a very lightweight front-end to the 0x0 pastebin service for slightly easier command line use.

Use

oxo --help
 Usage: oxo [OPTIONS] COMMAND [ARGS]...

 A command line utility for 0x0.st compliant pastebins.
 To use a different 0x0 site, set `OXO_BASE_URL` in your environment, or
 specify it in the relevant subcommand.

╭─ Options ────────────────────────────────────────────────────────────────────╮
│ --version                     Show the version and exit.                     │
│ --install-completion          Install completion for the current shell.      │
│ --show-completion             Show completion for the current shell, to copy │
│                               it or customize the installation.              │
│ --help                        Show this message and exit.                    │
╰──────────────────────────────────────────────────────────────────────────────╯
╭─ Commands ───────────────────────────────────────────────────────────────────╮
│ files              Upload one or more files.                                 │
│ repost             Repost one or more urls.                                  │
│ shorten            Shorten one or more urls.                                 │
╰──────────────────────────────────────────────────────────────────────────────╯
oxo files --help
 Usage: oxo files [OPTIONS] FILES...

 Upload one or more files.

╭─ Arguments ──────────────────────────────────────────────────────────────────╮
│ *    files      FILES...  [default: None] [required]                         │
╰──────────────────────────────────────────────────────────────────────────────╯
╭─ Options ────────────────────────────────────────────────────────────────────╮
│ --expires         INTEGER  Expiration time, in hours or epoch milliseconds   │
│                            [default: None]                                   │
│ --base-url        TEXT     [env var: OXO_BASE_URL] [default: https://0x0.st] │
│ --help                     Show this message and exit.                       │
╰──────────────────────────────────────────────────────────────────────────────╯
oxo repost --help
 Usage: oxo repost [OPTIONS] URLS...

 Repost one or more urls.

╭─ Arguments ──────────────────────────────────────────────────────────────────╮
│ *    urls      URLS...  [default: None] [required]                           │
╰──────────────────────────────────────────────────────────────────────────────╯
╭─ Options ────────────────────────────────────────────────────────────────────╮
│ --base-url        TEXT  [env var: OXO_BASE_URL] [default: https://0x0.st]    │
│ --help                  Show this message and exit.                          │
╰──────────────────────────────────────────────────────────────────────────────╯
oxo shorten --help
 Usage: oxo shorten [OPTIONS] URLS...

 Shorten one or more urls.

╭─ Arguments ──────────────────────────────────────────────────────────────────╮
│ *    urls      URLS...  [default: None] [required]                           │
╰──────────────────────────────────────────────────────────────────────────────╯
╭─ Options ────────────────────────────────────────────────────────────────────╮
│ --base-url        TEXT  [env var: OXO_BASE_URL] [default: https://0x0.st]    │
│ --help                  Show this message and exit.                          │
╰──────────────────────────────────────────────────────────────────────────────╯

Installation

pipx

pipx automates the creation of isolated runtimes for python CLI utilities like oxo. Once pipx is installed, install oxo like so, and it'll be on your $PATH

pipx install git+https://tildegit.org/grym/oxo@master  # or @tag-of-your-choice

pip + venv

If you'd prefer to create or manage your own isolated runtime for oxo, create a venv and install oxo into it:

  python3 -m venv oxovenv #or wherever you want the venv to go
  oxovenv/bin/pip install git+https://tildegit.org/grym/oxo@master  # or @tag-of-your-choice
  ln -s oxovenv/bin/oxo ${HOME}/.local/bin # optionally add to here, or anywhere else on your $PATH

development

If you'd like to set up a development install to edit oxo on your own (to prepare a PR, for example):

  git clone https://tildegit.org/grym/oxo
  cd oxo
  make install