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

Add support for specifying target metadata in cli #675

Closed
wants to merge 1 commit into from

Conversation

FritzHeiden
Copy link

@FritzHeiden FritzHeiden commented Feb 15, 2024

This adds a new cli parameter to manually specify metadata to be added to the target file. The metadata is specified as follows: --metadata "title=My Comic;author=The Author"

; and = can be used in values by escaping them with \

I only tested this by converting cbz to epub and mobi.

Relates to issue #673

@Ari-03
Copy link

Ari-03 commented Feb 21, 2024

This works great

@axu2
Copy link
Collaborator

axu2 commented Mar 10, 2024

Why not --author --title --summary instead of parsing a long string? The parsing could cause issues and I've never seen a CLI like that.

Maybe like

Also, is modifying ComicInfo.xml an option?

@FritzHeiden FritzHeiden mentioned this pull request Mar 12, 2024
@FritzHeiden
Copy link
Author

Why not --author --title --summary instead of parsing a long string? The parsing could cause issues and I've never seen a CLI like that.

Maybe like

* [New arguments to CLI #561](https://github.com/ciromattia/kcc/pull/561)

I don't have a strong opinion on this. I also use comictagger, which does it like this aswell. Also, this is more flexible in case of adding more metadata fields.

Also, is modifying ComicInfo.xml an option?

It is not. While ComicInfo.xml has separate fields for series title, volume number and volume title, mobi only has title. So I combine the three fields into one, e.g.: "One Piece 1: Romance Dawn"
Without this I only get the title "Romance Dawn".

@quantumicrowave
Copy link

will this get merged soon?

@axu2
Copy link
Collaborator

axu2 commented Mar 13, 2024

To preface, I'm not a CLI user and don't edit metadata, so excuse me if I say anything uninformed.

I see, indeed that's how the ComicTagger CLI works. https://github.com/comictagger/comictagger/wiki/UserGuide#cli-user-guide. I'm not sure how I feel about owning parsing code however.

Is there anything wrong with naming a title like One Piece 1: Romance Dawn? Instead of just romance dawn? Because you might want to pad zeros on the volume number like v001.

I understand that author is an important field for some since it shows up in Kindle UI. @gonsanbo Do you care most about author or all the fields?

And is summary used anywhere in the Kindle UI? Maybe we could simplify with just an --author tag.

@quantumicrowave
Copy link

And is summary used anywhere in the Kindle UI? Maybe we could simplify with just an --author tag.

I've looked around in my Kindle and I couldn't find any mention of the summary, so honestly yeah --author tag would work great

@axu2
Copy link
Collaborator

axu2 commented Mar 13, 2024

@gonsanbo is there anything wrong with using comictagger or builtin kcc metadata editor to add author field?

@quantumicrowave
Copy link

I can't use the inbuilt editor because I was writing a script to automate the process but I didn't know about comictagger, I'll try using that, thanks :)

@axu2
Copy link
Collaborator

axu2 commented Mar 14, 2024

@gonsanbo let me know how it works, if it modifies the source file that might be problematic for some workflows and an --author tag might be really convenient.

We already have a --title tag.

@quantumicrowave
Copy link

@axu2 well I tried comictagger and its working on my script. Only disadvantage is I have to copy source files instead of hardlinking them since it edits the files, but its alright. I wouldn't mind an --author tag if it ever gets merged

@axu2
Copy link
Collaborator

axu2 commented Mar 16, 2024

Try the build in

to see if it works for you.

Edit: closing for now, if you need more than author feel free to re-open.

@axu2 axu2 closed this Apr 16, 2024
@hvmzx
Copy link

hvmzx commented Apr 28, 2024

Try the build in

to see if it works for you.

Edit: closing for now, if you need more than author feel free to re-open.

series would be a nice addition especially when you organise your ebooks and you want them grouped together by series like One Piece, Blue Lock, Berserk ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants