-
Notifications
You must be signed in to change notification settings - Fork 39
Add support for markdown to docx and html #4
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
Conversation
p1ass
left a comment
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.
PRありがとう!
2点お願いがあります。
-
exampleディレクトリにこれらのスクリプトを使って生成されたファイルを追加してほしいです。実際にどのように変換されるか分かった方が良いので。
-
READMEに使い方を書いてほしいです。
Generate tex file from markdownと同じように書けば大丈夫です。
|
早速レビューありがとう! |
p1ass
left a comment
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.
exampleを追加してくれてありがとう。
改めて何点かコメントしたので確認お願いします🙇
scripts/mdtodocx
Outdated
| FILE="reference.docx" | ||
| if [ ! -e $FILE ]; then | ||
| pandoc --print-default-data-file reference.docx > /workdir/reference.docx | ||
| fi |
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.
見逃していたのですが、これって残しておく必要ありますか?
毎回 reference.docx ファイルが生成されてしまいますが、利用者側はこのファイルは使わないと思います。
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.
なるほど...
reference.docx が存在しない場合に生成するにしても, 中途半端でしたね
たしかにこの部分を削ってしまって
デフォルト設定で変換して, 出力後のファイルをいじってもらうほうが良さそうですね
scripts/mdtodocx
Outdated
| pandoc --print-default-data-file reference.docx > /workdir/reference.docx | ||
| fi | ||
| pandoc -s -N ${str%.*}.md --webtex -t html \ | ||
| --metadata pagetitle=${str%.*}.md \ |
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.
ページタイトルに .md という文字列を追加する必要ってありますか?
${str%.*} だけのほうがスッキリして良さそうに感じます。
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.
また、Markdown 上で
---
title: 'PDFの変換例'
---と書くことでタイトルを変更できるので、ユーザ側が自由にタイトルを設定できるようするために、強制的にファイル名をタイトルにする必要はないかなと感じます。
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.
ありがとうございます!
完全に見落としていました....
scripts/mdtohtml
Outdated
| #!/bin/bash | ||
| str=$1 | ||
| pandoc -s -N ${str%.*}.md --webtex -o ${str%.*}.html \ | ||
| --metadata pagetitle=${str%.*}.md \ |
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.
ここも上と同様です。
|
指摘部分を修正しました! |
scripts/mdtodocx
Outdated
| @@ -0,0 +1,7 @@ | |||
| #!/bin/bash | |||
| str=$1 | |||
| FILE="reference.docx" | |||
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.
この変数宣言消し忘れてますね
| FILE="reference.docx" |
p1ass
left a comment
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.
修正ありがとうございます!
良さそうです 👍
最後にrebaseしてcommitをまとめて、PRのタイトルをしっかりとしたものに変えてもらって良いですか?
|
レビューありがとうございます!! ;) |
p1ass
left a comment
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.
LGTM 👍
mdtohtml, mdtodocx それぞれの w-mdtohtml, w-mdtodocx を追加しました
latex の変換は --weblatex オプションから, Google Chart APIで画像に変換しています