10-03-2010, 10:50 AM | #226 | |||
Addict
Posts: 245
Karma: 20386
Join Date: Sep 2010
Location: France
Device: Cybook Diva
|
Quote:
Spoiler:
but I have no idea if it works in more that one dimension. Well, YAML works, and that all that matters. Quote:
Quote:
But in the end, you're the boss. N. |
|||
10-03-2010, 06:57 PM | #227 | |
Zealot
Posts: 134
Karma: 146
Join Date: Apr 2008
Device: Onyx Boox Poke 2
|
I never knew you could do that - that's awesome . Is that in the ini spec, or is that a PHP-ism?
Quote:
Edit: Have started a poll here. Last edited by erayd; 10-03-2010 at 07:09 PM. |
|
Advert | |
|
10-03-2010, 10:16 PM | #228 |
Member
Posts: 14
Karma: 10
Join Date: Sep 2010
Device: psp, htc g1
|
Personally I don't think eliminating function prefixes is worth additional requirements.
I also fail to see the problem with -limited- global variables such as $CONFIG and $opt nested hashes (in runtime, cfg loading is another matter). KISS FTW. I'll take a look at the github discussion when I get home tuesday. I'll also have a r29mod ready which will support drop-in source modules, with one that grabs stories from forum.spacebattles.com :P |
10-04-2010, 05:10 AM | #229 | |||
Addict
Posts: 245
Karma: 20386
Join Date: Sep 2010
Location: France
Device: Cybook Diva
|
Quote:
Quote:
It also has relatively bad effects (http://en.wikipedia.org/wiki/Global_variable) in certain situations, but this project is still small enough that we don't really have to care about that. Unless FLAG continues to grow in functionality and complexity, in which case globals can become a hindrance rather than a help (that's my real-life experience about such things). Quote:
N. |
|||
10-04-2010, 07:59 PM | #230 |
hopeless n00b
Posts: 5,111
Karma: 19597086
Join Date: Jan 2009
Location: in the middle of nowhere
Device: PW4, PW3, Libra H2O, iPad 10.5, iPad 11, iPad 12.9
|
Really cool to see all the current activity here. While my sole interaction with the FLAG source code nowadays are quickfixes whenever an FF.Net update breaks something, I'm looking forward to see innovations from the community.
|
Advert | |
|
10-05-2010, 03:10 AM | #231 | ||
Member
Posts: 14
Karma: 10
Join Date: Sep 2010
Device: psp, htc g1
|
Quote:
I tend to try to minimize complexity as much as possible in some areas as it usually ends up a headache. For example, I'm discovering what a fracking PITA php's DOM library is, because someone decided it would be clever to convert everything it touches to UTF8. All I want is xpath matching, nstead I'm having to deal with spacebattle's iso8859 txt getting mangled. Quote:
The module should be easy to adapt to most vbulletin forums, I think. |
||
10-07-2010, 03:19 AM | #232 |
Member
Posts: 14
Karma: 10
Join Date: Sep 2010
Device: psp, htc g1
|
r29 mod3:
The sbattles source module parses threads on http://forum.spacebattles.com and saves a merged collection of individual posts based on adjustable criteria. Most fanfiction on the creative writing board (http://forums.spacebattles.com/forumdisplay.php?f=18) is broken up by people commenting on the story, and the OP replying to these comments. By default, it will filter these threads in the following way: Reject all posts not started by the OP. Reject all OP posts with less than 256 bytes of text. (likely a short comment) Reject all OP posts in which 40% of the text is in a quote. (likely a reply to a comment) Allow all OP posts that have more than 2048 bytes of text regardless. (just to be -safe-) These parameters can be adjusted with the -F flag as so: fflag 'http://forums.spacebattles.com/showthread.php?t=172856' -F sbattles:oponly,allowsize=256,quoteratio=40,quotea llowsize=2048 -or- (save everything) fflag 'http://forums.spacebattles.com/showthread.php?t=172856' -F sbattles:nooponly -F ffnet:url=http://multiple.module.options.can/be/adjusted -or- (adjust parameters and save a full copy to full-autoname.html) fflag 'http://forums.spacebattles.com/showthread.php?t=172856' -F sbattles:fullthread=AUTO,allowsize=1024,quoteratio =10,quoteallowsize=65535 -or - (default should be ok for most cases) fflag 'http://forums.spacebattles.com/showthread.php?t=172856' fflag -F module:help will show a module's options. fflag --fullhelp will show everything. My todo list is now: Feature freeze to merge with trunk on github. I've never used git, can someone copypasta commands I can use to upload a branch? Last edited by AtomicDryad; 10-07-2010 at 03:31 AM. |
10-07-2010, 05:52 AM | #233 | ||
Addict
Posts: 245
Karma: 20386
Join Date: Sep 2010
Location: France
Device: Cybook Diva
|
Quote:
Quote:
To get a local copy: git clone git://github.com/erayd/flag.git More than that, I've never done yet... N. |
||
10-27-2010, 03:22 AM | #234 |
Member
Posts: 14
Karma: 10
Join Date: Sep 2010
Device: psp, htc g1
|
Yah I randomly decided to fix an opera api module and was forced to learn me some githubs >.>
I've not noticed anything going on with fflag's repo, which seems to be a rewrite. Some of what's already up looks useful. You guys still active? I'm rather disgusted with php_dom's encoding mangling, and what seems to be a truncation bug. Is anyone aware of an alternative, for xpath selection with less bloat? |
10-27-2010, 03:42 AM | #235 | ||
Zealot
Posts: 134
Karma: 146
Join Date: Apr 2008
Device: Onyx Boox Poke 2
|
Quote:
If people would rather I simply make unilateral decisions on the design of the project, I'm quite happy to just write whatever I prefer and upload that - but the impression I got was that you guys wanted to be involved throughout this process. My current task on this is to add additional documentation to the code I've uploaded to github, as nbriche (aleyx on here) seemed to have a bit of trouble understanding it all based on what's there at the moment. Quote:
Last edited by erayd; 10-27-2010 at 03:46 AM. |
||
10-28-2010, 07:52 PM | #236 | ||
Member
Posts: 14
Karma: 10
Join Date: Sep 2010
Device: psp, htc g1
|
Quote:
I did notice that the url matching seemed limited, with only 1 entry and no passing of match returns. The hash based stuff I coded allows for multiple patterns, detects ambiguity, and provides a means to call different functions based on which pattern got a hit. I'll try to make it more OO. As far as decision making, I don't want to say the creator of fflag shouldn't be making them. But I also see myself proposing changes to things if it would result in more versatility or effeciency. If that would be more frustrating to you, I'll fork and annotate what's on git, instead of fork/alter/pull request. Quote:
Perl's HTML::Treebuilder doesn't frak with encoding for instance. |
||
10-28-2010, 08:31 PM | #237 | |||||
Zealot
Posts: 134
Karma: 146
Join Date: Apr 2008
Device: Onyx Boox Poke 2
|
There have been limited discussions on github, although only between myself and nbriche. I assumed you'd seen them, as you are following the repo.
Quote:
Quote:
Quote:
I would like to request that we have a complete (or at least mostly complete) framework first though, before adding lots of special cases. Quote:
Quote:
|
|||||
10-29-2010, 02:37 PM | #238 | |
Addict
Posts: 245
Karma: 20386
Join Date: Sep 2010
Location: France
Device: Cybook Diva
|
Quote:
A main Flag object, which houses:
The only point I'm dubious about is the one we've already touched on github, that is, making everything a factory singleton. I have nearly the same approach in my coding, and with the advent of PHP5.3 it also looks a lot like yours: a main SingletonFactory class, which stores factories derived from itself (before 5.3, each factory stored its instance within its own static member). But I tend to limit the factories to the fewest possible, and my SingletonFactory base class only stores and retrieves instances, no init() method. Validation of classes is managed by __autoload() as needed, and the rest would be done by the main class (since it's only ever called by the main class anyway). So I have mainly three types of classes:
For the class autoloading, I myself like to use a separate autoloader.inc.php file, with only an __autoload() function, and called either in the php.ini (not really doable here), or in the 'flag' bootstrap. I'm sorry that I hadn't had much time 'till now to work on this (work and all), but now that I have a week off I'll be able to have some fun with this! N. |
|
03-11-2011, 08:49 PM | #239 |
Groupie
Posts: 180
Karma: 558490
Join Date: Jan 2011
Device: Kindle 5, Amazon Fire 5th Gen, Moto Z Play Droid
|
erayd,
First, I must say that I use the FLAG Webservice all the time, and I far prefer its formatting over and above the FanFictionDownloader. Good Job. Now, I do have a minor issue that I would like to address. When I download a story as ePub and edit it in Sigil, every story I download has 3 identical anchors per TOC entry. When I "validate epub" the majority of complaints I get are "ID value X is not unique" and have to run a Search&Replace to remove the 2 extraneous ones per chapter. Can you fix this? Again, for anyone who downloads stories form Fanfiction.net, FLAG is the best. Fanfiction Downloader, on the other hand, formats ebooks to look like mere .txt files. Last edited by chyron8472; 03-11-2011 at 09:08 PM. |
03-30-2011, 07:51 PM | #240 |
Zealot
Posts: 134
Karma: 146
Join Date: Apr 2008
Device: Onyx Boox Poke 2
|
Hi chyron8472,
The issue you're referring to is caused by the version of Calibre used to do the HTML -> ePub conversion after FLAG finishes doing its thing. Assuming that this has also been fixed in Calibre, this should be sorted next time I update the backend - it won't be immediate, but it is on my list. |
Tags |
converter, fanfiction, fanfiction.net, grabber, lrf |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Fanfiction.net on Kindle | forkyfork | Amazon Kindle | 26 | 08-07-2011 08:42 AM |
bookmarks/notes grabber | Reader2 | Android Developer's Corner | 0 | 10-02-2010 09:24 AM |
EASY fanfiction grabber? | sherryg | Workshop | 19 | 01-08-2010 03:13 AM |
FLAG (Fanfiction.net Lightweight Automated Grabber) and Calibre? | malkie13 | Calibre | 1 | 02-10-2009 05:43 PM |