[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] List of most recently updated org files in the project
From: |
Vikas Rawal |
Subject: |
Re: [O] List of most recently updated org files in the project |
Date: |
Fri, 17 May 2013 08:16:30 +0530 |
User-agent: |
Mutt/1.5.21 (2012-12-30) |
> 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