The Writers' Group 9,290 members · 56,381 stories
Comments ( 124 )
  • Viewing 51 - 100 of 124

There's a GDocs addon that can also help, for people who don't/can't deal with stuff like Tampermonkey in their build.

TigeR's is almost certainly going to be more useful for use on this site specifically though.

Downloaded it and tried it. Worked like a charm, but there was a little bit of formatting that wasn't to my preference. So I went into the source code, jiggled it a little, and now it works perfectly. I'm way happier than I have any right to be.

5787418 Is there any way to get this to work independently? For example, I like to write my write my Blog Posts up in Google Docs before tossing them into FimFiction. Any potential support there?

5791984 That's a good idea. I'll see if I can implement support for blog posts in v0.3, since I'm implementing importing into published chapters anyway. If I can get it to work, you can expect a new version this weekend :twilightsmile:

I've released version 0.3 0.4! The importer now works on released chapters and blog posts as well. I've inserted some options into the local settings page of FiMFiction as well, so you can influence how the importer handles paragraphs.

If you see a warning that the update URL has changed, don't be alarmed. I've changed the URL from OpenUserJS to GitHub, since OpenUserJS employs some strong throttling.

5779991 The extra line break was intentional. You can now also choose to indent paragraphs book-style in the settings.

5775953 5782783 5784403 5791685 I've made the paragraph import customizable, maybe it's better now?

5791984 done :rainbowdetermined2:

5793868
Awesome, thank you for your continued work on this :yay:

I'll be testing it more within a few days, but for now I went to check out the new features. The import into blog feature works for me and is amazing, thank you for that. While testing that out, I didn't notice any of those [ a][ b] tags appearing, so that seems to be fixed. The only thing that seems to not be working on my end is the local settings. When I go to the local settings page, Tempermonkey shows the Better Document Importer is active, but there's no change on the page itself.

In any event, this not only continues to be a wonderful tool, it's getting better all the time :scootangel:

Edit: Forgot to mention that updating existing chapters also works now.

5793884 :twilightoops: curious, I could've sworn it worked when I uploaded it. Hotfix incoming!

Edit: Version 0.4 published. I had changed something and forgot to reload the page to check :facehoof:

5793868 Tested 0.4. Worked like a charm with the formatting. At first it didn't, but then I remembered you said you added formatting selection to the FiMFiction settings page. Changed those, and all was well.

Thank you so much for not only writing this, but staying on top of it.

5793868

There is still too big of a difference to how fimfiction used to handle imports in the past and what the importer script does. It is acutally too accurate to the google docs file, in my case. Here is an example. Left is how it is supposed to be, right is what the script does.

http://pasteall.org/pic/show.php?id=112389

5794024 ah, I see. Handling captions correctly might be a little difficult and fiddly for every possible case... I might try to put something together for the next version. Thanks for trying it out, though!

5793868 Can someone please tell me how this custom formatting works? Because I'm trying to adjust it so everything moves over exactly how I had it in Gdocs, and it's not working, and it's just making me frustrated, and I just want to post my chapter!

5794265 Up at the top of FiMFiction pages there is a green toolbar, and with the "Settings"-button in the middle you can get to the settings page. There you can see an options group for Better Document Importer with the available paragraph import options, on how to indent and space paragraphs. That's all the options currently available.

If there's an option you'd like added, feel free to make suggestions!

If anyone's still having trouble with this, I've made an illustrated guide covering everything from installation to use.

5794314 I've gotten the hang of it now thanks to 5796383 (thanks a bunch!) And it is proving pretty handy.

My two cents are (and maybe I'm misinterpreting its function): the paragraph spacer doesn't seem to work for me. I still have to manually space out my paragraphs upon transfer. That's no real problem, I'm used to doing that. The second thing is, it seems to import the text with added size modifications. Is there any way to remove that?

5775013 What is the standard size and text this is based on? I use 14 papyrus when I write and it freaked out adding /size] and stuff everywhere.

