Fetching contributors…
Cannot retrieve contributors at this time
60 lines (45 sloc) 2.43 KB

## Time-stamp: <2011-12-27 18:11:19 armin> ## This file is best viewed with GNU Emacs Org-mode:


Data Source

Version control systems are quite common to manage all kinds of data with. git is a modern distributed system that has an enormous feature set. parses the output of:

git rev-list --all --pretty=raw

If an outfile is specified, only new commits are appended.

Example Invocation

Example with rev-list file:

git rev-list --all --pretty=raw > /tmp/file
./ -f /tmp/file -o /path/to/git-project.org_archive

Example Crontab Entry

Every 60 minutes try to fetch something new from git repository and parse the output

*/60   *   *   *  *    /home/user/bin/ || cd "/home/user/git/Memacs" && git fetch && git rev-list --all --pretty=raw | $MEMACS_DIR/versioning_systems/ -o $ORG_DIR/git-memacs.org_archive

.gitconfig - alias

For easily adding a crontab entry, you can modify your .gitconfig and add an alias like memacs-add-crontab to the [alias] section.

It could look like this: (adjust the paths!)

	memacs-add-crontab = "! crontab -l > /tmp/crontab &&  echo \"*/60   *   *   *  *    /home/user/bin/ || cd \"$(git rev-parse --show-toplevel)\" && git fetch && git rev-list --all --pretty=raw | /path/to/memacs/versioning_systems/ -o ~/orgmode/memacs/git-$(basename $(git rev-parse --show-toplevel)).org_archive\n\" >> /tmp/crontab && crontab /tmp/crontab && rm /tmp/crontab"

filter by username

use option

./ <...> -g "Forename Lastname"


./ <...> --grep-user "Forename Lastname"

Example Orgmode entries

Whenever user “Bob” commits a change set to an example project, memacs_git can provide an entry like this:

* Memacs for git files           :Memacs:git:
** Bob Bobman: added utf-8 support for stdin
  :COMMIT:        5503912cde8ac94346a7c78583e2e6a6b9163582
  :TREE:          845f83f4678963bad0504ce73161312c60de4d2f
  :PARENT:        652601b94e640ea1225c415e603a6c8374219dd1
  :AUTHOR:        Bob Bobman <> 1324463332 +0100
  :CREATED:       <2011-12-21 Wed 11:28:52>
  :COMMITTER:     Bob Bobman <> 1324463332 +0100