From mboxrd@z Thu Jan 1 00:00:00 1970 From: Vikas Rawal Subject: Re: List of most recently updated org files in the project Date: Fri, 17 May 2013 08:16:30 +0530 Message-ID: <20130517024630.GA21868@panahar> References: <20130516141952.GA18501@panahar> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from eggs.gnu.org ([208.118.235.92]:43044) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UdAgr-0006R6-Bk for emacs-orgmode@gnu.org; Thu, 16 May 2013 22:46:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UdAgo-00035j-Lf for emacs-orgmode@gnu.org; Thu, 16 May 2013 22:46:41 -0400 Received: from mail-pa0-f42.google.com ([209.85.220.42]:35802) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UdAgo-00035d-Fl for emacs-orgmode@gnu.org; Thu, 16 May 2013 22:46:38 -0400 Received: by mail-pa0-f42.google.com with SMTP id bj3so3104768pad.29 for ; Thu, 16 May 2013 19:46:37 -0700 (PDT) Received: from panahar ([203.122.34.37]) by mx.google.com with ESMTPSA id ag4sm9151396pbc.20.2013.05.16.19.46.35 for (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 16 May 2013 19:46:36 -0700 (PDT) Content-Disposition: inline In-Reply-To: <20130516141952.GA18501@panahar> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode > I have a website (http://www.indianstatistics.org) published using > orgmode. I have just migrated it to the new exporter. I would like to > have a headline on the main page that lists (with links to) five most > recently changed files. All org-files have a #+DATE field in the > header which I update everytime I make changes on any page. > Sorry, this was silly. Just needed a tiny bash script to throw org syntax. The code below lists five most recently updated files. #+begin_src sh :results raw :exports results for filename in $(find -iname \*.org -type f -printf '%T@ %p\n' | sort -n | tail -5 | cut -f2- -d" ") do title=$(grep ^* $filename | head -n1 | cut -f2- -d" ") echo "*** [[file:$filename][$title]]" | head -5 done #+end_src Vikas