[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Orgmode] Re: Help with migrating blog to org-mode format
From: |
Matt Lundin |
Subject: |
[Orgmode] Re: Help with migrating blog to org-mode format |
Date: |
Tue, 11 Jan 2011 13:32:19 -0500 |
User-agent: |
Gnus/5.110011 (No Gnus v0.11) Emacs/24.0.50 (gnu/linux) |
Myriam Abramson <address@hidden> writes:
> Each topic in a blog is a TODO task and the date is inserted when the
> task is DONE. I'm planning to read from my xml blog and write topics
> simply as "* DONE mytopic ... " but how can I get the publication date
> in org to get "CLOSED: <date>" on the next line?
>
> The xml of my blog is something like that:
>
> <title type='text'> my title</title>
> <content type='html'> my content</content>
> <published>2003-10-22T18:27:00.000-04:00</published>
>
After you've parsed the xml and retrieved the date string, you can
convert to an org CLOSED timestamp with something like this:
(format-time-string "CLOSED: [%Y-%m-%d %H:%M]" (date-to-time
"2003-10-22T18:27:00.000-04:00"))
...which returns...
CLOSED: [2003-10-22 14:27]
(The time zone parsing may need some adjustment.)
HTH,
Matt