A command-line tool that automatically uploads images from the markdown document to the GitHub repo and replaces the paths with the returned URL.
A command-line tool that automatically uploads images from the markdown document to the GitHub repo and replaces the paths with the returned URL.
SteveLauC/pup
Pup
A command-line tool that automatically uploads images from the markdown document to the GitHub repo and replaces the paths with the returned URL.
Table of contents
TO DO
Supported platforms
Theoretically, all UNIX platforms should be supported. But only tested on Linux with Gnome Desktop.
Usage and Demo
Getting started
Go to token-settings to generate a new token, make sure it has access to your picture repo.
get the
pup
binaryDouble check you have pup installed
$ which pup /home/$USER/.cargo/bin/pup
init config file
On your first run,
pup
will create a configuration file and complain about the incompleteness of it to you. If you have$XDG_CONFIG_HOME
validly set, then it is located in$XDG_CONFIG_HOME/pup
; Otherwise, it is under$HOME/.config/pup
Then edit it to make it complete.
Make it something like the following one, remeber to replace each field with your own one.
Let's try it again!
Ohhhh, since we haven't entered a token yet, pup asks us to do this.
Set the token: enter the token and press enter to confirm.
All configuration is done! Time to enjoy:)
$ pup your-markdown-file.md # or $ pup image.jpeg/jpg/png/gif
What pup can NOT do
[FAILED]: DuplicateFile
, but pup will tell you[FAILED]: ValidationFaile
.Uninstallation
If you have set TOKEN in pup, use
pup --delete-token
to delete it first.Then:
How it works