-
Notifications
You must be signed in to change notification settings - Fork 181
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
Move options to pandoc-defaults.yaml #290
Conversation
AppVeyor build 1.0.62 for commit 6486c3b by @dhimmel is now complete. The rendered manuscript from this build is temporarily available for download at: |
Here's a local WeasyPrint build of 6486c3b: manuscript.pdf |
The simplification and elimination of redundancy in the build script is very nice. Could you please test a CI or local DOCX build as well? |
Here's the output from a local stderr output below
|
One question is whether we should have additional default files for specific outputs. For example, we could have |
Looks nice. Some mention in the README, USAGE might be good? Btw. please excuse that I'm a bit slow with responding. Edit: had a quick look and saw this:
Which is nice, it would allow, as with the thoughts about the theme to have a common.yml file and the ln maybe a docx.yaml, pdf.yaml, etc. In addition that values don't get overwritten but get applied multiple times. For reference: |
AppVeyor build 1.0.63 for commit 7d9224b by @dhimmel is now complete. The rendered manuscript from this build is temporarily available for download at: |
e573d9d
to
c1636e4
Compare
AppVeyor build 1.0.65 for commit c1636e4 by @dhimmel is now complete. The rendered manuscript from this build is temporarily available for download at: Added by @dhimmel from local builds:
|
AppVeyor build 1.0.66 for commit b068b9e by @dhimmel is now complete. The rendered manuscript from this build is temporarily available for download at: |
I think there are two things a user may want to do:
I'd like to look into whether we can accomplish 2 without requiring any changes to
@Nebucatnetzer you're under no obligation to respond at all... so nothing to excuse 😺 |
AppVeyor build 1.0.67 for commit 18b78fd by @dhimmel is now complete. The rendered manuscript from this build is temporarily available for download at: |
Aye something like As for 1. maybe we could make the build.sh a bit more complex so that if it finds a YAML with the exact same name as a defaults file (e.g. html.yaml) it would replace the defaults and if it has a different name (e.g. custom-html.yml) it would be added on top? |
I looked briefly into using bash / shell commands to detect files matching a collection of patterns and then transforming each file into a pandoc This makes me lean towards implementing this logic in Python. So the proposal would be:
|
Sounds good to me :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have one suggestion about making the file paths more flexible. Everything else looks good to me.
build/build.sh
Outdated
--include-after-body=build/plugins/analytics.html \ | ||
--output=output/manuscript.html \ | ||
"$INPUT_PATH" | ||
--defaults=build/pandoc-defaults/common.yaml \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The proposal in #261 (comment) would give more flexibility for specifying where the defaults files reside.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@agitter are you suggesting that we allow setting the directory like:
PANDOC_DEFAULTS_DIR="${PANDOC_DEFAULTS_DIR:-build/pandoc-defaults}"
This means there's a single environment variable and that users could do:
cp build/pandoc-defaults build/custom-pandoc-defaults
# edit files in build/custom-pandoc-defaults
export PANDOC_DEFAULTS_DIR=build/custom-pandoc-defaults
Or do you think each file should have it's own variable like PANDOC_DEFAULTS_COMMON_PATH
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I propose that initially we do:
PANDOC_DEFAULTS_DIR="${PANDOC_DEFAULTS_DIR:-build/pandoc-defaults}"
Your example customization above looks pretty straightforward.
That may end up being a placeholder depending what changes as part of
work on python code to detect default files (either additional or replacement files) in the manubot package.
AppVeyor build 1.0.68 for commit 220998d by @dhimmel is now complete. The rendered manuscript from this build is temporarily available for download at: |
This build is based on 06fb01d. This commit was created by the following Travis CI build and job: https://travis-ci.com/manubot/rootstock/builds/143118608 https://travis-ci.com/manubot/rootstock/jobs/272428366 The full commit message that triggered this build is copied below: build: configure pandoc using --defaults files merges #290 The options for the pandoc commands in build/build.sh are now configured in YAML files that are passed to Pandoc using --defaults. export PANDOC_DEFAULTS_DIR to override the directory with pandoc --defaults files
This build is based on 06fb01d. This commit was created by the following Travis CI build and job: https://travis-ci.com/manubot/rootstock/builds/143118608 https://travis-ci.com/manubot/rootstock/jobs/272428366 The full commit message that triggered this build is copied below: build: configure pandoc using --defaults files merges #290 The options for the pandoc commands in build/build.sh are now configured in YAML files that are passed to Pandoc using --defaults. export PANDOC_DEFAULTS_DIR to override the directory with pandoc --defaults files
merges manubot/rootstock#290 The options for the pandoc commands in build/build.sh are now configured in YAML files that are passed to Pandoc using --defaults. export PANDOC_DEFAULTS_DIR to override the directory with pandoc --defaults files
Pandoc has introduced a
--defaults
option to "specify a set of default option settings". The benefits for us are a few-fold: