From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matt Lundin Subject: Re: Help with migrating blog to org-mode format Date: Tue, 11 Jan 2011 13:32:19 -0500 Message-ID: <87k4ib8f64.fsf@fastmail.fm> References: <87lj2telk0.fsf@playground.homesweet.home> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from [140.186.70.92] (port=34290 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pcj14-00034b-I6 for emacs-orgmode@gnu.org; Tue, 11 Jan 2011 13:32:23 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Pcj13-0001hF-Dq for emacs-orgmode@gnu.org; Tue, 11 Jan 2011 13:32:22 -0500 Received: from out1.smtp.messagingengine.com ([66.111.4.25]:43551) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Pcj13-0001h7-7J for emacs-orgmode@gnu.org; Tue, 11 Jan 2011 13:32:21 -0500 In-Reply-To: <87lj2telk0.fsf@playground.homesweet.home> (Myriam Abramson's message of "Sun, 09 Jan 2011 17:53:19 -0500") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Myriam Abramson Cc: emacs-orgmode@gnu.org Myriam Abramson 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: " on the next line? > > The xml of my blog is something like that: > > my title > my content > 2003-10-22T18:27:00.000-04:00 > 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