Page 1 of 1

Word count & Pairing

Posted: Mon 28. Feb 2011, 01:27
by RachDvn
Hi Rai,

When pulling sites from fanfiction.net, is there any chance you could include the word count and pairing?

Thank you again for the super terrific program and all your hard work.

~Rach

Re: Word count & Pairing

Posted: Mon 28. Mar 2011, 15:58
by Raimond
Hi,

the problem with this idea is that I don't have to think about all the other archives too.
It's no problem to include this for ff.net, but then we'd get a line in the summary for the other archives with "Word Count: unknown; Pairing: Unknown"

I think a lot of people wouldn't like this.

Rai

Re: Word count & Pairing

Posted: Tue 29. Mar 2011, 17:41
by Taku
If the info resolves to unkown just remove the whole line, that should not be to hard I think if you process the the lines of the reulting story again. Once you reach the first chapter you can just copy the lines without checking, but every line containing "unkown_ffdl" can be deleted. No user of the ff_downloader would ever see such a line and it would work with other infos from other sites just as well.

Taku

Re: Word count & Pairing

Posted: Tue 29. Mar 2011, 21:38
by RedneckDrow
:shock: You don't realize what that would entail in a C-based language, do you?

Telling the program to ignore code in certain circumstances is certainly doable, but it's bound to return more than a few argument errors.

That's why I myself stick with VB.net and .asp :ugeek: Ok, I'm done now.

Re: Word count & Pairing

Posted: Thu 31. Mar 2011, 22:57
by Taku
RedneckDrow wrote::shock: You don't realize what that would entail in a C-based language, do you?
I think there was something lost here: first some pseudo code for the algorithm:

Code: Select all

do
  string line = readline()
  if line contains "unkown_ffdl" then next
  writeline(line)
while there are lines remaining
this can be done just on the generated text before the chapter text and it does not need to be an actual field.

I suspect that each site has either a secific code section or some set of parsing information (e.g. list of regex). In that case the varibles can be given a default value, either before hand or if the parser comes up with nothing. At no place there would be the effect you described.

Taku