emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* List of most recently updated org files in the project
@ 2013-05-16 14:19 Vikas Rawal
  2013-05-17  2:46 ` Vikas Rawal
  0 siblings, 1 reply; 2+ messages in thread
From: Vikas Rawal @ 2013-05-16 14:19 UTC (permalink / raw)
  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.

I have been thinking of an org-babel source block that will produce
the list of files, but have not been able to implement it. Will be
grateful for any suggestions?

Vikas

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: List of most recently updated org files in the project
  2013-05-16 14:19 List of most recently updated org files in the project Vikas Rawal
@ 2013-05-17  2:46 ` Vikas Rawal
  0 siblings, 0 replies; 2+ messages in thread
From: Vikas Rawal @ 2013-05-17  2:46 UTC (permalink / raw)
  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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-05-17  2:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-16 14:19 List of most recently updated org files in the project Vikas Rawal
2013-05-17  2:46 ` Vikas Rawal

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).