5801680 Try setting the paragraph spacing option in the settings page to "web-style". The importer will only insert the necessary line breaks with that option. If that doesn't help, I'd need more info, like what you format your text like on Google Docs and what it should look like on FiMFiction.

5801680 5801703 I've assumed 11 and 12 to be the standard text sizes. 11 because Google Docs seems to use that per default, and 12 because that's equivalent to 1em, which is normal size for FiMFiction texts. If you use either of these, no tags should be added. For everything else though, it will. I'm not sure right now how to prevent the size tags in your case without breaking every other text import.

Maybe a setting for a preferred text size or a text size transformation?

knighty
Site Owner

5801761
I would suggest removing size importing entirely. Fics with a size tag over the entire thing will be failed

5806041 That's good to know, thanks! Though now I'm getting the idea of detecting the predominant size in a story and scaling bigger and smaller text to that... Could maybe prevent size tags over the whole story while still allowing someone to use a different size for writing and allowing some size emphasis... I'll do some tests!

I have released version 0.5. This release includes some heavy refactoring for cleaner code, but might've introduced some bugs. More importantly, it's now possible to only select a single chapter of a document containing multiple chapters of a story! Important: The chapter headings must be marked as headings in the document, making them bold or bigger does not help. It is very complicated for a computer to differentiate between just-bold text and bold-text-that-is-a-heading!

To mark them as headings, use this dropdown menu in Google Docs and choose one of the heading templates:

5775064
5775216 I've made chapters now selectable, given the restriction above. You can give it another look if you want :yay:

5794024 The importer now only begins inserting new line breaks after a paragraph of full text, so the caption should stay together. This is the closest to your picture I could get it to work till now.

5809456 This is not really the right place to ask this :trixieshiftleft: waiting for approval just means that it's in a queue waiting for a mod to approve it. The mods have lives, too, so try to be a bit more patient for now.

5809934
Sadly, after updating to the latest version, the script seems to be broken.
It no longer does any of your features.

5809981 That's weird, it works on my devices, both Firefox and Chrome. What browser version do you use? I might've used a browser feature that's not available in older browsers...

5809987
Im using version 50.1.0

5809934
Updated to 0.5 and tested it, no signs of anything buggy going on with me. I use multiple docs for my chapters, so the new feature is basically lost on me, but the indentations carry over better now. Thank you, as always :yay:

This importer is great, but if a paragraph starts with a quotation mark, the importer adds a tab character. I have to scan my document, click, and delete the tabs. Can you fix this?

5816299
Go to Fimfiction's settings page and set paragraph indentation to "Import as-is". This ought to solve the problem :twilightsmile:

5816471

Thanks for the tip. I would never have thought to look there. That was my issue. I'm very pleased with the importer.

I've published 0.6! In this release: If you import a document or chapter, you can now quickly repeat the import with the "Quick Import" button. Then, the same document or chapter will be imported (useful if you have made changes on Google Docs). This only works with documents you have imported with 0.6 or later, since previous versions didn't save which document was imported.

I have pushed automatic scaling of text size a version back for now. Also, sorry for not releasing anything last weekend, but I had a friend over and didn't get any programming done :twilightblush:

I've published version 0.7. The font size auto scaling is now implemented, and there is a switch for it in the settings. Hopefully, this is the best option for allowing non-default font sizes in Google Docs while not sacrificing size imports alltogether.

Also, I feel like we're quickly aproaching version 1.0, since I can't think of that many more features to include.

Huk

5862126

First of all - thanks for the excellent tool, your effort is greatly appreciated :pinkiecrazy: However, I would like to suggest two things:

1. Would it be possible to treat file name as chapter name in case no marked headings are found within a file? Right now, if we have a perfectly good file, but none of its parts are marked as the heading, the import fails quietly with the message in JS console: 'The heading to import must be part of the document.'

