emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Managing Images with Org-mode?


From: Karl Eichwalder
Subject: Re: [O] Managing Images with Org-mode?
Date: Fri, 03 Aug 2012 16:44:17 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1 (gnu/linux)

Karl Voit <address@hidden> 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 via email to

[Prev in Thread] Current Thread [Next in Thread]