I need to write a draft document that borrows from my previous blog posts. A sane (non-techie) person might just write the freaking document, already. But that is not the Geek Way. So I’m now in the middle of an epic yak shave:
- Installed a WordPress plugin that allowed me to export my blog archive as a CSV file.
- Opened the CSV file in Excel and culled the irrelevant posts (in rows). Needed to clean out all the HTML.
- Saved the new CSV file and opened in a text editor.
- Tried to clean out HTML using search-and-replace with wildcards; didn’t work in my text editor, so I tried Word. Didn’t work in Word, so I tried a third text editor.
- Searched for a Mac program that could strip HTML, but only found PC options.
- Looked into online tag strippers; uploaded my file to one that didn’t work. Searched again and found one that worked via cut-and-paste.
- Copied and pasted the text into an online HTML tag-stripper to get rid of the HTML
- Copy & pasted the stripped text back into a text editor and saved as CSV again.
- Opened the revised CSV file in Excel, at which point I decided Excel wasn’t the right tool for reorganizing my posts into a new order.
- Researched a variety of note-organizing, writing and database software options, a process that briefly digressed into signing up for SpringPad (not the right tool for this job, but looks super cool)
- Selected Scrivener as the most promising tool for reorganizing my old posts into a new draft, because it has a corkboard that lets you organize files that then generate a draft.
- Discovered Scrivener couldn’t import CSV, so opened my Excel file in Word and saved my file as a .doc.
- Discovered Scrivener simply imported my file as one long document, not suitable for reorganizing; I’d have to import multiple files if I wanted each post to be something I could move around within the overall hierarchy.
- Looked for an Excel file-splitting tool, but discovered the only option was for the PC version only.
- Looked for a CSV file-splitting tool, but discovered that most posts and sites pointed to a PC-only tool.
- Looked for Applescripts that might do the job and found a couple of potential options. Each option required me to join a new forum, verify my account via e-mail, download the script, open and adjust the script, and then run it. Neither worked.
- Looked for Automator options; discovered my version of Automator won’t run because it’s out-of-date, and the new one isn’t available for download because it’s part of the OS (can’t imagine how mine ended up out-of-date). Asked Rob to copy his up-to-date version over to my Mac.
- Meanwhile, got home where we have Parallels Desktop set up on one of our machines, which lets us run Windows; maybe I’d just use the Windows CSV splitter. Parallels wouldn’t launch without an activation key; searched Gmail for the activation key, which didn’t work. Apparently at some point we upgraded to a now-expired trial, which we can’t buy a key for because it’s now deprecated. Downloaded a new trial. Now installing.
- Windows launched on our home computer, but can’t access the ethernet port. Rather than troubleshoot the connection, I’m downloading CSV Splitter to my Macbook and moving it onto the computer running Windows.
- Can’t get any file on the Mac side to move over or be seen by the Windows side. Trying a USB keychain instead.
- Well, I got the CSV Splitter file over to the Windows machine, along with the file to split, and got it running. But the application is designed to split MASSIVE files, not tiny ones; it won’t output a file with fewer than 100 lines, so it’s not the tool to split up my 128-line file. Sigh.
- Tried creating an automator workflow but couldn’t get it to run. The built-in workflows didn’t work reliably either, so I decided to try looking at Applescript instead.
- Checked into some options for using Applescript but got discouraged. Maybe there was another software tool I could use instead of Scrivener?
- Decided to see how my manually-created files imported into Scrivener. When I imported the files into the Manuscript section of my “binder” as opposed to the Research section, noticed an “Import and Split…” option. Gave it a try but it only split my files into 22, not 128.
- Read the Scrivener manual section on “import and split” and realized problem was caused by my csv file using a quotation mark as a delimiter — even though the text was itself full of quotation marks. Used SubEthaEdit to run a search and replace on
” [empty line] “, replacing each instance with a pipe character: | . It reported 122 replacements, which I figured meant that MOST of my posts got separated properly. - Ran “import and split” in Scrivener on my .csv file (which I had renamed as a .txt file) and voila! I’ve got 122 notecards on my corkboard.
Now I guess I actually have to write the damn document…
I groan in sympathy. Been through processes like this many many times. If we use automobile technology as analogy, we’re still in the Model A Ford days. The hardware, amazing. Systems and software, when are they going to get things to fly?
Can you say procrastination?
I realize this is quite old, however I’m in the midst of a yak shave myself. I bet if you took that CSV file and did a mail merge in Word, separating each record with something unique, that you could then import that Word doc and tell it to use the separator to split it into Scrivener files.
My challenge is to get a CSV file into Scrivener and preserve the metadata. I think I can do this using Aeon Timeline. Wish me luck.