HermesPasser / comic-pub

comic to epub converter
GNU General Public License v3.0
1 stars 0 forks source link

refactor process_cbz_imgs and OEBPSWriter #2

Open HermesPasser opened 3 years ago

HermesPasser commented 3 years ago

Part of what process_cbz_imgs does should be in OEBPSWriter and both are under a path hell, with a lot of path manipulations.

Would be nice to separate the rendition creation from the chapter logic so process_cbz_imgs would not need to care about keeping track of the toc name (that it gives to the writer)

suggestion: OEBPSWriter#new_chapter(chapter_name) should do the trick, any rendition added after this call would be under this chapter in toc, therefore its contents would be in /chapter_name/.xhml and imgs/chapter_name/.img

HermesPasser commented 2 years ago

need to draw a flow of the add_page method to to redesign it and move all image processing related bits to another place.