Commit 07e0534
renaud gaudin
WIP: Switch to Illustration API
Creator `set_faviconpath(path)` is now replaced with `add_illustration(size, content)`
which instead of recording the path of a Favicon Entry, receives the bytes of a PNG
image for a specific size (adding a 48 sized one being mandatory as per zim spec.)
Archive `has_favicon_entry` is replaced with `has_illustration(size=None)`
Archive `favicon_entry` is replaced with `get_illustration_item(size=None)`
Size is optionnal and defaults to 48 in libzim.
Note that we used to retrieve an Entry and now receive an Item.
Additionnaly, Archive gets a `get_illustration_sizes()` which returns a set of int sizes
for which an illustration is present.
WARNING: this is not implemented ATM and simply return a set with 48 regarless of what's
currently in the ZIM.1 parent 3bb9cfe commit 07e0534
File tree
5 files changed
+55
-41
lines changed- libzim
- tests
5 files changed
+55
-41
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
84 | | - | |
85 | | - | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
86 | 90 | | |
87 | 91 | | |
88 | 92 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
72 | | - | |
| 72 | + | |
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
| |||
144 | 144 | | |
145 | 145 | | |
146 | 146 | | |
147 | | - | |
| 147 | + | |
| 148 | + | |
148 | 149 | | |
149 | 150 | | |
150 | 151 | | |
151 | 152 | | |
152 | 153 | | |
153 | 154 | | |
154 | 155 | | |
155 | | - | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
156 | 159 | | |
157 | 160 | | |
158 | 161 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
34 | 35 | | |
35 | 36 | | |
36 | 37 | | |
| |||
240 | 241 | | |
241 | 242 | | |
242 | 243 | | |
243 | | - | |
244 | | - | |
245 | | - | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
246 | 247 | | |
247 | 248 | | |
248 | 249 | | |
| |||
561 | 562 | | |
562 | 563 | | |
563 | 564 | | |
564 | | - | |
565 | | - | |
566 | | - | |
567 | | - | |
568 | | - | |
569 | | - | |
570 | | - | |
571 | | - | |
572 | 565 | | |
573 | 566 | | |
574 | 567 | | |
| |||
605 | 598 | | |
606 | 599 | | |
607 | 600 | | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
608 | 621 | | |
609 | 622 | | |
610 | 623 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
331 | 331 | | |
332 | 332 | | |
333 | 333 | | |
334 | | - | |
335 | | - | |
336 | | - | |
337 | | - | |
338 | | - | |
339 | | - | |
340 | | - | |
341 | | - | |
342 | | - | |
343 | | - | |
344 | | - | |
345 | | - | |
346 | | - | |
347 | | - | |
348 | | - | |
| 334 | + | |
349 | 335 | | |
350 | | - | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
351 | 339 | | |
352 | | - | |
353 | | - | |
354 | | - | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
355 | 346 | | |
356 | 347 | | |
357 | 348 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
318 | 318 | | |
319 | 319 | | |
320 | 320 | | |
321 | | - | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
322 | 325 | | |
323 | | - | |
324 | | - | |
| 326 | + | |
| 327 | + | |
325 | 328 | | |
326 | | - | |
| 329 | + | |
327 | 330 | | |
328 | | - | |
| 331 | + | |
329 | 332 | | |
330 | 333 | | |
331 | 334 | | |
| |||
438 | 441 | | |
439 | 442 | | |
440 | 443 | | |
441 | | - | |
| 444 | + | |
442 | 445 | | |
443 | 446 | | |
444 | 447 | | |
| |||
0 commit comments