Git Pusher

spixi edited this page Oct 15, 2015 · 2 revisions
Clone this wiki locally

Here I show you how to create a small add-on, which provides the functionality to push your edits directly to your git remote repository from Zim.

This requires that you have set up ssh for your git repository, because you would be asked for your user name and password for each commit otherwise, which makes the script interactive and thus unusable. See for reference.

Create the shell script ~/scripts/ with the following content:

# Any copyright is dedicated to the Public Domain.
cd ~/your_zim_folder
git commit -m 'new version'
git push

Make the script executable (chmod +x ~/scripts/

Add a custom tool (Menu->Tools->Custom Tools) and assign the created script to it. For the icon, I recommend /usr/share/icons/gnome/24x24/actions/stock_save.png