I think that treating the whole file as a single chapter, in this case, would be a better approach, then to fail quietly and force the user to add a heading tag :twilightsmile:

2. I would urge you to use more verbose error messages wherever possible - I just spent 2 hours trying to figure out why importer was failing with:

'The heading to import must be part of the document.'

Only to find out about the 'heading tag requirement' in one of your posts in this thread (and, not everyone is even aware of this thread) - I would suggest to either add information about what is required inside the README on GitHub or/and modify the message to something like this:

"You need at least a single piece of text marked as a heading. See:

https://www.fimfiction.net/group/50/the-writers-group/thread/302538/better-google-docs-importer#comment/5809934

For more details."

It would be much more readable :twilightsmile:

5865573 Glad you like it! What you describe is actually a bug, it's supposed to import documents without any headings. Sorry you wasted 2 hours because of that. It's fixed now in 0.7.1!

But my README is lacking somewhat anyway. I'll update it in the future, at least before the 1.0.0 release.

5866195 Heya! I think it's just me, but the importer has stopped working for some reason. I keep selecting the chapter I want to upload, but nothing happens. It give me a loading bar for a second, then the page remains blank. Any advice?

5866756 Sorry it's not working for you. Can you show me the console output of your browser? You can open the console with Ctrl+Shift+J. This will give me a hint where to begin looking.

Huk

5866195

No problem - glad to help... however here is another one I think :scootangel: - when you committed that bugfix yesterday, you pushed version number to 0.7.1 only in the package.json, but at the top of fim-better-document-importer.user.js there is still version 0.7.0 - thus, TemperMonkey doesn't see the update (even though I can clearly see changes are there on line 275).

Unless that was intentional, you should probably bump the version number inside the script as well :twilightsmile:

5867041 Okay, my screenshot button seems to have stopped working, so I just copy and pasted a selection of what the console showed me after I tried to import again.

