I write scripts everyday, and it's hard to keep them sorted. I wrote this simple tool that allows me to sync them to gist whenever I want. This is nice because I can write script in random places and make sure I never loose it.
For now this only works one-way - me pushing to gist.
sync-gist -f my-script
This script detects a line in your file that stars with #
or //
and contains gist=[id|url]
with optional extra_files=file1,file2
and updates the file in the remote gist matching the file name of the file and optionally syncing other files as well, this is usefull when you script uses external tool, that for example requires an config file.
Requirements:
- zx
- github cli
# my-script
# gist=8ce404348472fc33a5f3534fc1ca568d extra_files=poor.txt
cat poor.txt
# poor.txt
What can I do...