emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Vikas Rawal <vikaslists@agrarianresearch.org>
To: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: Re: List of most recently updated org files in the project
Date: Fri, 17 May 2013 08:16:30 +0530	[thread overview]
Message-ID: <20130517024630.GA21868@panahar> (raw)
In-Reply-To: <20130516141952.GA18501@panahar>

> 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

      reply	other threads:[~2013-05-17  2:46 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-16 14:19 List of most recently updated org files in the project Vikas Rawal
2013-05-17  2:46 ` Vikas Rawal [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=20130517024630.GA21868@panahar \
    --to=vikaslists@agrarianresearch.org \
    --cc=emacs-orgmode@gnu.org \
    /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).