all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Eric Schulte" <schulte.eric@gmail.com>
To: Chao Lu <loochao@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: Photo Gallery
Date: Sat, 13 Feb 2010 16:59:08 -0700	[thread overview]
Message-ID: <87fx54wuur.fsf@gmail.com> (raw)
In-Reply-To: <3cbb63d01002131536o13f739c6n11d42289b47cd6c7@mail.gmail.com> (Chao Lu's message of "Sat, 13 Feb 2010 18:36:53 -0500")

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

  reply	other threads:[~2010-02-13 23:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-13 23:36 Photo Gallery Chao Lu
2010-02-13 23:59 ` Eric Schulte [this message]
2010-02-14  0:20   ` Dan Davison

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87fx54wuur.fsf@gmail.com \
    --to=schulte.eric@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=loochao@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.