FIMFiction UserScripts 383 members · 0 stories
Comments ( 16 )
  • Viewing 1 - 50 of 16

Found out about this group after the Fimfiction update, hello!

fimfic2epub is a browser extension/tool that you can install/use to generate prettier EPUB ebooks from Fimfiction stories. It adds a button on stories that when clicked opens a customization dialog, see image below.
Images gets embedded, you can choose a paragraph style, choose wether to include author’s notes and more! Feedback welcome! :pinkiesmile:

I could look into in making it an Userscript, not sure how I could solve fetching images from across origins though.

yrfoxtaur
Group Contributor

Man, the options are coming out of the woodwork...

(There's another fimfiction to epub tool here in this group, though not made with node.
https://www.fimfiction.net/group/198799/fimfiction-userscripts/thread/319692/fimfiction-to-epub )

That’s some really nice formatting on the title page! :twilightsmile:

Err, isn’t there already a built in epub download tool? While this looks quite a bit more user friendly, the current one already seems to work well enough, barring some minor formatting errors.

5978836
The built in one is really bare-bones compared to the user-built ones. Some of the formatting doesn’t import, we don’t get any of the metadata, there’s no customization options, etc.

5978653
I like the look and feel of your UI, set to closely match the site. I don't have much use for the function, but I like the UI enough that I'm tempted to try it out and find use for it.

5978653 This is quite a nice tool that I had no idea existed! I’m going to keep using mine because it does things the way I like them, but it’s obvious that a lot more effort has gone into this one. I really like that logo. :raritywink: I also really appreciate that you’re porting it to Firefox.

A couple of the new features in Fimfiction to EPUB v2.1.0 were inspired by this extension—more specifically, I added a couple of things to the previously completely barren title/long description page, and I added an option to switch between paragraph spacing styles.

I could look into in making it an Userscript, not sure how I could solve fetching images from across origins though.

That’s no problem, just use GM_xmlhttpRequest. Userscripts do have access to some privileges that normal pages don’t get. I’ll warn you, though—opting in to those privileges will unleash dark spirits on your code. You’ll be forced to utter unclean phrases in an unknowable tongue in order to expunge them from a place.

Something I’ve got to tell you—you’re not supposed to write scripts that make more than one AJAX request at a single user action. That’s mostly for HTML and JSON endpoints—they’re a lot more lenient when it comes to images, just try not to download significantly more of them than would normally appear on a page. The “Download .html” feature was a lifesaver when it came to bringing my script into compliance with this rule, but it doesn’t provide author’s notes, so I had to remove them from the output. As for metadata, my script just scrapes the DOM of the page the user is already on. Sorry to be the bearer of bad news, but on the bright side, Fimfiction to EPUB got way faster as a result of these changes.

5978659

… though not made with node.

Depends on what you mean by “made with node”. The script itself won’t run on Node, but Node is used for building. I use the same build system as djazz, in fact. I just don’t provide build instructions because I’m kind of accustomed to the world of NPM where everyone already knows what it means when a repository has a gulpfile.js. :twilightsheepish:

5980130
Yep, found your tool when I joined this group yesterday! We should work together :twistnerd:
I started working on fimfic2epub last summer.

I’ve never used userscripts myself before, I only know about the Web Extensions API, in Chrome and Firefox it’s almost the same. The Firefox Add-on is currently in queue for review (probably for a few more days).

Yeah, I would love to minimize the amount of XHR requests. Right now it fetches chapters individually, but using the existing HTML/EPUB download and build on that would be better. The reason I’m not is Author’s Notes. When that’s there, I will rebuild it.

fimfic2epub is not only a web extension, but also a npm module! It is meant to be used serverside, like on this page. Both share the same code and (should) produce identical output.

Firefox version released! Works on Firefox for Android too.
https://addons.mozilla.org/en-US/firefox/addon/fimfic2epub/

The “Download .html” feature was a lifesaver when it came to bringing my script into compliance with this rule

HTML and EPUB output now include Author's Notes :pinkiehappy:
I have recoded how my extension fetch the story, it now uses the HTML download instead of fetching chapters one by one. Should speed up for some stories!

5984609
Wow. I just ran the ~300 chapter, ~1M word Utaan through the new version. FanFicFare had to chew on it for going on half an hour. Yours prepped and downloaded it in less than 10 seconds. Very nice! :pinkiehappy:

5984609 I just noticed this change myself—guess I gotta revamp my scraper. The new output is absolutely gorgeous, and my script will be way better off with it, but... ugh, I hate writing scraping code so much. :pinkiesick:

We should work together :twistnerd:

I didn't really know how to respond to this as long as you were sticking with the flood-of-chapters approach (no offense, I take that stuff seriously), but I would be open to it now, no doubt! It would be nice to make our two scripts that work two ways into one script that can work any way in between. And I won't be able to work on mine for a while soon, so it would be good for its users if it was merged with yours by then, especially with Fimfiction in flux as it is so soon after the update. Two maintainers can be a lot more reliable than one in that way. So yeah, working together sounds like a good idea. Want to talk about it more in PMs, perhaps?

5984678

FanFicFare had to chew on it for going on half an hour.

The Fimfiction servers probably didn't like that very much. :rainbowderp: Definitely not an experiment that bears repeating. I hope FFF updates to a just-one-request model, too.

5985396

The Fimfiction servers probably didn't like that very much.

Yeah, the less said about how well FFF did with one of SS&E's 1000-chapter fics, the better. That took over an hour. :pinkiesick:

knighty
Site Owner

5985396
Glad to know my anal obsession over making the html nicely semantically formatted is appreciated :V If you're working in JS, by far the easiest way to handle it is just create a DOM element with the html and walk over the nodes rather than plaintext scraping.

5986936

On the .html download

<meta name="viewport" content="width=device-width, initial-scale=1" /> <style> body { max-width: 50em; padding:0 1em; margin: 2.0em auto; text-align: justify; line-height:1.6em; font-family:sans-serif; } img { max-width: 100%; } h1, h2, h3, h4, h5, h6 { text-align: left; } .authors-note { border-top:3px double currentColor; border-bottom:3px double currentColor; padding-left:0; padding-right:0; margin-left:0; margin-right:0; } nav, article { border-top: 3px double currentColor; margin-top:2.0em; } </style>

needs to be removed.

So, this is a bit outta date, and I don't wanna necro an otherwise dead thread, but.. I'm having an issue. This works great, minus the fact that using it now, it seems to just.. lose periods? That's such an innocuous error I don't even know how it's happening. I convert a story to an ebook via the Chrome extension, upload it to my Kobo Aura via Calibre, and then.. there'll just be sentences that don't have periods. Not all of them, maybe 1 in 20 or so, but it very much happens.

  • Viewing 1 - 50 of 16