1. DLP Flash Christmas Competition + Writing Marathon 2024!

    Competition topic: Magical New Year!

    Marathon goal? Crank out words!

    Check the marathon thread or competition thread for details.

    Dismiss Notice
  2. Hi there, Guest

    Only registered users can really experience what DLP has to offer. Many forums are only accessible if you have an account. Why don't you register?
    Dismiss Notice
  3. Introducing for your Perusing Pleasure

    New Thread Thursday
    +
    Shit Post Sunday

    READ ME
    Dismiss Notice

Fanfiction.net to ePub

Discussion in 'Fanfic Discussion' started by p0ody, Nov 23, 2013.

  1. p0ody

    p0ody Squib

    Joined:
    Jul 31, 2013
    Messages:
    16
    Location:
    QC, Canada
    This post might in the wrong section, if so, can a mod move it to the appropriate section, thanks.


    If you are like me and like to read eBooks once in your bed, you will miss your favorite fanfic.

    So this is why i made this simple script which allow me to get my favorite fanfic from fanfiction.net in ePub format, I created this for myself at first be then, why not share ?

    Its quite simple, you only have to enter the url from Fanfiction.net and there you go!

    Here goes the link: http://www.p0ody-files.com/ffnet_to_epub/


    (I know this is far from perfect, and may still have some error popping up so if you have errors please post here with the problem and the link to the story. Thanks)
     
  2. Wtfitskenny

    Wtfitskenny Second Year

    Joined:
    May 12, 2012
    Messages:
    60
    Location:
    Dutch occupied New York
    Great site, until now I always used Calibre with an FanFiction Download plugin, This seems so Much easier

    I will totally try this in the future.
     
  3. yak

    yak Moderator DLP Supporter Retired Staff

    Joined:
    Jul 28, 2007
    Messages:
    4,001
    Location:
    Australia
    I like to read on my phone when I'm out and about. I'd find a fic I like, paste the URL into the FlagFic site, and then download an epub of the fic I wanted to continue reading it on my phone without needing to be in transmission range of a phone tower. I can't do it anymore since ff.net cut off FlagFic.

    Unfortunately, I can't get your site to work on my Android phone.

    I tried:

    https://m.fanfiction.net/s/9659792/1/The-Boy-in-the-Team
    And got a PHP error. It couldn't identify the author or story ID.

    I thought the problem might be the "m." so I changed it to "www."
    https://www.fanfiction.net/s/9659792/1/The-Boy-in-the-Team
    And I got the message "Getting chapter #15..." and no further progress. My phone didn't attempt to download a file. And note that there are 70 chapters to that fic, not 15.

    I thought that the fic size might be too much [near 300k words], so I dropped it down to a one-chapter fic with 1k words.
    https://www.fanfiction.net/s/9598347/1/Agony
    And received a "Getting chapter #30..." message and nothing else happened.

    If you could get this working for mobile devices, I'd be very happy. m.fanfiction.net is the mobile address.

    I'm on a Sony Ericsson Xperia Play R800a
    OS: Android v2.3.4 [Gingerbread]
    Browser: Opera Mini Next v7.5.32195

    edit: I tried it on my PC and I can see why it isn't working on Opera Mini, you have the screen update with a link to the epub. Opera Mini can't see the link because it's a minimalist browser that cuts out most dynamic content and only shows static pages. If you could have the page automatically attempt to send the file to the user instead of a link [or provide a checkbox to do so] then that may solve the problem.
     
    Last edited: Nov 24, 2013
  4. Photon

    Photon Order Member

    Joined:
    Jul 15, 2012
    Messages:
    838
    Location:
    Poland
    from https://www.flagfic.com/

    EDIT: Sorry.
     
    Last edited: Nov 24, 2013
  5. yak

    yak Moderator DLP Supporter Retired Staff

    Joined:
    Jul 28, 2007
    Messages:
    4,001
    Location:
    Australia
    I'm aware of that, which is why I'm interested in p0ody's solution. It's also why I said

     
  6. p0ody

    p0ody Squib

    Joined:
    Jul 31, 2013
    Messages:
    16
    Location:
    QC, Canada
    yak, i will look into making this work on mobiles.

    Thanks for the report.

    ---------- Post automerged at 02:19 PM ---------- Previous post was at 11:23 AM ----------

    yak, could you try with the option 'Mobile' checked.

    Also now it should accept both www.fanfiction.net link and m.fanfiction.net.

    Edit @ 3h07PM: Also fixed error with One-shot.
     
    Last edited: Nov 24, 2013
    yak
  7. yak

    yak Moderator DLP Supporter Retired Staff

    Joined:
    Jul 28, 2007
    Messages:
    4,001
    Location:
    Australia
    Some work and some don't.


    Do you want me to test more fics?
     
  8. Klackerz

    Klackerz Bridgeburner

    Joined:
    Oct 22, 2009
    Messages:
    786
    Location:
    India
    You are using AJAX in your javascript, Opera Mini will not contact the server after a page has finished loading. In yak's case, the smaller stories had finished downloading by the time the page had finished loading, while the bigger stories were still in progress when the page finished loading.

    I guess you can fix it by removing the ajax thing while using opera mini. Anyway I've been thinking of creating a small android app for downloading fanfic in epub when I get some free time. I guess I'll get around to it soon.
     
  9. yak

    yak Moderator DLP Supporter Retired Staff

    Joined:
    Jul 28, 2007
    Messages:
    4,001
    Location:
    Australia
    Yes, also don't trust the Opera Mini Emulator which is available on the Opera website. Your site seemed to work fine on it while the Opera Mini Next [btw. Next = latest beta] on my phone does not. I think there's a difference in the way the Emulator handles traffic compared to a live install.

    Opera Mini requests a page from a website, and it's then sent to Opera's proxy servers. Then Opera's servers execute the scripts on the page [best effort within a brief time limit], render the page, convert it to OBML and send that compressed and cut-down version to the Opera Mini user. It's essentially static, not unlike a pdf.

    http://dev.opera.com/articles/view/opera-mini-and-javascript/

    Opera Mini is a vital browser in regions of the world with crappy mobile network access and/or severely limited data allowances. That's another reason I prefer to rely on downloaded epubs rather than the mobile phone network being 100% accessible for the time I'm reading a fic.

    Opera seems to handle downloading files quite alright though. The epubs I downloaded through your site were fine.

    I'm not a dev, let alone a web dev, so I apologise in advance for this potentially ignorant and wrong-headed suggestion:

    When your site converts a fic, does it store the fic on your server? It seems to, at least for a short while. How about using a cookie [or some other way of identifying a unique device/user] and showing that user a list of links to the last 5 fics they've converted [or all fics they've processed in the last few minutes]? That way, even if there's been a hiccup in the process, they can just hit refresh and access their personal download links.
     
    Last edited: Nov 25, 2013
  10. p0ody

    p0ody Squib

    Joined:
    Jul 31, 2013
    Messages:
    16
    Location:
    QC, Canada
    Alright, i'll try doing something without ajax for mobiles users, and will add the last 5 fics list you asked, seemed like a good idea to me.

    ---------- Post automerged at 08:13 PM ---------- Previous post was at 05:43 PM ----------

    Here we go...

    Can you test it for me please

    http://www.p0ody-files.com/ffnet_to_epub/mobile/
     
    yak
  11. yak

    yak Moderator DLP Supporter Retired Staff

    Joined:
    Jul 28, 2007
    Messages:
    4,001
    Location:
    Australia
    Last edited: Nov 26, 2013
  12. p0ody

    p0ody Squib

    Joined:
    Jul 31, 2013
    Messages:
    16
    Location:
    QC, Canada
    It's annoying, this fic works on localhost but not on my webhost -_-...

    Will try to find the trouble.

    ---------- Post automerged at 07:53 PM ---------- Previous post was at 05:51 PM ----------

    Seems like preg_match has a character limit of 100k on my webhost (and can't change it) and probably higher on my localhost.

    And this fic has a loooonnnggg chapter (~110k chars).

    So i changed my way of getting chapter text...

    Should be working now.
     
  13. yak

    yak Moderator DLP Supporter Retired Staff

    Joined:
    Jul 28, 2007
    Messages:
    4,001
    Location:
    Australia
    p0ody, I'd just like to point out that this tool is fantastic and working as intended, even on Opera Mini. I'm overseas at the moment and both the epub conversion and "last five fics" have saved me at different times.

    Thank you.

    http://www.p0ody-files.com/ffnet_to_epub/mobile/
     
  14. p0ody

    p0ody Squib

    Joined:
    Jul 31, 2013
    Messages:
    16
    Location:
    QC, Canada
    For those using this, I am sorry for the down time.

    I switched web host and had some trouble with my domain. Should be fixed now and with a new version!

    I'll have to fix the mobile version, I'll do it tomorrow.
     
    yak
  15. yak

    yak Moderator DLP Supporter Retired Staff

    Joined:
    Jul 28, 2007
    Messages:
    4,001
    Location:
    Australia
    I use this. I didn't notice the downtime, but thanks for re-hosting and keeping this service running. Much appreciated.
     
  16. Ched

    Ched Da Trek Moderator DLP Supporter ⭐⭐

    Joined:
    Jan 6, 2009
    Messages:
    8,379
    Location:
    The South
    Sorry I missed this! I used flagfic in the past. Looks like this is a good substitute. Thanks
     
  17. Klackerz

    Klackerz Bridgeburner

    Joined:
    Oct 22, 2009
    Messages:
    786
    Location:
    India
    Some fics don't download properly. I find that fics which has any special characters in the title is not downloading properly at least in the mobile site. Not sure about the desktop site.
     
  18. Eyron

    Eyron Seventh Year

    Joined:
    Sep 9, 2013
    Messages:
    290
    Gender:
    Male
    This is far better than Flagfic. Flagfic certainly didn't have archive or top10.
    Also, tried downloading a fic and it told me there was already an epub to download, which was updated to the latest chapter. That was quite cool =D
     
  19. p0ody

    p0ody Squib

    Joined:
    Jul 31, 2013
    Messages:
    16
    Location:
    QC, Canada
    Yeah, i added this to minimize the data pulled from FF.net, so if someone already asked for the same fic as you, and the file is made with lastest update then it just use this one again.

    ---------- Post automerged at 06:54 PM ---------- Previous post was at 05:41 PM ----------

    *** Mobile version is up and should be working.
     
  20. Lord Ravenclaw

    Lord Ravenclaw DLP Overlord Admin DLP Supporter

    Joined:
    Apr 2, 2005
    Messages:
    4,372
    Location:
    Denver, CO
    If you need any help with hosting, let me know.

    Also, feel free to pop in to #programming on IRC, many of DLP's resident programmers hang out there.

    EDIT:

    Another thing I thought of, I'd be happy to add a link in Scryer and the DLP Library for "export to ePub." that sent people your way +/- a query string.
     
Loading...