Unknown property ‘-moz-box-shadow’. Declaration dropped. 2934267876-picker_v2.css:2:431234
Error in parsing value for ‘display’. Declaration dropped. 2934267876-picker_v2.css:2:431671
Unknown property ‘-moz-flex’. Declaration dropped. 2934267876-picker_v2.css:2:431953
Unknown property ‘-moz-flex’. Declaration dropped. 2934267876-picker_v2.css:2:432029
Unknown property ‘-moz-flex’. Declaration dropped. 2934267876-picker_v2.css:2:432395
Unknown property ‘-moz-border-radius’. Declaration dropped. 2934267876-picker_v2.css:2:432848
Unknown property ‘-moz-border-radius’. Declaration dropped. 2934267876-picker_v2.css:2:433953
Unknown property ‘-moz-border-radius’. Declaration dropped. 2934267876-picker_v2.css:2:434094
Unknown property ‘-moz-box-shadow’. Declaration dropped. 2934267876-picker_v2.css:2:434471
Unknown property ‘-moz-box-shadow’. Declaration dropped. 2934267876-picker_v2.css:2:435109
Unknown property ‘-moz-box-shadow’. Declaration dropped. 2934267876-picker_v2.css:2:435898
Unknown pseudo-class or pseudo-element ‘selection’. Ruleset ignored due to bad selector. 2934267876-picker_v2.css:2:436003
Unknown property ‘-moz-box-shadow’. Declaration dropped. 2934267876-picker_v2.css:2:436672
Error in parsing value for ‘-webkit-transition’. Declaration dropped. 2934267876-picker_v2.css:2:436823
Error in parsing value for ‘transition’. Declaration dropped. 2934267876-picker_v2.css:2:436925
Unknown property ‘-moz-box-shadow’. Declaration dropped. 2934267876-picker_v2.css:2:440438
Error in parsing value for ‘background-image’. Declaration dropped. 2934267876-picker_v2.css:2:440666
Error in parsing value for ‘background-image’. Declaration dropped. 2934267876-picker_v2.css:2:440721
Expected color but found ‘top’. Error in parsing value for ‘background-image’. Declaration dropped. 2934267876-picker_v2.css:2:440791
Error in parsing value for ‘background-image’. Declaration dropped. 2934267876-picker_v2.css:2:441410
Expected ‘none’, URL, or filter function but found ‘alpha(’. Error in parsing value for ‘filter’. Declaration dropped. 2934267876-picker_v2.css:2:442481
Expected ‘none’, URL, or filter function but found ‘alpha(’. Error in parsing value for ‘filter’. Declaration dropped. 2934267876-picker_v2.css:2:446054
Expected ‘none’, URL, or filter function but found ‘alpha(’. Error in parsing value for ‘filter’. Declaration dropped. 2934267876-picker_v2.css:2:446245
Expected ‘none’, URL, or filter function but found ‘alpha(’. Error in parsing value for ‘filter’. Declaration dropped. 2934267876-picker_v2.css:2:446466
Unknown pseudo-class or pseudo-element ‘-webkit-scrollbar’. Ruleset ignored due to bad selector. 2934267876-picker_v2.css:2:447560
Unknown pseudo-class or pseudo-element ‘-webkit-scrollbar’. Ruleset ignored due to bad selector. 2934267876-picker_v2.css:2:447630
Unknown pseudo-class or pseudo-element ‘-webkit-scrollbar-button’. Ruleset ignored due to bad selector. 2934267876-picker_v2.css:2:447696
Unknown pseudo-class or pseudo-element ‘-webkit-scrollbar-button’. Ruleset ignored due to bad selector. 2934267876-picker_v2.css:2:447750
Unknown pseudo-class or pseudo-element ‘-webkit-scrollbar-track’. Ruleset ignored due to bad selector.

It pretty much goes on like that for a dozen more lines then kinda repeats itself. Is that enough to tell you anything?

5867476 :twilightoops::facehoof: My bad, sorry. I've had some problems with a recent Windows update locking random files due to a dll crashing, I should've double-checked.

5867555 That's only errors for the CSS of the picker component. That's supplied by Google, but is nothing too much to worry about. There doesn't seem to be any lines from the importer, so that log doesn't help, sorry. You might be able to filter for only JS errors in the Firefox console, that might help.

5867674 Okay, filtered to just JS and this is what I got.

Failed to execute ‘postMessage’ on ‘DOMWindow’: The target origin provided (‘https://docs.google.com’) does not match the recipient window’s origin (‘https://www.fimfiction.net’).

Huk

5867674

Don't worry about it - I fight Visual Studio and Windows updates regularly :twilightangry2: so I know what you mean.

And as for the problem 5867686 is reporting - I get the same messages in Chrome and Firefox but the stories import fine.

5867686

Do you have the following message in console:

Importing document 'your file name here'

After importing? If something went wrong, errors are usually in a line above or below that message.

5867686 That's an expected error message, it should work despite that. If you don't mind, may I take a look at the document you want to import? I want to try and recreate your problem with a few more debug logs on my machine.

5867756 Yes, 'Importing document ch. 7'. Above that was the previous message and below it was

Possible Unhandled Promise Rejection: <unavailable>

5867763 Here's the link to the chapter.

5867801 Ah, I believe I know what is going on. This seems to be the same problem that 5867756 was having. For some reason, I thought you had all your chapters in the same document, which would've meant that there's a new problem.

I just pushed the (now fixed) version 0.7.1, which fixes that issue. Can you try again with the updated script? Also, I'm terribly sorry about the inconvenience :fluttershysad:

5867820 It's fine. Everything seems to be working again, so thanks for the fix!

Huk

5867820

It would appear I have encountered another bug - in the parser this time:

https://docs.google.com/document/d/1Yry8uKGuWQTQ_om_UNDZ87qi6rFP-9r0lHwDgUcfwQ0/edit?usp=sharing

After importing the above example, you'll notice that line breaks between the text in italics are missing...

As far as I can see, this may actually be a bug in FimFiction editor, the file imports like this:

[italics]“Come on! We need to get out of here!”[/italics]
[italics][/italics]
[italics]“...we can’t… the shield!”[/italics]

Which seems to be the correct way - however, the empty italics mark apparently displays on the page, without the line break... anyway, it would appear that modifying the regular expression in Formatter.prototype.format function, to something like this:

/^[\r\n]+|(\[i\]\[\/i\])+|\s+$/g

Should do the trick... - it should catch the empty italics so they will be replaced by an empty string, just like the line endings. That is - if I didn't mess it up (sorry, I really suck at regular expressions :twilightblush: - seems to work fine after a quick test though...)

5875691 Thanks for catching that! I'll take a look at it when I have time.

The problem with the paragraph breaks is probably not limited to italics, so your regex is probably not sufficient, sorry :twilightsheepish: But I'll probably include checks so empty elements aren't included in the first place, so the regex isn't necessary. (Also, even if there is a bug in the editor, the importer should probably work around that :twilightsmile:)

Huk

5877068

No problem, glad to help :twilightsmile:

The problem with the paragraph breaks is probably not limited to italics, so your regex is probably not sufficient, sorry :twilightsheepish:

Err.. to be honest, I only checked the italics yesterday :twilightsheepish: - but, yeah I can confirm that the same thing happens to empty bolding, underlining and centering tags.

5877068
I'm using a Chromebook, but I'm not sure how that affects the bug I have. When using the importer for blog posts, clicking the button does nothing. Not something bad, just nothing happens. Using the story importer works fine, however.

Otherwise, your importer is my go-to means of bringing over fanfics. Thanks a ton for writing this all out. Your code's saved me a lot of grief.

5917060 I admit, blog posts aren't really the main function of the importer, so I've neglected testing that a bit. I'll take a look and see if I can fix that. But I'm glad that I could help a bit with importing stories :yay:

5775209
I've done that :P

5917060 Sorry, I couldn't replicate what you described. I'm not familiar with Chromebooks, but can you open the browser console with Ctrl+Shift+J? If so, could you tell me what errors there are? (Some errors should be expected, mostly from badly written ads.) If everything works, there should also be an info line about what document was imported.

5918259

(unknown) ERROR: Execution of script 'Better Document Importer' failed! Cannot read property 'value' of undefined
(unknown) TypeError: Cannot read property 'value' of undefined
at HtmlInjector.getQuickImportKey (eval at E_c (:3:114), <anonymous>:681:62)
at HtmlInjector.injectQuickImportButton (eval at E_c (:3:114), <anonymous>:791:58)
at HtmlInjector.injectImportButtonOnBlog (eval at E_c (:3:114), <anonymous>:764:14)
at HtmlInjector.inject (eval at E_c (:3:114), <anonymous>:654:22)
at eval (eval at E_c (:3:114), <anonymous>:976:10)
at Window.tms_6c5d45b2_2e4c_4049_a382_9bfc6957cd43 (eval at E_c (:3:114), <anonymous>:1053:2)
at <anonymous>:2:297
at a (eval at E_c (:3:114), <anonymous>:3:1)
at eval (eval at E_c (:3:114), <anonymous>:4:3)
at Object.eval (eval at E_c (:3:114), <anonymous>:1055:6)

5918259
I'm getting the same problem as Journeyman here, with the same error message (Cannot read property 'value' of undefined). I'm not on a Chromebook, so it doesn't seem to be localized to them. I'm using a laptop with Windows 8 and Google Chrome as the browser. If there's anything relevant I can tell you that'll prove helpful just let me know what.

On another note, it's been a while since I stopped back in and I have to say I adore the quick reupload option :yay:

  • Viewing 51 - 100 of 124