11th June, 2008

F-List to OPML in 11 Easy Steps

Wednesday, 10:46 am in Geeking

You remember a little while ago how I talked about stalking people on LiveJournal via RSS? Well, it’s come to my attention that people might be interested in learning the find-replace fu by which I turn a friends list into an OPML file for import into something like Google Reader. The trick is actually pretty simple. Here’s how it works.

You Will Need
  1. A friends list. This can be found on the profile page of any LJ Server-based journal.
  2. UltraEdit. Strictly speaking you can do this with any text editor (see caveats below), but UltraEdit is what I’m going to be using.

Step #1
[ image ]

First off, go to the profile page containing the f-list you wish to copy. Select all the user names (you can do communities, too, but you’ll have to do them separately as the URI is different), and press Ctrl+C to copy them (Option+C on a Mac).

Step #2
[ image ]

Paste (Ctrl+V) your list into your text editor. You should be left with a comma separated list of usernames.

Step #3
[ image ]

This is where the magic happens. Open your text editor’s find-replace box (probably Ctrl+R). In the Find field put:

,

(That’s comma-space, incidentally, not just comma. Don’t forget the space or this whole thing won’t work!)

And in the Replace field put:

.livejournal.com/data/atom?auth=digest"/>^p            <outline type="rss" xmlUrl="http://loqia:********@

Here’s where you get some options.

  • Change livejournal.com to journalfen.net/insanejournal.com/whatever if appropriate (but see below).
  • Remove ?auth=digest if you don’t want to authorise yourself. This will mean you won’t be able to read your f-locked entries, but remember that a lot of feed readers – including Google Reader – don’t support this authentication method.
  • The ^p inserts a new line character in UltraEdit. Strictly speaking, you don’t need this; it just makes your file a bit neater. Remove it if you’re using something like Notepad, or replace it with whatever your editor uses as a new line replacement. If you’re unsure, remove it.
  • loqia:********@ is used in conjunction with ?auth=digest above. If you’ve removed that bit, remove this too. If you’re leaving it in, remember to change loqia to your username and ******** to your account’s password.

Execute your find-replace across all comma-spaces in your file.

Step #4
[ image ]

If all is well, you should end up with something like this.

Step #5
[ image ]

Now, go to the very start of the very first line in your file. Insert the following:

<?xml version="1.0" encoding="UTF-8"?>
<opml version="1.0">
    <head>
        <title>My F-List</title>
    </head>
    <body>
        <outline title="F-List" text="F-List">
            <outline type="rss" xmlUrl="http://loqia:********@

(Remember to change loqia:********@ in the same way you did in the previous step.)

You can change the My F-List and F-List text if you really want to. This usually maps to the folder name your reader will import your feeds into. Remember: No quote marks.

Step #6
[ image ]

Check you’ve got something that looks like this (note I changed the title; inconsistent me).

Step #7
[ image ]

Now go to the very end of the very last line in your file. Insert the following:

.livejournal.com/data/atom?auth=digest"/>
        </outline>
    </body>
</opml>

(Again, remembering to change the server name and auth string if appropriate.)

Step #8
[ image ]

Review time again. Okay, this is a crappy example pic. Hopefully you get the idea.

Step #9
[ image ]

Save you file! Call it whatever you want, but make sure to give it the extension .xml. Congratulations, you just turned a CSV list into an OPML file! You 1337 data-manipulator, you.

Step #10

Import your shiny new OPML file into your RSS reader of choice. Each reader has a different way of doing this, so you’re on your own for this step.

Step #11

[ image ]

Profit!

Extension Homework

Incidentally, this process for doing communities is almost exactly the same. The only difference is the replace string looks like:

/data/atom?auth=digest"/>^p            <outline type="rss" xmlUrl="http://loqia:********@community.livejournal.com/

I’ll let you figure out the changes to Step #5 and Step #7 yourself.

Oh, and for sites like JournalFen that don’t support usernames-as-subdomains, you’re looking at something more like:

/data/atom?auth=digest"/>^p            <outline type="rss" xmlUrl="http://loqia:********@journalfen.net/

Again, I’m sure you’re clever enough to handle the other changes.

So, yeah. Easy.

Comments

Add Comment
auto insert line breaks
use log.code
use smilies
Verification
  • v-s.net v0.6 and all content (unless noted) © Dee.
  • sk.log v0.6 spat this out in 2.123 seconds.
  • 37 / 216,422
artistic-twobyfour