[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Orgmode] Photo Gallery
From: |
Eric Schulte |
Subject: |
Re: [Orgmode] Photo Gallery |
Date: |
Sat, 13 Feb 2010 16:59:08 -0700 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.1.90 (gnu/linux) |
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.
--8<---------------cut here---------------start------------->8---
* 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<li><a href=\"#{p}\">#{p}</a></li>" }.join("\n")
"<ul>\n#{list}\n</ul>"
#+end_src
#+results:
#+BEGIN_HTML
<ul>
<li><a href="Photo 1.jpg">Photo 1.jpg</a></li>
<li><a href="Photo 2.jpg">Photo 2.jpg</a></li>
<li><a href="Photo 3.jpg">Photo 3.jpg</a></li>
<li><a href="Photo 4.jpg">Photo 4.jpg</a></li>
</ul>
#+END_HTML
--8<---------------cut here---------------end--------------->8---
for information on Org-babel see http://orgmode.org/worg/org-contrib/babel/
Best -- Eric
Chao Lu <address@hidden> 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.
> address@hidden
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode