public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* Wish: extract-media paths relative to --output
@ 2018-07-29 22:36 Axel Rauschmayer
  0 siblings, 0 replies; only message in thread
From: Axel Rauschmayer @ 2018-07-29 22:36 UTC (permalink / raw)
  To: pandoc-discuss


[-- Attachment #1.1: Type: text/plain, Size: 1733 bytes --]



My use case is as follows (improved new version of this post):


*Problem*


Files:


  # Input

  content/foo.md

  content/img/diagram.svg


  # Output (out/ is a build directory that is gitignored and often cleared)

  out/foo.html

  out/img/diagram.svg


Command:


  pandoc --standalone -o out/foo.html --extract-media=out content/foo.md


Input:


  Image: ![](img/diagram.svg)


*Actual output:*


  Image: <img src="out/img/diagram.svg" />


*Desired output:*


  Image: <img src="img/diagram.svg" />


*Possible solutions*


Possible solution 1 –  introduce a completely new and independent reader 
option extract-media-into where media paths (into the extraction directory 
out/) are always relative to the path specified via --output:


  pandoc --standalone -o out/foo.html 
--extract-media-into=out content/foo.md


Possible solution 2 – introduce a flag that changes how extract-media
 operates:


  pandoc --standalone -o 
out/foo.html --extract-media-relative-to-output --extract-media=out content/foo.md


Am I making sense? Or am I thinking about this wrong?

-- 
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/96033760-2da8-45b6-b0b5-62e15969807a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[-- Attachment #1.2: Type: text/html, Size: 8351 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2018-07-29 22:36 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-29 22:36 Wish: extract-media paths relative to --output Axel Rauschmayer

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 NNTP newsgroup(s).