GetRD / academic-file-converter

📚 Import Bibtex publications and Jupyter Notebook blog posts into your Markdown website or book. 将Bibtex转换为Markdown网站
https://docs.hugoblox.com/reference/content-types/#automatically-import-publications-from-bibtex
MIT License
363 stars 102 forks source link

Fix missing index md #75

Closed arichardson closed 4 years ago

arichardson commented 4 years ago

This can happen with the dry-run flag. Also fix the file not being closed.

This change was extracted from #67. Both issues were introduced in #68

arichardson commented 4 years ago

I just noticed that another pull request the same issue was also opened. If that one is going to be merged, I can rebase this on top of that.

jmuchovej commented 4 years ago

👋 @arichardson I see, I forgot about dry-run – but to that point – this makes more sense to only operate as such under a flag, rather than "if the file doesn't exist"? I say that because the .dump(...) of editFM will create the file.

Additionally, in #73, they were having troubles with their go/hugo installation. (This is what produced their errors, hugo wouldn't properly run due to go not being installed an being unable to run hugo ....

arichardson commented 4 years ago

@ionlights I've done this in the latest commit. Also #77 will skip the hugo invocation when dry_run is set to speed up unit tests.