emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Karl Eichwalder <ke@gnu.Franken.de>
To: news1142@Karl-Voit.at
Cc: emacs-orgmode@gnu.org
Subject: Re: Managing Images with Org-mode?
Date: Fri, 03 Aug 2012 16:44:17 +0200	[thread overview]
Message-ID: <shwr1gxcfy.fsf@frechet.suse.de> (raw)
In-Reply-To: <2012-08-02T21-51-18@devnull.Karl-Voit.at> (Karl Voit's message of "Thu, 2 Aug 2012 22:02:02 +0200")

Karl Voit <devnull@Karl-Voit.at> writes:

> ,----[ ~/.snippets/tls ]
> | name : Insert a table with files of a folder including links
> | # --
> | #+BEGIN_SRC sh
> | PATTERN='${1:*.jpg}'
> | MYFOLDER='${2:$HOME/}'
> | cd \${MYFOLDER}; MYPWD=\`pwd\`; for file in \`ls -1 \${PATTERN}\`; do
> | echo '-[['\$MYPWD'/'\$file']]'; done
> | #+END_SRC
> `----

Yes, I use something similar to create the thumbnails and the initial
org code (I use 3rd level headlines instead of table, because I want to
attache tags to every single image):

#+BEGIN_SRC sh
  reuse_thumb="${1:yes}"
  org=2012-07-14-stubai-hohe-huetten
  img_dirs=${2:2012-07-*}
  : >$org.tmp
  for d in $img_dirs ; do
    {
      [ -f $d ] && continue
      echo "** $d"
      pushd $d >/dev/null
      mkdir -p thumb
      for f in *.JPG *.jpg; do
        [ -f $f ] || continue
        thumb=thumb/${f:0:-3}png
        [ $reuse_thumb = yes ] && [ -f $thumb ] \
          || convert $f -thumbnail 144^ $thumb
        echo "*** [[file:$d/$thumb]]"
        echo [[file:$d/$f][$d/$f]]
      done
      popd >/dev/null
    } >>$org.tmp
  done
#+END_SRC

> Related to this topic: C-c C-x C-v (org-toggle-inline-images) is of
> interest for you. On a per-file-basis this is: #+STARTUP inlineimages

I was already aware of the toggle key sequence.  Thanks for the STARTUP
parameter!  A colon is missing, though ;)  --better use:

    #+STARTUP: inlineimages

-- 
Karl Eichwalder

  reply	other threads:[~2012-08-03 14:44 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-25 11:36 Managing Images with Org-mode? Karl Eichwalder
2012-07-26 13:38 ` Karl Eichwalder
2012-08-01 12:26   ` Bastien
2012-08-01 12:59     ` Karl Eichwalder
2012-08-01 13:23       ` Bastien
2012-08-02 20:02       ` Karl Voit
2012-08-03 14:44         ` Karl Eichwalder [this message]
2012-08-03 18:49           ` Karl Voit
2012-08-04  7:01             ` Jeffrey Spencer
2012-08-04  7:03               ` Bastien
2012-08-04 19:34               ` Jude DaShiell

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

  List information: https://www.orgmode.org/

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

  git send-email \
    --in-reply-to=shwr1gxcfy.fsf@frechet.suse.de \
    --to=ke@gnu.franken.de \
    --cc=emacs-orgmode@gnu.org \
    --cc=news1142@Karl-Voit.at \
    /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 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).