Some simple scripts aim to make blog synchronization and notes management easier.
- blogSync: a script which makes blog sychronization steps of hexo easier
- doctree: just a simple script containing 'tree ~/Documents'
- notevim: a shell script to manage notes
- Put these file in the same filefold(use
~/bin/
as example). - Add commands below to your
~/.profile
(change the path if needed)
export PATH=$PATH:~/bin/blogSync
export PATH=$PATH:~/bin/doctree
export PATH=$PATH:~/bin/notevim
- To use
doctree
, just execute the commanddoctree
- To use
blogSync
,cd
to the hexo blog filefold and just execute the commandblogSync
- To use
notevim
, which is the most complex one in this repository though it is simple for many 'linuxers', there are more steps:- Add the note name and its dir path to the
notevimFileDir.json
. Here is an example.{ "notename1":"path1", "notename2":"path2" }
- Now you can edit the note by vim using
notevim -n notename1
instead of typing the full command of vim, which requires the full dir path. And usenotevim -l
to show all the notes defined innotevimFileDir
. - There is an additional feature for hexo blog(or you can make it custom by edit the source codes, which are annotated in detail).Use
notevim -u notename1
to synchronize the note1 in the original place and note1 in the hexo filefold,which will remove the older one and copy the other one to corresponding place.Before Using it, you need to add the hexo filefold path to thenotevimFileDir.json
, using the nameBlogDir
:{ "BlogDir":"path" }
- Add the note name and its dir path to the
They are just some exercise scripts used to practice the varibles sharement between scripts, may the fun be with you.