* Photo Gallery
@ 2010-02-13 23:36 Chao Lu
2010-02-13 23:59 ` Eric Schulte
0 siblings, 1 reply; 3+ messages in thread
From: Chao Lu @ 2010-02-13 23:36 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1.1: Type: text/plain, Size: 195 bytes --]
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
[-- Attachment #1.2: Type: text/html, Size: 217 bytes --]
[-- Attachment #2: Type: text/plain, Size: 201 bytes --]
_______________________________________________
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Photo Gallery
2010-02-13 23:36 Photo Gallery Chao Lu
@ 2010-02-13 23:59 ` Eric Schulte
2010-02-14 0:20 ` Dan Davison
0 siblings, 1 reply; 3+ messages in thread
From: Eric Schulte @ 2010-02-13 23:59 UTC (permalink / raw)
To: Chao Lu; +Cc: emacs-orgmode
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 <loochao@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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Photo Gallery
2010-02-13 23:59 ` Eric Schulte
@ 2010-02-14 0:20 ` Dan Davison
0 siblings, 0 replies; 3+ messages in thread
From: Dan Davison @ 2010-02-14 0:20 UTC (permalink / raw)
To: Eric Schulte; +Cc: Chao Lu, emacs-orgmode
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.eric@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|"\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
>
> for information on Org-babel see http://orgmode.org/worg/org-contrib/babel/
>
> Best -- Eric
>
> Chao Lu <loochao@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
>
>
> _______________________________________________
> 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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-02-14 0:20 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-13 23:36 Photo Gallery Chao Lu
2010-02-13 23:59 ` Eric Schulte
2010-02-14 0:20 ` Dan Davison
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).