Skip to content

Instantly share code, notes, and snippets.

@Daiz
Last active April 23, 2024 09:19
Show Gist options
  • Star 28 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Daiz/bb8424cfedd0f05b7386 to your computer and use it in GitHub Desktop.
Save Daiz/bb8424cfedd0f05b7386 to your computer and use it in GitHub Desktop.

Manga Naming Scheme

This document defines filename schemes for digital manga content consisting of image files (pages) inside archives. Rules are defined for how to name both the archive files and the image files inside said archives.

Goals

  • Filenames should always sort properly in chronological chapter order under any and all circumstances.
  • Filenames should never have to be renamed after release to ensure proper sorting.
  • No guessing should ever be necessary when naming files.
  • All filenames should be machine-parseable in a reasonable manner.
  • One should be able to repack multiple archives together.
  • One should be able to repack compilation archives back into separate archives.
  • In other words, repacking should always be a lossless operation information-wise.

Archive Names

Name of Manga [lang] - c000-000 x0 (mag/mix/v00-00) [Extra Information] [Group]{revision}.zip

  • Name of Manga is required. A full title must always be used. New releases must use the same title as older releases. For first releases with no older releases to go by, here is how the title should be decided:
    • Japanese should be romanized with Hepburn romanization. Long vowels (ō, ū, etc) are to be written without macrons (ou, uu, etc).
    • Non-Japanese katakana words should be romanized to the matching language (eg. レールガン should become "Railgun").
    • If a kanji is given a foreign katakana reading, the previous also applies (eg. 超電磁砲 read as レールガン should be "Railgun", not "Choudenjihou")
    • If the series has a canonical English / Western name from the original author(s) to go with its Japanese kanji title, it should be used instead of romanizing the Japanese kanji. Examples:
      • シドニアの騎士 should use "Knights of Sidonia", not "Sidonia no Kishi"
      • 蒼き鋼のアルペジオ should use "Arpeggio of Blue Steel", not "Aoki Hagane no Arpeggio"
      • 鋼の錬金術師 should use "Fullmetal Alchemist", not "Hagane no Renkinjutsushi"
      • 進撃の巨人 should use "Attack on Titan", not "Shingeki no Kyojin"
    • Title Case should be used for capitalization.
  • [lang] is a three-letter ISO-639-2 language code required for Non-English releases. English releases are required to omit this.
  • c000 chapter number is required. If multiple chapters are included (eg. if you are doing a full volume release), the range must be indicated with the -000. Chapter numbers must be padded to three digits minimum.
    • If a series start with no clear chapter numbering of its own, the c must be dropped so that only numbers remain.
    • Oneshots should be numbered as 000, with no c in front. [Extra Information] stating that it is a oneshot should be included.
    • If the series starts using clear chapter numbers at some point afterwards, then the c must be reintroduced.
    • If chapter numbers go into four digits, the c must be changed into d to ensure correct sorting.
    • With chapter ranges, the second number must not have any unit associated with it, unless a numbering system transition happens.
    • Examples:
    Some Oneshot That Gets Serialized - 000 (mag) [Oneshot] [Group].zip
    Some Oneshot That Gets Serialized - c001 (mag) [Group].zip
    Some Oneshot That Gets Serialized - c002 (mag) [Group].zip
    
    Unnumbered Initial Chapters - 001-003 (v01) [Group].zip
    Unnumbered Initial Chapters - 009-014 (v04) [Group].zip
    Unnumbered Initial Chapters - 015-c006 (v05) [Group].zip
    Unnumbered Initial Chapters - c007-016 (v06) [Group].zip
    
    Very Large Chapter Numbers - c998 (mag) [Group].zip
    Very Large Chapter Numbers - c999 (mag) [Group].zip
    Very Large Chapter Numbers - d1000 (mag) [Group].zip
    Very Large Chapter Numbers - d1001 (mag) [Group].zip
    
    Very Large Chapter Numbers Bunched - c986-995 (v98) [Group].zip
    Very Large Chapter Numbers Bunched - c996-d1005 (v99) [Group].zip
    Very Large Chapter Numbers Bunched - d1006-1015 (v99) [Group].zip
    
    Very Unrealistic But Technically Possible - 000-d1500 (mag) [Group].zip
  • x0 is intended to be used with chapters that deviate from a clear numbering system (eg. decimal chapter numbers like 10.5) already in place and must be used for these, and must be left out for regular chapters. [Extra Information] is recommended in these cases to specify the type of the chapter. If sequential special chapters go beyond one digit, x is to be changed to y. In the rare case of specials going to three digits in the same sequence, z is to be used. Examples:
    Serialized in Two Magazines - c001 (mag) [Magazine One] [Group].zip
    Serialized in Two Magazines - c001 x1 (mag) [Magazine Two] [Group].zip
    Serialized in Two Magazines - c002 (mag) [Magazine One] [Group].zip
    Serialized in Two Magazines - c002 x1 (mag) [Magazine Two] [Group].zip
    
    Lots of Bonus Chapters - c014 (mag) [Group].zip
    Lots of Bonus Chapters - c014 x1 (mag) [Extra] [Group].zip
    Lots of Bonus Chapters - c014 x2 (mag) [Special Arc 1] [Group].zip
    Lots of Bonus Chapters - c014 x3 (mag) [Special Arc 2] [Group].zip
    Lots of Bonus Chapters - c014 x4 (mag) [Special Arc 3] [Group].zip
    Lots of Bonus Chapters - c014 x5 (mag) [Special Arc 4] [Group].zip
    Lots of Bonus Chapters - c015  (mag) [Group].zip
    Lots of Bonus Chapters - c015 x1 (mag) [Extra] [Group].zip
    
    Way Too Much Bonus Chapters - c020 x8 (v04) [Group].zip
    Way Too Much Bonus Chapters - c020 x9 (v04) [Group].zip
    Way Too Much Bonus Chapters - c020 y10 (v04) [Group].zip
    Way Too Much Bonus Chapters - c020 y11 (v04) [Group].zip
  • (mag) or (v00) or (mix) is required - all magazine scans must use the first one, all tankoubon scans must use the second, with the appropriate volume number, and any mixed content containing pages from both magazines and volumes must use the third option. Volume numbers are unallowed for magazine scans. If multiple volumes are included in a single archive, the range must be indicated with the -00. However, this is not recommended. The range is required not to include an unit unless a range transition happens, ie. v99-w100. Volume numbers must be padded to two digits minimum. If no volume number is present, (v00) must be used. If volume numbers go beyond two digits, v is to be changed to w to ensure proper sorting.
  • [Extra Information] is optional.
  • [Group] is required. If group is not known, [Unknown] must be used.
  • {revision} is optional. Recommended formatting is either {r0} or {v0}.
  • .zip A file extension is required. Zip is the recommended archive format due to its universality.

