Coverage for odmpy/constants.py: 100.0%

7 statements  

« prev     ^ index     » next       coverage.py v7.3.1, created at 2023-09-14 08:51 +0000

1# Copyright (C) 2021 github.com/ping 

2# 

3# This file is part of odmpy. 

4# 

5# odmpy is free software: you can redistribute it and/or modify 

6# it under the terms of the GNU General Public License as published by 

7# the Free Software Foundation, either version 3 of the License, or 

8# (at your option) any later version. 

9# 

10# odmpy is distributed in the hope that it will be useful, 

11# but WITHOUT ANY WARRANTY; without even the implied warranty of 

12# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 

13# GNU General Public License for more details. 

14# 

15# You should have received a copy of the GNU General Public License 

16# along with odmpy. If not, see <http://www.gnu.org/licenses/>. 

17# 

18 

19# 

20# Constants mainly for use with the legacy ODM processing 

21# 

22 

23OMC = "1.2.0" 

24OS = "10.11.6" 

25UA = "OverDrive Media Console" 

26UA_LONG = "OverDrive Media Console/3.7.0.28 iOS/10.3.3" 

27 

28PERFORMER_FID = b"TPE3" 

29LANGUAGE_FID = b"TLAN" 

30 

31# Ref: https://github.com/ping/odmpy/issues/19 

