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

[feature-request] Adding series data to generated ebook file #8

Open
Hamitamaru opened this issue Mar 18, 2018 · 0 comments
Open

[feature-request] Adding series data to generated ebook file #8

Hamitamaru opened this issue Mar 18, 2018 · 0 comments

Comments

@Hamitamaru
Copy link

First I'd like to say great job with this, really useful.

I have a feature request to add series metadata to the generated ebook files.
This should make it easier for Calibre to manage the automatic collection generation based on the added series metadata.

I think that it would take adding to this block of code:
https://github.com/aplanas/kmanga/blob/master/mobi/mobi.py#L554-L560

The following:

ET.SubElement(metadata, 'meta', {
    'property': 'calibre:series'
}).text =  self.info.series_name

if isAcceptableCalibreSeriesIndex(self.info.number_in_series):
    ET.SubElement(metadata, 'meta', {
        'property': 'calibre:series_index'
    }).text = self.info.number_in_series

isAcceptableCalibreSeriesIndex returns true if it is a parse-able number else false. I'm not sure what happens in Calibre if you started creating books with "13a" for a series_index though it looks like "11.1" and such is supported (ref: https://manual.calibre-ebook.com/template_lang.html and search "If you use series indices with sub values (e.g., 1.1)")

You would also need to expose these new properties on MobiInfo here:

def __init__(self, issue, multi_vol=False, vol=None, total_vols=1):

I think the right value for each is probably series_name = issue.manga.name and number_in_series = issue.number

You may also be interested in adding the Mobi3 standard series metadata which is shown here:
dteviot/WebToEpub#1
Though not sure if anyone would immediately benefit.

Thanks, hope you can add this feature.

@Hamitamaru Hamitamaru changed the title Adding series data to generated ebook file [feature-request] Adding series data to generated ebook file Mar 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants