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

Fixing "pandoc: sh: openBinaryFile: does not exist (No such file or directory)" error #2

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
FROM pandoc/latex
WORKDIR /src
COPY composer.* ./

FROM pandoc/latex:2.6
# Install composer, refer: https://github.com/geshan/docker-php-composer-alpine/blob/master/Dockerfile
RUN apk --update add wget \
curl \
Expand All @@ -13,13 +10,15 @@ RUN apk --update add wget \
php7-json \
php7-mbstring \
php7-phar \
php7-xml \
php7-simplexml \
php7-xml \
php7-simplexml \
php7-dom --repository http://nl.alpinelinux.org/alpine/edge/testing/ && rm /var/cache/apk/*

RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/bin --filename=composer
# end of install composer

WORKDIR /src
COPY composer.* ./
RUN composer install
COPY . .
CMD ["sh"]
ENTRYPOINT ["/bin/sh", "-c"]
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,13 @@ You can set `indexes` as `true` if you want pages with the same name as a direct
`php convert.php --filename=mediawiki.xml --output=export --indexes=true`

####--frontmatter####
You can specify whether you want frontmatter included. This is automatically set to `true` when the output format is `markdown_github`
You can specify whether you want frontmatter included. This is automatically set to `true` when the output format is `gfm`

`php convert.php --filename=mediawiki.xml --output=export --format=markdown_phpextra --frontmatter=true`


####--format####
You can specify different output formats with `format`. The default is `markdown_github`. See
You can specify different output formats with `format`. The default is `gfm`. See

`php convert.php --filename=mediawiki.xml --output=export --format=markdown_phpextra`

Expand All @@ -76,7 +76,7 @@ Supported pandoc formats are:
* latex
* man
* markdown
* markdown_github
* gfm
* markdown_mmd
* markdown_phpextra
* markdown_strict
Expand Down
4 changes: 2 additions & 2 deletions convert.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@
if(!empty($arguments['format'])) {
$format = $arguments['format'];
} else {
$format = 'markdown_github';
$format = 'gfm';
}


if(!empty($arguments['fm']) OR (empty($arguments['fm']) && $format == 'markdown_github')) {
if(!empty($arguments['fm']) OR (empty($arguments['fm']) && $format == 'gfm')) {
$add_meta = true;
} else {
$add_meta = false;
Expand Down
2 changes: 1 addition & 1 deletion convert.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ docker build -t $image .

RefreshDirectory $outputFolder
$dockerRunCmd = "php convert.php --filename="+$fileToConvertPathForDockerImage+" --output=./output"
docker run -v ${PSScriptRoot}/output/:/src/output $image sh -c $dockerRunCmd
docker run -v ${PSScriptRoot}/output/:/src/output $image $dockerRunCmd