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 a reading direction to ComicInfo #40

Open
Belphemur opened this issue Apr 10, 2023 · 15 comments
Open

Add a reading direction to ComicInfo #40

Belphemur opened this issue Apr 10, 2023 · 15 comments

Comments

@Belphemur
Copy link

Belphemur commented Apr 10, 2023

Where does this comes from?

Hello,
Currently, the Manga element has the value Yes and YesAndRightToLeft.

I suggest adding a new element to replace the option "YesAndRightToLeft" (credit to @ajslater).

ReadingDirection that will have as options LeftToRight, RightToLeft, TopToBottom, BottomToTop.
Also with a True/False or Yes/No attribute for Continuous. To provide information to any reader how should the content be displayed.

What is the rationale for adding support for this element?

Help any kind of reader what should be the default way to read the comic/manga. Will be especially useful for Webtoon that usually are TopToBottom and Continuous.

Is the element already handled by any application or tool?

No response

@ajslater
Copy link
Contributor

ajslater commented Apr 10, 2023

IMHO an element specifically for ReadingDirection with four states would be best for informing software how to present the comic. LeftToRight, RightToLeft, TopToBottom, BottomToTop. The Manga tag is partially overloaded for some of this already, but the Manga: "No" or "Yes" states by themselves don't really tell the presentation software anything useful.
An alternative might be two boolean elements. ReadingOrientation and ReadingDirection.

Software doesn't care if the origin of the publication was Marvel, Shueisha, or Tumblr, just how it should be read

@Belphemur
Copy link
Author

Belphemur commented Apr 10, 2023 via email

@gotson
Copy link
Member

gotson commented Apr 14, 2023

Given this is an Enum value, adding new values could be a breaking change, which we don't want to introduce.

@Belphemur
Copy link
Author

To be honest I prefer the solution of @ajslater.
I'll rephrase my request.

Adding a new object for reading direction make more sense.

@gotson
Copy link
Member

gotson commented Apr 15, 2023

IMHO an element specifically for ReadingDirection with four states would be best for informing software how to present the comic. LeftToRight, RightToLeft, TopToBottom, BottomToTop.

The limitation with that is that it doesn't define how the pages should flow. For instance you can't differentiate top to bottom page by page, and top to bottom continuous (webtoon).

I agree that using a new field would be beneficial, since the current Manga field is botched.

@Belphemur
Copy link
Author

Belphemur commented Apr 15, 2023 via email

@gotson
Copy link
Member

gotson commented Apr 15, 2023

Assuming that all top to bottom publications need to be read in a continuous way would limit the data model. There might also be some publications in LTR or RTL direction that are made to be read in a continuous manner.

In the end the consuming application will try its best to map the metadata to its actual capabilities.

@Belphemur
Copy link
Author

Belphemur commented Apr 15, 2023 via email

@Belphemur Belphemur changed the title Update Manga element to add Webtoon Add a reading direction to ComicInfo Apr 19, 2023
@Belphemur
Copy link
Author

I've updated my request with your suggestions @ajslater & @gotson

@ajslater
Copy link
Contributor

ajslater commented Apr 20, 2023

I've just noticed that the Readium WebPub (related to OPDS-2.0) spec's metadata schema has something similar to my proposal:

https://github.com/readium/webpub-manifest/blob/master/schema/metadata.schema.json#L107

    "readingProgression": {
      "type": "string",
      "enum": [
        "rtl",
        "ltr",
        "ttb",
        "btt",
        "auto"
      ],
      "default": "auto"
    },

I suppose i like ReadingDirection better, but maybe their abbreviated enums have merit? 'auto' seems a bit odd to me. I think i'd consider that case the same as the attribute being omitted.

@gotson
Copy link
Member

gotson commented Apr 20, 2023

i would not cater for whether it's paged or continuous though. I'm quite happy with the proposed change in the first post, we could have a complex type holding both values of reading direction and continuous scrolling preference.

@ajslater i don't think abbreviated enums bring a lot. It leaves a lot to interpretation, i would much prefer full values for clarity's sake. rtl and ltr may be easy to understand, but i don't think ttb and btt would be. auto probably means the client should handle it with its default reading settings, but in that case an absence of value is probably more explicit.

@Belphemur would you be able to send a PR that would solve this, do you think?

@gotson
Copy link
Member

gotson commented Apr 21, 2023

I've just bumped into https://readium.org/webpub-manifest/modules/presentation.html which may be of interest. Haven't had time to read in full yet though.

@ajslater
Copy link
Contributor

Yeah they farm out 'continuous' to the presentation extension schema. I've not thought deeply about what they consider part of the presentation schema and what they consider core metadata. There's probably a good argument that reading direction ('progression') is a presentation detail.

I've been implementing OPDS 2.0 for Codex recently on a lark, and I have to say I'm impressed. The OPDS 1.x schema shows its age, but the 2.0 draft spec, imho, is very well thought out. I may be slightly biased because it's pretty close to the Codex API, it seems to be a case of convergent evolution. I feel like I could replace the Codex API with OPDS 2.0 with only minor extensions.

OPDS 2.0 is missing a page by page API, like OPDS 1.2 has, but explicitly has facility for templated links in their search specification (which is not OpenSearch):

{
  "rel": "search",
  "href": "search{?query}", 
  "type": "application/opds+json", 
  "templated": true
}

They also have a specific “image” type link section, but using that for pages feels too comic specific for this publication schema.

A templated schema for pages would be fine. But also, I don’t think book pagination is as open ended as search and therefore might not require a template.
A specific ‘give me a page’ schema with optional legal min and max values and the likely mime-type of the returned page might even be better.

@ajslater
Copy link
Contributor

Woops. The latter half of that post is off topic. I'm actually in a separate discussion with gotson talking about comic server page streaming, OPDS 2.0 and synchronization.

@gotson gotson mentioned this issue Apr 23, 2023
@t0815
Copy link

t0815 commented Aug 23, 2024

@Belphemur im currently developing a cbz archive editor. There its possible to define your own fields which should be included in metadata. In addition you can specify how the value is handled. Meaning, you can set possible values for a certain key. This way, you are totally flexible regarding the potential data and values within the comicinfo.xml

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

No branches or pull requests

4 participants