emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: David Maus <dmaus@ictsoc.de>
To: Guy Wiener <wiener.guy@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: org-publish with latest changes?
Date: Sun, 17 Oct 2010 18:09:53 +0200	[thread overview]
Message-ID: <87sk04vm0e.wl%dmaus@ictsoc.de> (raw)
In-Reply-To: <AANLkTinTNjGJnCg4fnhkycrajznR9HKtVeThhoqxpto7@mail.gmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 1582 bytes --]

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.... dmjena@jabber.org
Email..... dmaus@ictsoc.de

[-- Attachment #1.2: Type: application/pgp-signature, Size: 230 bytes --]

[-- Attachment #2: Type: text/plain, Size: 201 bytes --]

_______________________________________________
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	other threads:[~2010-10-17 16:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-13  8:54 org-publish with latest changes? Guy Wiener
2010-10-17 16:09 ` David Maus [this message]

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

  List information: https://www.orgmode.org/

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

  git send-email \
    --in-reply-to=87sk04vm0e.wl%dmaus@ictsoc.de \
    --to=dmaus@ictsoc.de \
    --cc=emacs-orgmode@gnu.org \
    --cc=wiener.guy@gmail.com \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).