From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dan Davison Subject: Re: Photo Gallery Date: Sat, 13 Feb 2010 19:20:35 -0500 Message-ID: <87aavcsm5o.fsf@stats.ox.ac.uk> References: <3cbb63d01002131536o13f739c6n11d42289b47cd6c7@mail.gmail.com> <87fx54wuur.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NgSEF-0000yY-V6 for emacs-orgmode@gnu.org; Sat, 13 Feb 2010 19:20:52 -0500 Received: from [140.186.70.92] (port=45445 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NgSEC-0000xP-Sl for emacs-orgmode@gnu.org; Sat, 13 Feb 2010 19:20:51 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1NgSEC-0005ST-2l for emacs-orgmode@gnu.org; Sat, 13 Feb 2010 19:20:49 -0500 Received: from markov.stats.ox.ac.uk ([163.1.210.1]:34360) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NgSEB-0005SM-Rf for emacs-orgmode@gnu.org; Sat, 13 Feb 2010 19:20:48 -0500 In-Reply-To: <87fx54wuur.fsf@gmail.com> (Eric Schulte's message of "Sat, 13 Feb 2010 16:59:08 -0700") 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: Eric Schulte Cc: Chao Lu , emacs-orgmode@gnu.org Hi Chao, Here's a second org-babel method, and a third method using org-fstree by Andreas Burtzlaff. http://orgmode.org/worg/org-contrib/babel/ http://burtzlaff.de/org-fstree/ Dan --8<---------------cut here---------------start------------->8--- * babel #+begin_src sh :results output org :var dir="/home/dan/Pictures/2010/02" ls $dir/*.JPG | while read pic ; do echo "[[$pic]]" done #+end_src #+results: [[/home/dan/Pictures/2010/02/IMG_6097.JPG]] [[/home/dan/Pictures/2010/02/IMG_6098.JPG]] [[/home/dan/Pictures/2010/02/IMG_6099.JPG]] [[/home/dan/Pictures/2010/02/IMG_6100.JPG]] [[/home/dan/Pictures/2010/02/IMG_6101.JPG]] [[/home/dan/Pictures/2010/02/IMG_6102.JPG]] [[/home/dan/Pictures/2010/02/IMG_6103.JPG]] [[/home/dan/Pictures/2010/02/IMG_6104.JPG]] [[/home/dan/Pictures/2010/02/IMG_6105.JPG]] [[/home/dan/Pictures/2010/02/IMG_6106.JPG]] [[/home/dan/Pictures/2010/02/IMG_6107.JPG]] [[/home/dan/Pictures/2010/02/IMG_6108.JPG]] [[/home/dan/Pictures/2010/02/IMG_6109.JPG]] [[/home/dan/Pictures/2010/02/IMG_6110.JPG]] * fstree http://burtzlaff.de/org-fstree/ #+BEGIN_FSTREE: ~/Pictures/2010/02/ * | | [[file:/home/dan/Pictures/2010/02/IMG_6097.JPG][IMG_6097.JPG]] * | | [[file:/home/dan/Pictures/2010/02/IMG_6098.JPG][IMG_6098.JPG]] * | | [[file:/home/dan/Pictures/2010/02/IMG_6099.JPG][IMG_6099.JPG]] * | | [[file:/home/dan/Pictures/2010/02/IMG_6100.JPG][IMG_6100.JPG]] * | | [[file:/home/dan/Pictures/2010/02/IMG_6101.JPG][IMG_6101.JPG]] * | | [[file:/home/dan/Pictures/2010/02/IMG_6102.JPG][IMG_6102.JPG]] * | | [[file:/home/dan/Pictures/2010/02/IMG_6103.JPG][IMG_6103.JPG]] * | | [[file:/home/dan/Pictures/2010/02/IMG_6104.JPG][IMG_6104.JPG]] * | | [[file:/home/dan/Pictures/2010/02/IMG_6105.JPG][IMG_6105.JPG]] * | | [[file:/home/dan/Pictures/2010/02/IMG_6106.JPG][IMG_6106.JPG]] * | | [[file:/home/dan/Pictures/2010/02/IMG_6107.JPG][IMG_6107.JPG]] * | | [[file:/home/dan/Pictures/2010/02/IMG_6108.JPG][IMG_6108.JPG]] * | | [[file:/home/dan/Pictures/2010/02/IMG_6109.JPG][IMG_6109.JPG]] * | | [[file:/home/dan/Pictures/2010/02/IMG_6110.JPG][IMG_6110.JPG]] * |D| [[file:/home/dan/Pictures/2010/02/snow][snow]] ** | | [[file:/home/dan/Pictures/2010/02/snow/IMG_6097.jpg][IMG_6097.jpg]] ** | | [[file:/home/dan/Pictures/2010/02/snow/IMG_6098.jpg][IMG_6098.jpg]] ** | | [[file:/home/dan/Pictures/2010/02/snow/IMG_6099.jpg][IMG_6099.jpg]] ** | | [[file:/home/dan/Pictures/2010/02/snow/IMG_6100.jpg][IMG_6100.jpg]] ** | | [[file:/home/dan/Pictures/2010/02/snow/IMG_6101.jpg][IMG_6101.jpg]] ** | | [[file:/home/dan/Pictures/2010/02/snow/IMG_6102.jpg][IMG_6102.jpg]] ** | | [[file:/home/dan/Pictures/2010/02/snow/IMG_6103.jpg][IMG_6103.jpg]] #+END_FSTREE --8<---------------cut here---------------end--------------->8--- "Eric Schulte" writes: > This would require some work on your part, > > but it shouldn't be hard to use Org-babel and your favorite scripting > language to automatically generate the html required to display an > image, for each file in a directory of photographs, and then use > the :results html setting to drop the resulting html directly into your > org-mode buffer. For example the following is a minimal working > example. > > * example generating html of pictures w/Org-babel > > #+source: picture_list > #+begin_src sh > ls ~/Pictures/Photo\ Booth > #+end_src > > #+begin_src ruby :var pics=picture_list :results html > list = pics.map{ |p| path = p.join(" ")}. > map{ |p|"\t
  • #{p}
  • " }.join("\n") > "
      \n#{list}\n
    " > #+end_src > > #+results: > #+BEGIN_HTML > > #+END_HTML > > for information on Org-babel see http://orgmode.org/worg/org-contrib/babel/ > > Best -- Eric > > Chao Lu writes: > >> Dear all, >> >> Is it possible to use org to create a photo gallery? Which mean I need to insert a batch of image file, but do the links by hand could be so heavy work, any quick ways? >> >> Thanks, >> >> Chao >> >> _______________________________________________ >> Emacs-orgmode mailing list >> Please use `Reply All' to send replies to the list. >> Emacs-orgmode@gnu.org >> http://lists.gnu.org/mailman/listinfo/emacs-orgmode > > > _______________________________________________ > Emacs-orgmode mailing list > Please use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode