12-23-2008, 07:01 PM | #46 |
Zealot
Posts: 134
Karma: 146
Join Date: Apr 2008
Device: Onyx Boox Poke 2
|
|
01-05-2009, 11:24 PM | #47 |
Member
Posts: 14
Karma: 492360
Join Date: Jan 2009
Device: Sony PRS-T1, Nook Simple Touch, Nook HD+
|
Is there anyway that you could adapt this for Fictionpress.com? It's the sister-site to Fanfiction.net, so I don't think it would be too much trouble. I like to read there too and it would be cool to carry those stories with me also.
|
Advert | |
|
01-12-2009, 06:31 PM | #48 |
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
|
Just discovered FLAG today and it's been pretty awesome so far (at least the online version is). Thank you very much for sharing this with us.
I used to do something similar semi-manually back in 2001~02 (I've got a working mirror of my favorite authors and fanfics on my hard drive) but the new system made it hard for me to use my semi-automated workflow. I was looking for an easier way to archive fanfics to my PC and read them on my iPhone (hooray for Stanza; Safari crashes way too often) and I'm happy to have found this. Now, I'm going to have to find some way to install Apache/PHP on my PC as having command-line access to this program for batch processing will be absolutely invaluable. Thanks again for this wonderful program! |
01-13-2009, 12:53 AM | #49 | |
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
|
Quote:
I appreciate how modular the code for this program is. It makes it very easy to add new sources and output file types. I'm currently attempting to make source files for other sites. I've also customized ffnet.source.php, epub.codec.php and lrf.codec.php to include the fanfic summary/description. I'm attaching a source file for Fictionpress.com as well as codec and Fanfiction.net source files modified from rgibbo's Windows version. I reckon the source files should work for both Linux and Windows. I checked ffnet.source.php from the tarball and rgibbo's zip and there didn't seem to be any difference between the two. Last edited by ilovejedd; 01-19-2009 at 04:04 PM. |
|
02-10-2009, 03:09 PM | #50 |
Member
Posts: 14
Karma: 10
Join Date: Feb 2009
Device: PRS-505
|
Love this app, though thanks to it, I'll be lucky to see my PRS505 anytime soon (the missus reads heaps off of fanfiction.net). That said, is there anyway to incorporate this functionality into Calibre directly (I'm runnin OSX, Calibre is how I dump all my books onto the reader)?
Edit: I'm using the web version to do the converting, not the actual app on a machine. |
Advert | |
|
02-10-2009, 03:53 PM | #51 |
Zealot
Posts: 134
Karma: 146
Join Date: Apr 2008
Device: Onyx Boox Poke 2
|
Yes, but not by me - you'd need to ask kovidgoyal for this functionality, as it would need to be rewritten as a calibre grabber.
|
02-10-2009, 03:57 PM | #52 |
Member
Posts: 14
Karma: 10
Join Date: Feb 2009
Device: PRS-505
|
*nod* I've posted on the forum for Calibre as well, figured I'd hit both and see what people have done.
*chuckle* My wife absently asked me about reading FF on the Reader and I stumbled on your app totally on accident. It may well lead to me buying another Reader just for her because of this apps functionality. |
02-14-2009, 12:56 PM | #53 | |
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
|
Help! I want to create a PHP script that returns just the cleaned-up html output of the story. How do I go about doing that?
For example: URL Quote:
EDIT: Nevermind, got it working. Just had to edit two sections in the main fflag program. Didn't even need to touch any of the other modules. Additions in green, deletions in red. Code:
//Config require_once('inc/args.inc.php'); //$config = getCliArgs(); $config['source'] = $_GET['source']; $config['format'] = 'html'; $config['storyid'] = $_GET['storyid']; //Output the compiled file if it the story is valid if ($story['meta']['title'] != "") { //Output file echo $output; /* //Create the file name if (!isset($config['outfile']) || $config['outfile'] == '-') $config['outfile'] = getBaseFilename($story) . ".{$config['format']}"; //Output the file printMsg("\t* Writing output to {$config['outfile']}...\n"); file_put_contents($config['outfile'], $output); */ Alas, porting the ffnet source to a Calibre/Python recipe is taking much longer. I have a working recipe used in conjuction with a local Apache+PHP server (that's the reason why I needed variable passing via URL) but converting the chapter retrieval and page cleaning logic to Python escapes me. Last edited by ilovejedd; 02-17-2009 at 07:52 PM. |
|
02-18-2009, 08:10 PM | #54 |
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
|
Here are some source files, including a fixed version of fpress.source.php. The one I posted earlier had a bug in it, I think. Also included are sources for The Sugar Quill, A Single Spark (http://sesskag.com) and there's a whole folder for AdultFanFiction.net (darn their multiple subdomains). For the AFF sources, I couldn't figure out a way to pass the subdomain without creating additional command-line arguments, hence, I created a source for each archive/subdomain. I've only tested the source file for the InuYasha archive but I think the logic should work for all the other subdomains.
For the The Sugar Quill source.php, the original plan was to adapt moggie's TheSugarQuill Calibre recipe. I eventually scrapped it since I can't make sense of the Python syntax. I'm going to need to do some heavy reading on Python before I can program anything more complex than Hello World. Thankfully, PHP is remarkably similar to C/C++ which is what I'm familiar with. All source files are based heavily on erayd's ffnet.source.php. Again, a really big erayd for releasing this program and making the source code available and rgibbo for porting it to Windows. It's become one of my most used programs as of late. |
02-22-2009, 05:12 AM | #55 |
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
|
Doesn't fetch story id: 4880173. Meta information is detected correctly but the chapter content is blank.
|
02-22-2009, 05:30 AM | #56 |
Zealot
Posts: 134
Karma: 146
Join Date: Apr 2008
Device: Onyx Boox Poke 2
|
|
02-22-2009, 05:36 AM | #57 | |
Zealot
Posts: 134
Karma: 146
Join Date: Apr 2008
Device: Onyx Boox Poke 2
|
Quote:
Currently supported outputs are HTML, RTF, BBeB (LRF) and ePub. To everyone submitting modified source:Would it be useful if I gave you guys commit access to the subversion repo for this? Alternatively, is there any chance you'd be willing to submit patches to the original source? That way we can keep everything in sync and stop it diverging too much - the way things are, there's a chance we could end up with way too many branches spread all over the thread in various zipfiles. And finally, thanks heaps to all the users and modifiers in this thread :-). It's great to see people taking an interest, I must admit I thought for a while there that there were only a couple of people interested. Second final note: To all who have contributed code, are you happy with your changes being integrated into trunk and released under GPLv2? Last edited by erayd; 02-22-2009 at 05:59 AM. |
|
02-22-2009, 07:48 AM | #58 | |||
Created Sigil, FlightCrew
Posts: 1,982
Karma: 350515
Join Date: Feb 2008
Device: Kobo Clara HD
|
Quote:
Quote:
Quote:
I'm saying all this to make sure you are aware of your rights. I applaud the intent to ask first though. |
|||
02-22-2009, 07:58 AM | #59 | |
Zealot
Posts: 134
Karma: 146
Join Date: Apr 2008
Device: Onyx Boox Poke 2
|
Quote:
I wrote this because I wanted the functionality, and I released it because I thought others may also want it - the contributions were an unexpected surprise, but I'd like to tidy this up now while it's still easy, before there are so many changes it all gets a bit out of hand. |
|
02-22-2009, 04:53 PM | #60 | ||||
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
|
Figured it out. Lol, I didn't sleep until it was fixed. The fanfic was fairly long and the pcre.backtrack_limit was too restrictive (100,000). Changed the value to 1,000,000 and it works now.
Quote:
Quote:
Quote:
Quote:
Addendum: I just read a bit about subversion. I think patches would be better so we don't accidentally break something. Last edited by ilovejedd; 02-22-2009 at 04:59 PM. |
||||
Tags |
converter, fanfiction, fanfiction.net, grabber, lrf |
Thread Tools | Search this Thread |
|
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 |