Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pandoc should not download and include an external audio file in the EPUB output #2473

Closed
fedelibre opened this issue Oct 23, 2015 · 3 comments

Comments

@fedelibre
Copy link

As emerged in this discussion, pandoc downloads and includes an audio file in the EPUB output file.

HTML output does not include external resources by default and you can include them with the option --self-contained. IMO epub output should work the same way.

Test file:

# Test

Testing the audio element from an external link:

<audio controls>
 <source src="http://www.sixbarsjail.it/tmp/bach_toccata.mp3" type="audio/mpeg">
</audio>

$ pandoc --version
pandoc 1.15.1.1

Command: pandoc -o output.epub inpub.md

@jgm
Copy link
Owner

jgm commented Oct 23, 2015

Suggestion from pandoc-discuss:

In principle we could change this behavior, but a change in
the default here might break existing workflows. One
possibility would be to make this behavior sensitive to some
kind of flag. For example, if the data-external attribute
is set on <source> element, don't include in the EPUB.

@fedelibre
Copy link
Author

Another thought: would it be possible to parse the link and check if it's a local path or an http:// link?
That way, it would work also when CommonMark will add the syntax to embed audio and video.

@jgm
Copy link
Owner

jgm commented Oct 24, 2015

+++ Federico Bruni [Oct 24 15 01:31 ]:

Another thought: would it be possible to parse the link and check if
it's a local path or an http:// link?

Many people will want external resources to be embeded, so
that the epub is self-contained. Since that is the current
behavior, I'd rather have an explicit flag for this.

That way, it would work also when CommonMark will add the [1]syntax to
embed audio and video.

You've linked to a forum post where people are making
suggestions. It's not clear that CommonMark will have any
specific syntax for this, or what it will be.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants