Skip to content

Instantly share code, notes, and snippets.

@Dracon23
Last active May 22, 2022 02:24
Show Gist options
  • Save Dracon23/215e272dc114adc3044c6ab8d81ce0e2 to your computer and use it in GitHub Desktop.
Save Dracon23/215e272dc114adc3044c6ab8d81ce0e2 to your computer and use it in GitHub Desktop.
Draft CBL format
<?xml version="1.0"?>
<ReadingList xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Name>Example Reading list</Name>
<Books>
<Book Series="Awesome Name" Number="24" Volume="2200" Year="2200">
<IssueID>45678987654</IssueID>
<ComicID>3456789</ComicID>
<Event Name="Superreal Event" Position="1">
<EventID>1248237528354</EventID>
</Event>
</Book>
<Book Series="Awesome Name" Number="25" Volume="2200" Year="2200">
<IssueID>45678987777</IssueID>
<ComicID>3456789</ComicID>
<Event Name="Superreal Event" Position="2">
<EventID>1248237528354</EventID>
</Event>
</Book>
</Books>
<Matchers />
</ReadingList>
@DieselTech
Copy link

DieselTech commented May 21, 2022

Would it make sense to have the Event tag higher up in the order to denote a large event rather than repeating it for each book?

<Name>Example Reading list</Name>
  <Books>
     <Event Name="Superreal Event" Position="1">
        <EventID>1248237528354</EventID>
          <Book Series="Awesome Name" Number="24" Volume="2200" Year="2200">
               <IssueID>45678987654</IssueID>
               <ComicID>3456789</ComicID>
          </Book>
     </Event>

That way we don't have to open and close the event tags hundreds of times. I think it would also make it slightly easier for human reading to find which books are in said event.

@Dracon23
Copy link
Author

Would it make sense to have the Event tag higher up in the order to denote a large event rather than repeating it for each book?

While it makes sense in context of a list containing a single event, consider producing one for a series, which might reference multiple events over their runtime.

@jakem742
Copy link

I'm also not sure how that would affect parsing? Having events as a sub-tag of "Book" means that a parser can easily grab all books because they're at the same level. If you introduce an intermediate level I'm not sure how that affects XML parsing scripts.

@jakem742
Copy link

I'm thinking it's best to organise everything by book and try to keep them as a self-contained object with all info internal

@flips22
Copy link

flips22 commented May 22, 2022

Should we add publication month along with the year. That will help with series with the same volume year if we remove CV IDs at some point.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment