Adventures in Server Administration II: The Quickening

This is taking a little longer than I had expected it would take. It’s almost like there’s a reason people use Tumblr and Squarespace and stuff. Who could have guessed that?

I’m kidding. It’s not like I’m really waiting on anything other than myself. I’m lazy — turns out.

I looked up how to make a named virtual server in Twisted. This is what lets Twisted serve content based on the domain name it’s receiving. The way I was doing it before was the command line arg that serves a path you pass with an arg. Which would have been fine if I wanted to only serve on this server. Nothing against The Prompt, but I don’t like them that much.

It’s easy enough though, you make a text file, and throw some Python code you copy and paste from the Twisted docs — Et Voilà: You’re a neckbeard! The server now correctly handles the traffic for the domains.

Crap, I have to put stuff in the directory now.

Fucking Content!

I had decided to look in to Pelican to import the Tumblr posts, and to serve the new site. I’ve heard good things for a long time about it. I have also heard about Statamic, and how Statamic is statamazing from Sid O’Neil, Cory Dransfeldt, and Eric Hess, but I’m a rebel. (Like all the other people that use Pelican.)

I installed Pelican, easy; I installed Markdown, easy; I installed Fabric, KABOOM! It seems it’s dependent on the pycrypto package which needs to make some C magic happen. LOL C. Fuck it. It’s not a requirement so I moved past it. YOLO!

I made an API key for Tumblr (just fill the form in with lies!) and then I ran the little thingy that pulled down all the files. It made a bunch of yucky, ReStructuredText files. Gross. I found the flag for Markdown, but the results were also busted.

Bad news! The Tumblr importer script not only made the files in RST, it unnecessarily parsed them in to it instead of just leaving the HTML alone inside of the file. So that’s fubbared everything.

I rewrote the part of the import script that modified the content (I commented out the subprocess to pandoc — good grief!) This successfully gave me the HTML, as-is. Unfortunately, I needed to strip the tumblr URL’s for my blog while leaving other Tumblr URL’s alone. I added kwargs to pass the appropriate info to the function and it worked. Unfortunately, it still botched a bunch of other stuff. They make it sound deceptively easy to import. I’m looking in to how to to correct the read-more references, and to correctly display reblogged content. Right now, that content is attributed to me. I can’t knowingly, in good conscience, upload these files until I figure out how to attribute the reblogs appropriately.

I did go through all the trouble to modify the default Pelican template to look exactly like what I had on the Tumblr blog. Considering the fact that I never really liked the look of Tumblr blog, this is actually disappointing. (Glares at Satatmic themes.)

You win this round, Tumblr. Be warned: I am, like, THIS close.

2014-04-08 19:01:41

Category: text