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 schulte.e...@gmail.com 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|\tlia href=\#{p}\#{p}/a/li }.join(\n)
ul\n#{list}\n/ul
#+end_src
#+results:
#+BEGIN_HTML
ul
lia href=Photo 1.jpgPhoto 1.jpg/a/li
lia href=Photo 2.jpgPhoto 2.jpg/a/li
lia href=Photo 3.jpgPhoto 3.jpg/a/li
lia href=Photo 4.jpgPhoto 4.jpg/a/li
/ul
#+END_HTML
for information on Org-babel see http://orgmode.org/worg/org-contrib/babel/
Best -- Eric
Chao Lu looc...@gmail.com 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
___