Examples (In natural sorting order)

Name of Manga - 000 (mag) [Oneshot from Comic Q] [Unknown].zip
Name of Manga - c001-005 x1 (v01) [Unknown].zip
Name of Manga - c006-010 (v02) [FooScans].zip
Name of Manga - c010 x1 (v02) [Omake] [FooScans].zip
Name of Manga - c011 (v03) [FooScans].zip
Name of Manga - c012-013 (mag) [BarScans].zip
Name of Manga - c014 (mag) [BarScans].zip
Name of Manga - c014 (mag) [BarScans]{v2}.zip
Name of Manga - c015 (mag) [BarScans].zip
Name of Manga - c015 x1 (v03) [Omake] [FooScans].zip
Name of Manga - c015 x2 (v03) [Extras] [FooScans].zip
Name of Manga - c016-020 x1 (v04) [FooScans].zip
Name of Manga [jpn] - c011-015 x2 (v03) [Unknown].zip
Name of Manga [jpn] - c014 (mag) [Unknown].zip

Page Names

This will define how to name individual pages inside archives. To be added.

uppercase = "A" | "B" | "C" | "D" | "E" | "F" | "G" | "H" | "I"
| "J" | "K" | "L" | "M" | "N" | "O" | "P" | "Q" | "R"
| "S" | "T" | "U" | "V" | "W" | "X" | "Y" | "Z" ;
lowercase = "a" | "b" | "c" | "d" | "e" | "f" | "g" | "h" | "i"
| "j" | "k" | "l" | "m" | "n" | "o" | "p" | "q" | "r"
| "s" | "t" | "u" | "v" | "w" | "x" | "y" | "z" ;
digit = "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" ;
symbol = "{" | "}" | "(" | ")" | "&" | "!"
| "'" | "=" | "." | "," | ";" | "_" ;
brackets = "[" | "]" ;
dash = "-" ;
space = " " ;
character = uppercase | lowercase | digit | symbol | brackets ;
groupchar = uppercase | lowercase | digit | symbol ;
extchar = uppercase | lowercase | digit ;
num1 = 1 * digit ;
num2 = 2 * digit ;
num3 = 3 * digit ;
num4 = 4 * digit ;
name = character, { character | space } ;
language = space, "[", 3 * lowercase, "]" ;
separator = space, dash, space ;
cnum = "c", num3 ;
dnum = "d", num4 ;
chapter = num3 | cnum | dnum
| num3, "-", num3 | num3, "-", cnum | num3, "-", dnum
| cnum, "-", num3 | cnum, "-", dnum
| dnum, "-", num4 ;
special = space, ("x", num1 | "y", num2 | "z", num3) ;
magazine = "mag" ;
mixed = "mix" ;
vnum = "v", num2 ;
wnum = "w", num3 ;
volume = vnum | wnum
| vnum, "-", num2 | vnum, "-", wnum
| wnum, "-", num3 ;
publication = "(", (magazine | mixed | volume), ")" ;
extra = space, "[", character, { character | space }, "]" ;
group = "[", groupchar, { groupchar | space }, "]" ;
revision = "{", ("r" | "v"), digit, { digit }, "}" ;
extension = ".", extchar, 11 * [extchar] ;
scheme = name, [language], separator
, chapter, [special], space, publication
, [extra], space, group, [revision], extension ;
@fake-name
Copy link

