From mboxrd@z Thu Jan 1 00:00:00 1970 From: zhenjiang zech xu Subject: Re: copying files in the links while exporting to html Date: Wed, 4 Jun 2014 17:31:45 -0600 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=bcaec51a8e2a71abcd04fb0b0a4b Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:51871) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WsKfT-0002Ii-Oo for emacs-orgmode@gnu.org; Wed, 04 Jun 2014 19:32:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WsKfS-0006Yc-Hz for emacs-orgmode@gnu.org; Wed, 04 Jun 2014 19:32:27 -0400 Received: from mail-ve0-x232.google.com ([2607:f8b0:400c:c01::232]:50940) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WsKfS-0006XY-CG for emacs-orgmode@gnu.org; Wed, 04 Jun 2014 19:32:26 -0400 Received: by mail-ve0-f178.google.com with SMTP id sa20so257771veb.23 for ; Wed, 04 Jun 2014 16:32:25 -0700 (PDT) In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: John Kitchin Cc: "emacs-orgmode@gnu.org" --bcaec51a8e2a71abcd04fb0b0a4b Content-Type: text/plain; charset=UTF-8 That looks nice. Thanks, John! Best, Zhenjiang On Mon, Jun 2, 2014 at 8:00 PM, John Kitchin wrote: > 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 > 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 >> > > --bcaec51a8e2a71abcd04fb0b0a4b Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
That looks nice. Thanks, John!

Best,
= Zhenjiang


On Mon, Jun 2, 2014 at 8:00 PM, John Kitchin <jkitchin@andrew.= cmu.edu> wrote:
there is no built= in way to do this that I know of. I do this in publishing blogposts from or= g-mode. i use a filter on links that does this. The copying code is here:
https://github.com/jkitchin/jmax/blob/master/use= r/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/Chang= ing-links-to-files-so-they-work-in-a-blog/

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

<= div>John

-----------------------------------
John Kitchin
Asso= ciate 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, zhenjian= g zech xu <zhenjiang.xu@gmail.com> wrote:
Hi orgmoders,

I= s there any existing function to copy files in the external links to a spec= ified location when exporting .org file to html? I know org-publish has fun= ctionality to copy files with certain suffices on defined project, but my n= eed is to export single file or single subtree in the buffer.

For example, when I export the following subtree, it would b= e lovely to copy the spam.png to the path I set up.
* foo
=C2=A0 [[file:spam.png]]

If there is no function ready to do that, what is the easie= st easy to implement it? any point to the right direction is appreciated.
Thanks,
Zhenjiang


--bcaec51a8e2a71abcd04fb0b0a4b--