astolat (astolat) wrote,
astolat
astolat

Fanfic-conversion macros

This is a casual but useful set of Microsoft Word macros for converting doc files into clean HTML files (as opposed to the awful bloated versions created by Word's "Save As HTML") or into plain text files ready to paste into an LJ post or upload to an Automated Archive style archive (ie, with formatting tags but not paragraph breaks).

FanficMacros.zip (right-click save, look at the README file)

README

Totally not guaranteed, warranted, or anything else. If it blows up your computer, not my fault. *g*

by astolat on livejournal.com

Quick summary:

FanficWordMacros.txt
This is a file full of Microsoft Word macros. It will work in Word 2003 and 2007 under Windows, Word 2004 under Mac. It will NOT work in Word 97 for Windows or Word X for Mac. Sorry!

Here's how you install:
  1. Open Word

  2. Go to View Macros
    Word 2003 for Windows: Tools menu, Macros..., View Macros
    Word 2004 for Mac: Tools menu, Macros..., Macros
    Word 2007 for Windows: View menu, Macros..., View Macros

  3. If you already have a macro, select it and choose "Edit"; otherwise, put in some random macro name in the text box at the top and choose "Create". (You will be deleting this random macro in a second.)

    This will open up Visual Basic.

  4. In Visual Basic, if you have created a random macro and the file is otherwise empty, select the whole thing and delete it to make the file empty. Otherwise, just put your cursor on a new line at the very bottom of the file, after all of your other macros.

  5. Open up "FanficWordMacros.txt" (in Word or in a text editor, doesn't matter). Copy the entire contents of the document.

  6. Go back to VisualBasic and paste in the entire contents of FanficWordMacros.txt.

  7. Save and close VisualBasic. You should now have a whole bunch of macros in your Macros menu.

  8. Now open FanficMacroTesting.doc. It has instructions at the top for how to use the macros. Run the macros ConvertToHTML and ConvertToLJ on this file to test that the conversion is all working fine.



You don't need the rest of this -- the above will convert your doc files just fine, and then you can upload them anywhere you want and link. It's more for anyone who is curious about how I then go on to use this to instantly update my website.

index.cgi
This script is my index page on my fanfic website. It automatically updates the listing any time I drop in a story converted to HTML using the the "STORYINFO" chunk that gets stuck in at the top by the above macros. IE, I never actually touch my index, I just convert the story and bang it in. As you can imagine, this makes updating a lot easier.

Unfortunately, I didn't really write it to be shared, so it's only tossed in here as a basis for experimentation, but I hope it's not too hard to understand if you poke at it a bit. If you go look at

http://www.intimations.org/fanfic/

and see how my index works, it should hopefully make a lot of the script clear. Basically, you have index.cgi sitting in one directory, then you have one subdirectory for every fandom, and you drop your stories into those subdirectories.


cgi-lib.pl
This is just an old standard perl library that needs to be in the same directory as index.cgi for that to work.



Alas, I can't support or help if you run into trouble, sorry! Feel free to muck with it any way you want. Many thanks to nestra, balefully, setissma, and tahariel for helping me out with the testing!


eta: there is now an updated version of these macros for OpenOffice.
Tags: fanfic, tech
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 50 comments
Previous
← Ctrl ← Alt
Next
Ctrl → Alt →
Previous
← Ctrl ← Alt
Next
Ctrl → Alt →