emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* copying files in the links while exporting to html
@ 2014-06-02 23:23 zhenjiang zech xu
  2014-06-03  2:00 ` John Kitchin
  0 siblings, 1 reply; 3+ messages in thread
From: zhenjiang zech xu @ 2014-06-02 23:23 UTC (permalink / raw)
  To: emacs-orgmode

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

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: 799 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: copying files in the links while exporting to html
  2014-06-02 23:23 copying files in the links while exporting to html zhenjiang zech xu
@ 2014-06-03  2:00 ` John Kitchin
  2014-06-04 23:31   ` zhenjiang zech xu
  0 siblings, 1 reply; 3+ messages in thread
From: John Kitchin @ 2014-06-03  2:00 UTC (permalink / raw)
  To: zhenjiang zech xu; +Cc: emacs-orgmode@gnu.org

[-- 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 --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: copying files in the links while exporting to html
  2014-06-03  2:00 ` John Kitchin
@ 2014-06-04 23:31   ` zhenjiang zech xu
  0 siblings, 0 replies; 3+ messages in thread
From: zhenjiang zech xu @ 2014-06-04 23:31 UTC (permalink / raw)
  To: John Kitchin; +Cc: emacs-orgmode@gnu.org

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

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 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: 3007 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-06-04 23:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-02 23:23 copying files in the links while exporting to html zhenjiang zech xu
2014-06-03  2:00 ` John Kitchin
2014-06-04 23:31   ` zhenjiang zech xu

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).