View Single Post
Old 07-01-2012, 03:14 PM   #492
cryzed
Evangelist
cryzed ought to be getting tired of karma fortunes by now.cryzed ought to be getting tired of karma fortunes by now.cryzed ought to be getting tired of karma fortunes by now.cryzed ought to be getting tired of karma fortunes by now.cryzed ought to be getting tired of karma fortunes by now.cryzed ought to be getting tired of karma fortunes by now.cryzed ought to be getting tired of karma fortunes by now.cryzed ought to be getting tired of karma fortunes by now.cryzed ought to be getting tired of karma fortunes by now.cryzed ought to be getting tired of karma fortunes by now.cryzed ought to be getting tired of karma fortunes by now.
 
cryzed's Avatar
 
Posts: 408
Karma: 1050547
Join Date: Mar 2011
Device: Kindle Oasis 2
Ah yeah, I feared something like that (then on and off existing chapter numbers). Your suggestion sounds great to me, but the code that detects and possibly removes the leading chapter numbers is probably going to be somewhat complex, I think...

One way would be writing a RegEx that checks if the first few characters are digits followed by a delimiter ('.', ' ', ':' ...) and if that is true for every chapter title in the list, remove this part. The last condition (true for every chapter title) is a precaution so no part of the actual title is accidentally removed... I'm sure there are some corner case where a chapter might be named "5. Night" instead of "5th Night" or something similiar, but if it is true for every chapter the chance that the chapter number is added by the site itself is higher. Or am I making things too complicated?

About adding the numbers to the other writers, yes, of course, I expected as much -- these simply weren't that relevant to me since I use your software mostly for downloading fanfiction.net stories and converting them to EPUB afterwards, I expected that you'd add them to the other writers if you thought it was a good idea.

Also: I'll be honest, I'm not sure if this is already implemented, but what about a custom:
  • connection_timeout: integer
  • connection_timeout_retries: integer(/string [unlimited]?)
Or something among those lines. I already know that you do something similar to that when you fetch the chapter text, but do you also do it during the update process when the metadata is checked? This way it would also allow the user to configure those options manually.

Last edited by cryzed; 07-01-2012 at 03:46 PM.
cryzed is offline