@JimmXinu all right, I did it myself then -- while I was it I also implemented support for special title entries that allow a degree of customization (e.g. br-tags).
I still think that your code in its current form is really bad: in nearly all your files you have unused partial or even full module imports (sometimes duplicated), nothing that resembles PEP-8, you do some really puzzling things with the encoding/decoding of UTF-8 strings in your code and rely on chardet to guess encodings at times (although I didn't discover where), you use BeautifulSoup but apparently have no clue how to navigate its structure, RegEx is a solution for everything in your code while only making things more complicated (e.g. using it to strip '#' at the end of a string instead of just splitting the string), many of your methods do unexpected things, you use decorators incorrectly (e.g. adapaters.adapter_fanfictionnnet.FanFictionNetSite Adapter.getAcceptDomains), you have many methods that have a "get"-prefix and simply return a constant or unchanged value... and that's only after looking at 3-4 files of your project. That's why I wanted you to use my API modules, many, if not all things, you currently do in the adapter for FanFiction.Net and FictionPress.com could have been simplified.
Things that have me stumped are also that somehow when adding new items to the validEntries list and a corresponding label to the titleLabels list in your base_writer.py code the label is not used like apparently intended in BaseStoryWriter.writeTitlePage and the "NO_TITLE_ENTRY" is used as a template, so one has to actually manually define a "<title_entry>_label" entry in the configuration files -- why do the "fall back labels" exist then in the first place? (I'm sure this one's my fault) Additionally modifying the EPUB_TOC* constants in the EpubWriter class somehow has no effect on the resulting table of contents that is actually created, why is that?
Of course, I realize that my code is surely not perfect either but reading your code is really hard and puzzling -- and that's not because the things you do are complicated: the overall structure is just bad. This time there's no way that I could not have sounded like an asshole, sorry.
Last edited by cryzed; 03-26-2012 at 02:12 PM.
|