At Wed, 13 Oct 2010 10:54:01 +0200,
Guy Wiener wrote:
> Hello everyone,
> I am using org-publish to publish some document on my web page. I would
> really like to add to that some notification of the latest changes - E.g.,
> an RSS of the recently changed headlines. Is there some way to hack that? I
> can use diff and get the textual changes from the latest version, but I
> think that some way to mark the headlines whose content has changed will be
> better.
>
> Any ideas?

For publishing news about changed headlines you might use the
still-prepared-for-inclusion-damn-i-am-late-with-the-documentation Org
to Atom exporter[1].  It uses a property called :atom_updated: that is
used for the atom:updated element which indicates ... an update.

The somewhat tricky part is how to determine whether an entry has
changed or not.  Maybe something like this:

 - define the things that count as a changed entry (e.g. entry title,
   text, scheduled date, keyword)
 - write a function that grabs these things, does some normalization
   (e.g. remove whitespace and control characters, remove text
   properties), concat them together, and calculate a sha1 checksum
   for the resulting string
 - compare this sha1 with the previus sha1 which is stored in a define
   property
 - if the hashes differ, store the new one and update the atom_updated
   property
 - hook this function in the exporter, maybe via
   `org-export-first-hook'

Best,
  -- David

[1] http://ictsoc.de/code/org-atom.html
--
OpenPGP... 0x99ADB83B5A4478E6
Jabber.... dmj...@jabber.org
Email..... dm...@ictsoc.de

Attachment: pgpqLaYeOYgyt.pgp
Description: PGP signature

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

Reply via email to