Are you accepting comments?

One thing I would STRONGLY suggest is to use the name MangaUpdates has for a series.

Having yet another name makes things much harder to cross-reference. Treat the MangaUpdates naming convention as the bible.

Right now, I'm working on an automated system that does cross-correlation between MangaUpdates and various hosting sites, and it's a fucking nightmare, requiring lots of manual intervention.

Adding yet another naming scheme for each series is a terrible idea.

( I should probably add that I'm the guy talking about scraping large portions of the entire MangaUpdates database metadata in the #tradersnetwork IRC channel. Once it's done, I'll post a SQL dump of the data somewhere available, if you're interested. I'm currently scraping BaseName, alternate names, genre, categories, author, artist and description for every series listed on MangaUpdates.)

I also have a 1/5 complete MangaTraders mirror if I can contribute there as well.

@fake-name
Copy link

Oh, for what it's worth, I have basically the entire dataset of MangaUpdates manga names at this point (98K series, with all ~302K names in total), in a database. I can upload a SQLdump somewhere if you want.

@fake-name
Copy link

@kunaldes
Copy link

For the ISO-639-2 language code, is it 639-2/T or 639-2/B?

@averms
Copy link

averms commented May 16, 2020

@fake-name maybe try the repo: https://github.com/Daiz/manga-naming-scheme
I think this gist is outdated

@fake-name
Copy link

fake-name commented May 16, 2020

Lol, it wasn't in 2014 when I made that comment, man!

Way to comment necro.

@averms
Copy link

averms commented May 16, 2020

maybe you still care?

@fake-name
Copy link

Maybe I don't? And if I did, maybe I found it myself?

@averms
Copy link

averms commented May 16, 2020

My guy you are getting extremely heated about a GitHub notification 😆

@fake-name
Copy link

Lol, 2 comments is extremely heated?

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