git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andy Parkins <andyparkins@gmail.com>
To: git@vger.kernel.org
Subject: gitblogger
Date: Thu, 20 May 2010 18:29:30 +0100	[thread overview]
Message-ID: <ht3reo$b6i$1@dough.gmane.org> (raw)

Hello,

Just a small announcement of a little project I just published.  Normally I 
wouldn't bother troubling you all, but I thought whoever it was wrote the 
key feature (git-notes) might appreciate knowing it was being used...

I've been wanting for a while to keep my blog in git (in fact I did do so, 
except it was a full ikiwiki installation, but ikiwiki is so slow, and meant 
I had to use my own computer to host my blog).  What I wanted was to have a 
post-receive hook that automatically compiled the markdown-syntax source 
files to HTML articles and posted them to my blogger account.  However, I 
wanted to be able to modify, rename, delete, etc, etc the local files while 
keeping the remote end in sync.

I was motivated to write the necessary script when I noticed that git 1.7 
comes with shiny git-notes support.  This is just what I needed -- when you 
post an article to blogger using the GData API, it gives you back a freshly 
assigned post ID.  That post ID is the only (reliable) way you have of 
keeping track of the link between the remote article and the local file that 
generated it.  My script grabs that ID and uses git-notes to store it 
against the object hash of the original article file.

Then, when you change that article in the repository (git diff-tree is a 
godsend by the way), it's a simply matter of using git-notes again to look 
up the postID and send the appropriate GData command to update that article.

Summary: git-notes... excellent, exactly the tool I needed.

If you write a blog and would prefer git + markdown for maintaining it over 
HTML in a web interface, the repository is at

http://gitorious.org/git_blogger



Andy
-- 
Dr Andy Parkins
andyparkins@gmail.com

             reply	other threads:[~2010-05-20 17:28 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-20 17:29 Andy Parkins [this message]
2010-05-21  2:00 ` gitblogger Ping Yin
2010-05-21  8:57   ` [ot] gitblogger Andy Parkins
2010-05-21 10:24     ` Ping Yin
2010-05-21 15:54   ` gitblogger Jakub Narebski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='ht3reo$b6i$1@dough.gmane.org' \
    --to=andyparkins@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).