Welcome to the README of gifc.
gi-f-c : Gists from command-line
This is a nifty little tool written in Python to work with GitHub Gists from command line.
chmod +x gifc
- Make a
gist_config.yml
file and enter your secure token and user_id as -
TOKEN: xxxxx
USER_ID: yyyyy
- Use it from cli as
./gifc <options> <flags>
- Or add it to PATH to call it as
gifc <options> <flags>
NOTE
Currently there is no way it can access your gist_config.yml
file if you take the script inside bin
. This feature will be added later on. So right now use it like Step 2
./gifc -h
./gifc get 5
- Create interactively from an editor like nano, vim or gedit
./gifc create create.md -d "How to create a gist from cli" -i nano
- Directly enter contents from cli
./gifc create create.md -d "How to create a gist from cli" -m '''If you want to create a gist from an existing file then you do the following- `./gifc -c create.md -e "How to create a gist from cli" -i file.md`'''
- Take the contents from a file
./gifc create create.md -d "How to create a gist from cli" -f file.md
-
Change description
./gifc update ffd2f4a482684f56bf33c8726cc6ae63 -cd "New description"
You can get the gist id from theget
method from earlier
-
Edit contents of a file interactively in an editor like nano, vim or gedit
./gifc update ffd2f4a482684f56bf33c8726cc6ae63 -f file_to_update.md
-
Do both
./gifc -u ffd2f4a482684f56bf33c8726cc6ae63 -f file_to_update.md -cd "New description"
./gifc remove ffd2f4a482684f56bf33c8726cc6ae63 -r file1.md script.py readme.txt
You can get the gist id from the get
method from earlier
./gifc delete ffd2f4a482684f56bf33c8726cc6ae63
You can get the gist id from the get
method from earlier