Skip to content

Instantly share code, notes, and snippets.

@HadrienGardeur
Last active April 16, 2025 16:52
Show Gist options
  • Save HadrienGardeur/212d66372ea7433f59591afae2c3a605 to your computer and use it in GitHub Desktop.
Save HadrienGardeur/212d66372ea7433f59591afae2c3a605 to your computer and use it in GitHub Desktop.
Examples for `contains` in RWPM and OPDS

Examples for contains

Comics

Unnamed chapter of a manga

"belongsTo": {
  "series": "Naruto"
},
"contains": {
  "chapter": 1
}

Named chapter of a manga

"belongsTo": {
  "series": "Naruto"
},
"contains": {
  "chapter": {
    "position": 1,
    "name": "Uzumaki Naruto!"
  }
}

Single episode of a webtoon without seasons

"belongsTo": {
  "series": "Solo Leveling"
},
"contains": {
  "episode": 1
}

Single episode of a webtoon with seasons

"belongsTo": {
  "series": {
    "name": "Solo Leveling",
    "season": 1
  }
},
"contains": {
  "episode": 1
}

Unnamed manga volume

"belongsTo": {
  "series": "Naruto"
},
"contains": {
  "volume": 1
}

Named manga volume

"belongsTo": {
  "series": "Naruto"
},
"contains": {
  "volume": {
    "position": 1,
    "name": "The Tests of the Ninja"
  }
}

Named manga volume with chapter details

"belongsTo": {
  "series": "Naruto"
},
"contains": {
  "volume": {
    "position": 1,
    "name": "The Tests of the Ninja",
    "chapter": [
      {
        "position": 1,
        "name": "Uzumaki Naruto!"
      },
      {
        "position": 2,
        "name": "Konohamaru"
      },
      {
        "position": 3,
        "name": "Enter Sasuke!"
      },
      {
        "position": 4,
        "name": "Hatake Kakashi!"
      },
      {
        "position": 5,
        "name": "Pride Goeth Before a Fall"
      },
      {
        "position": 6,
        "name": "Not Sasuke!"
      },
      {
        "position": 7,
        "name": "Kakashi's Decision"
      }
    ]
  }
}

Full season of a webtoon

"belongsTo": {
  "series": "Solo Leveling"
},
"contains": {
  "season": 1
}

Collected edition with unnamed volumes

"belongsTo": {
  "series": "Naruto"
},
"contains": {
  "volume": [1, 2]
}

Collected edition with named volumes

"belongsTo": {
  "series": "Naruto"
},
"contains": {
  "volume": [
    {
      "position": 1,
      "name": "The Tests of the Ninja"
    },
    {
      "position": 2,
      "name": "The Worst Client"
    }
  ]
}

Full series

"contains": {
  "series": "Naruto"
}

Newspapers & Magazines

Simple magazine issue

"belongsTo": {
  "magazine": "People"
},
"contains": {
  "issue": 52
}

Magazine issue with additional metadata and articles

"belongsTo": {
  "magazine": {
    "name": "People",
    "identifier": "urn:issn:0093-7673",
    "volume": 2023
  }
},
"contains": {
  "issue": {
   "position": 52,
   "article": [
     {
       "name": "Celebrities' Sweetest Wedding Memories"
     },
     {
       "name": "Murdered in the Bathtub?"
     },
     {
       "name": "Rihanna is Back!"
     },
     {
       "name": "The Unstoppable Sally Field!"
     }
   ]
}

Magazine containing chapters from various manga series

"belongsTo": {
  "magazine": {
    "name": "Weekly Shōnen Jump",
    "volume": 2024
  }
},
"contains": {
  "issue": {
    "position": 38,
    "chapter": [
      {
        "series": "Witch Watch"
        "position": 167,
        "name": "Enter the Animation"
      },
      {
        "series": "Kagurabachi"
        "position": 45,
        "name": "Imitate"
      },
      {
        "series": "One Piece"
        "position": 1123,
        "name": "The Void Fortnight"
      }
    ]
  }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment