gvellut / jncep

Command-line tool to generate EPUB files for J-Novel Club pre-pub novels
GNU General Public License v3.0
43 stars 11 forks source link

[Feature] Add synopsis as description to the epub #41

Closed olee closed 8 months ago

olee commented 12 months ago

As the title says, it would be awesome (at least for full volumes) to add the synopsis from JNC to the generated epub.

gvellut commented 12 months ago

Thank you for your feedback.

OK It can be added.

It should be relatively simple I think. The API response for a series and volume includes both a description and a shortDescription field so maybe have an option to handle either: description is the one shown on the website as the blurb. I think Calibre (and probably other readers) can use the dc:description field in the ePub for that.

While I am at it, it could be possible to add other metadata like tags.

olee commented 12 months ago

Well - I tried adding it there as you can see, but your idea to add even more metadata sounds good - there's no point in not grabbing all the data we can get 👍

gvellut commented 12 months ago

Thank you. I will test your patch and will try to add the tags (using multiple dc:subject fields) so I will keep the issue open until this is done.

olee commented 12 months ago

Cool - can you also give / add some instructions on how to run this locally? I just don't know how to call the cli 😅 I tried it like this but it just doesn't work for me: image

olee commented 12 months ago

@gvellut there's one more feature I'm interested in adding and might want to discuss that with you. Do you perhaps have a discord or something where I could reach out to you or do you prefer I just create an issue?

gvellut commented 12 months ago

To run on the command line, you have to use the -m switch to run as a module (it sets the PYTHONPATH differently than without) ie:

python -m jncep\jncep.py

As you suggest, I will add a section in the Readme about running locally.

For the new feature, I don't have a discord but it is fine if you create an issue here on Github. We can discuss the feature there.

olee commented 12 months ago

Does not seem to work for me:

❯ python -m jncep/jncep.py
E:\dev\projects\jncep\.venv\Scripts\python.exe: Error while finding module specification for 'jncep/jncep.py' (ModuleNotFoundError: No module named 'jncep/jncep'). Try using 'jncep/jncep' instead of 'jncep/jncep.py' as the module name.

❯ python -m jncep/jncep
E:\dev\projects\jncep\.venv\Scripts\python.exe: No module named jncep/jncep
gvellut commented 12 months ago

I misstyped: I meant python -m jncep.jncep