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

Question about ComicPageInfo Type, attribute Image #54

Open
t0815 opened this issue Feb 3, 2024 · 3 comments
Open

Question about ComicPageInfo Type, attribute Image #54

t0815 opened this issue Feb 3, 2024 · 3 comments

Comments

@t0815
Copy link

t0815 commented Feb 3, 2024

The Image- Attribute from ComicPageInfo -Type is currently defined as Int- Type.

<xs:complexType name="ComicPageInfo">
        <xs:attribute name="Image" type="xs:int" use="required"/>
        ...
    </xs:complexType>

Is that supposed to be the index within the archive? Or just the page number? Im wondering, because there are no real indices in Zip-Files, only if you just rename all files to the respective index (i.e. 1.jpg).

IMO it would make more sense, to define this as String, to represent the filename within the archive. In the implementation I'm currently using, I do use the Image -attribute to map the Page defined within the Pages -Array to the image filename in the archive.

But I guess for compatibility reasons, that could be a bad idea tho.

Or is KEY supposed to be the filename within the archive? I'm confused....
Altho, theoretically, the page number can just be derived from the item ordering within the index list.

At any rate: I think in the index there should be at some more fields:

  • Name of the file within the archive (including file extension),
  • A Unique ID,
  • (Page Number... altho, not really needed imo)
@ajslater
Copy link
Contributor

ajslater commented Feb 4, 2024

I think Image is supposed to be an index. It would be far clearer if it were called index.
I have no idea what Key is supposed to be. But since it's a string you could put filename in there and then BBB.jpg could have Image/index 0 and AAAA.jpg could have Image/index 1 and allow for custom ordering despite the alphanumeric order.

But since the ComicInfo project at Anansi has a major goal of being backwards compatible with ComicRack and other consumers of ComicInfo, I doubt this a changeable feature.

@t0815
Copy link
Author

t0815 commented Feb 4, 2024

yea, thanks. I figured as much too, since changing the attributes would break backwards compatibility. I did change my implementation as mentioned. Image -> page number (index), Key -> filename within archive.

@C0rn3j
Copy link

C0rn3j commented Sep 25, 2024

Can it please be documented that the Page->Image is an index that relates to the file's alphabetical sorting order?

https://github.com/anansi-project/comicinfo/blob/main/DOCUMENTATION.md#image

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

3 participants