kerrickstaley / genanki

A Python 3 library for generating Anki decks
MIT License
1.99k stars 150 forks source link

Media files path #19

Closed nashgc closed 5 years ago

nashgc commented 5 years ago
- Change Media Files section
    modified:   README.md
- Add media_path to write_to_file func
modified:   genanki/__init__.py
Kentoseth commented 5 years ago

Is this PR in progress?

Would be really useful for relative paths to media items

mkroening commented 5 years ago

Sorry for pinging! This feature would be very useful to me.

Is there anything I can do to make this PR progress?

kerrickstaley commented 5 years ago

@mwkroening I'm planning on making it so that you can set arbitrary paths in media_files, not just files in the local directory. I think that will achieve the same thing as this PR but in a more general way. However, when working on this change I found an issue in the unit tests that I'm still debugging. So it will take a few more days. For now, you can pull this branch and use python3 setup.py install to install it locally.

mkroening commented 5 years ago

Thanks a lot for your work, @kerrickstaley! I will try it.

kerrickstaley commented 5 years ago

@nashgc @mwkroening @Kentoseth I just merged this PR to allow passing arbitrary media file paths (so media files don't have to be in the current working directory): https://github.com/kerrickstaley/genanki/pull/32

Does this work for you? I will publish a new version to PyPI in the next day or so.

Going to close this PR since it's redundant with the one I just merged.

mkroening commented 5 years ago

Sorry for taking so long to answer, but this is working like a charm for me in marugoto-scraper. :)