32UNSUPPORTED_PARSER_ENTITIES = { 

33 # https://www.freeformatter.com/html-entities.html#iso88591-characters 

34 "Agrave": "À", 

35 "Aacute": "Á", 

36 "Acirc": "Â", 

37 "Atilde": "Ã", 

38 "Auml": "Ä", 

39 "Aring": "Å", 

40 "AElig": "Æ", 

41 "Ccedil": "Ç", 

42 "Egrave": "È", 

43 "Eacute": "É", 

44 "Ecirc": "Ê", 

45 "Euml": "Ë", 

46 "Igrave": "Ì", 

47 "Iacute": "Í", 

48 "Icirc": "Î", 

49 "Iuml": "Ï", 

50 "ETH": "Ð", 

51 "Ntilde": "Ñ", 

52 "Ograve": "Ò", 

53 "Oacute": "Ó", 

54 "Ocirc": "Ô", 

55 "Otilde": "Õ", 

56 "Ouml": "Ö", 

57 "Oslash": "Ø", 

58 "Ugrave": "Ù", 

59 "Uacute": "Ú", 

60 "Ucirc": "Û", 

61 "Uuml": "Ü", 

62 "Yacute": "Ý", 

63 "THORN": "Þ", 

64 "szlig": "ß", 

65 "agrave": "à", 

66 "aacute": "á", 

67 "acirc": "â", 

68 "atilde": "ã", 

69 "auml": "ä", 

70 "aring": "å", 

71 "aelig": "æ", 

72 "ccedil": "ç", 

73 "egrave": "è", 

74 "eacute": "é", 

75 "ecirc": "ê", 

76 "euml": "ë", 

77 "igrave": "ì", 

78 "iacute": "í", 

79 "icirc": "î", 

80 "iuml": "ï", 

81 "eth": "ð", 

82 "ntilde": "ñ", 

83 "ograve": "ò", 

84 "oacute": "ó", 

85 "ocirc": "ô", 

86 "otilde": "õ", 

87 "ouml": "ö", 

88 "oslash": "ø", 

89 "ugrave": "ù", 

90 "uacute": "ú", 

91 "ucirc": "û", 

92 "uuml": "ü", 

93 "yacute": "ý", 

94 "thorn": "þ", 

95 "yuml": "ÿ", 

96 # https://www.freeformatter.com/html-entities.html#iso88591-symbols 

97 "nbsp": " ", 

98 "iexcl": "¡", 

99 "cent": "¢", 

100 "pound": "£", 

101 "curren": "¤", 

102 "yen": "¥", 

103 "brvbar": "¦", 

104 "sect": "§", 

105 "uml": "¨", 

106 "copy": "©", 

107 "ordf": "ª", 

108 "laquo": "«", 

109 "not": "¬", 

110 "shy": "­", 

111 "reg": "®", 

112 "macr": "¯", 

113 "deg": "°", 

114 "plusmn": "±", 

115 "sup2": "²", 

116 "sup3": "³", 

117 "acute": "´", 

118 "micro": "µ", 

119 "para": "¶", 

120 "cedil": "¸", 

121 "sup1": "¹", 

122 "ordm": "º", 

123 "raquo": "»", 

124 "frac14": "¼", 

125 "frac12": "½", 

126 "frac34": "¾", 

127 "iquest": "¿", 

128 "times": "×", 

129 "divide": "÷", 

130 # https://www.freeformatter.com/html-entities.html#math-symbols 

131 "forall": "∀", 

132 "part": "∂", 

133 "exist": "∃", 

134 "empty": "∅", 

135 "nabla": "∇", 

136 "isin": "∈", 

137 "notin": "∉", 

138 "ni": "∋", 

139 "prod": "∏", 

140 "sum": "∑", 

141 "minus": "−", 

142 "lowast": "∗", 

143 "radic": "√", 

144 "prop": "∝", 

145 "infin": "∞", 

146 "ang": "∠", 

147 "and": "∧", 

148 "or": "∨", 

149 "cap": "∩", 

150 "cup": "∪", 

151 "int": "∫", 

152 "there4": "∴", 

153 "sim": "∼", 

154 "cong": "≅", 

155 "asymp": "≈", 

156 "ne": "≠", 

157 "equiv": "≡", 

158 "le": "≤", 

159 "ge": "≥", 

160 "sub": "⊂", 

161 "sup": "⊃", 

162 "nsub": "⊄", 

163 "sube": "⊆", 

164 "supe": "⊇", 

165 "oplus": "⊕", 

166 "otimes": "⊗", 

167 "perp": "⊥", 

168 "sdot": "⋅", 

169 # https://www.freeformatter.com/html-entities.html#greek-letters 

170 "Alpha": "Α", 

171 "Beta": "Β", 

172 "Gamma": "Γ", 

173 "Delta": "Δ", 

174 "Epsilon": "Ε", 

175 "Zeta": "Ζ", 

176 "Eta": "Η", 

177 "Theta": "Θ", 

178 "Iota": "Ι", 

179 "Kappa": "Κ", 

180 "Lambda": "Λ", 

181 "Mu": "Μ", 

182 "Nu": "Ν", 

183 "Xi": "Ξ", 

184 "Omicron": "Ο", 

185 "Pi": "Π", 

186 "Rho": "Ρ", 

187 "Sigma": "Σ", 

188 "Tau": "Τ", 

189 "Upsilon": "Υ", 

190 "Phi": "Φ", 

191 "Chi": "Χ", 

192 "Psi": "Ψ", 

193 "Omega": "Ω", 

194 "alpha": "α", 

195 "beta": "β", 

196 "gamma": "γ", 

197 "delta": "δ", 

198 "epsilon": "ε", 

199 "zeta": "ζ", 

200 "eta": "η", 

201 "theta": "θ", 

202 "iota": "ι", 

203 "kappa": "κ", 

204 "lambda": "λ", 

205 "mu": "μ", 

206 "nu": "ν", 

207 "xi": "ξ", 

208 "omicron": "ο", 

209 "pi": "π", 

210 "rho": "ρ", 

211 "sigmaf": "ς", 

212 "sigma": "σ", 

213 "tau": "τ", 

214 "upsilon": "υ", 

215 "phi": "φ", 

216 "chi": "χ", 

217 "psi": "ψ", 

218 "omega": "ω", 

219 "thetasym": "ϑ", 

220 "upsih": "ϒ", 

221 "piv": "ϖ", 

222 # https://www.freeformatter.com/html-entities.html#misc-html-entities 

223 "OElig": "Œ", 

224 "oelig": "œ", 

225 "Scaron": "Š", 

226 "scaron": "š", 

227 "Yuml": "Ÿ", 

228 "fnof": "ƒ", 

229 "circ": "ˆ", 

230 "tilde": "˜", 

231 "ensp": " ", 

232 "emsp": " ", 

233 "thinsp": " ", 

234 "zwnj": "‌", 

235 "zwj": "‍", 

236 "lrm": "‎", 

237 "rlm": "‏", # pylint: disable=(bidirectional-unicode 

238 "ndash": "–", 

239 "mdash": "—", 

240 "lsquo": "‘", 

241 "rsquo": "’", 

242 "sbquo": "‚", 

243 "ldquo": "“", 

244 "rdquo": "”", 

245 "bdquo": "„", 

246 "dagger": "†", 

247 "Dagger": "‡", 

248 "bull": "•", 

249 "hellip": "…", 

250 "permil": "‰", 

251 "prime": "′", 

252 "Prime": "″", 

253 "lsaquo": "‹", 

254 "rsaquo": "›", 

255 "oline": "‾", 

256 "euro": "€", 

257 "trade": "™", 

258 "larr": "←", 

259 "uarr": "↑", 

260 "rarr": "→", 

261 "darr": "↓", 

262 "harr": "↔", 

263 "crarr": "↵", 

264 "lceil": "⌈", 

265 "rceil": "⌉", 

266 "lfloor": "⌊", 

267 "rfloor": "⌋", 

268 "loz": "◊", 

269 "spades": "♠", 

270 "clubs": "♣", 

271 "hearts": "♥", 

272 "diams": "♦", 

273}