emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: John Kitchin <jkitchin@andrew.cmu.edu>
To: zhenjiang zech xu <zhenjiang.xu@gmail.com>
Cc: "emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
Subject: Re: copying files in the links while exporting to html
Date: Mon, 2 Jun 2014 22:00:17 -0400	[thread overview]
Message-ID: <CAJ51ETqw+K8HnjAE++wpqAWpTPLFiBQV5Wxesy45m1JwrQNy1Q@mail.gmail.com> (raw)
In-Reply-To: <CAAp=d8pdwSnATcNMnPPH1uL17R8isB+X8vOpRUpKa5KgYVBsPg@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1472 bytes --]

there is no builtin way to do this that I know of. I do this in publishing
blogposts from org-mode. i use a filter on links that does this. The
copying code is here:

https://github.com/jkitchin/jmax/blob/master/user/blogofile.el#L115

the results of that code can be seen at http://kitchingroup.cheme.cmu.edu.
I wrote about doing some of this here:
http://kitchingroup.cheme.cmu.edu/blog/2013/09/28/Changing-links-to-files-so-they-work-in-a-blog/

It may not be what you want, but it might help you build your code. I hope
it helps!

John

-----------------------------------
John Kitchin
Associate Professor
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
http://kitchingroup.cheme.cmu.edu



On Mon, Jun 2, 2014 at 7:23 PM, zhenjiang zech xu <zhenjiang.xu@gmail.com>
wrote:

> Hi orgmoders,
>
> Is there any existing function to copy files in the external links to a
> specified location when exporting .org file to html? I know org-publish has
> functionality to copy files with certain suffices on defined project, but
> my need is to export single file or single subtree in the buffer.
>
> For example, when I export the following subtree, it would be lovely to
> copy the spam.png to the path I set up.
> * foo
>   [[file:spam.png]]
>
> If there is no function ready to do that, what is the easiest easy to
> implement it? any point to the right direction is appreciated.
>
> Thanks,
> Zhenjiang
>

[-- Attachment #2: Type: text/html, Size: 2372 bytes --]

  reply	other threads:[~2014-06-03  2:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-02 23:23 copying files in the links while exporting to html zhenjiang zech xu
2014-06-03  2:00 ` John Kitchin [this message]
2014-06-04 23:31   ` zhenjiang zech xu

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=CAJ51ETqw+K8HnjAE++wpqAWpTPLFiBQV5Wxesy45m1JwrQNy1Q@mail.gmail.com \
    --to=jkitchin@andrew.cmu.edu \
    --cc=emacs-orgmode@gnu.org \
    --cc=zhenjiang.xu@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 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).