Major Server Upgrade

My hosting company Open Hosting Inc. or OHI said the server I’ve been running on for about eight years is SO old that they would really rather not support it, and they gave me monetary incentives to upgrade. OHI has these new-fangled cloud hosting server farms that appear to be much more efficient and configurable than the old Virtual Private Server (VPS) technology I’ve been using. So, after about eight years of relative hands-off bliss, I started moving to about a month ago. Most packages ported easily except for my life’s blood: email. That was a bitch.

Continue reading Major Server Upgrade

post from my new nexus 7

So this is the first post from my google nexus 7 using the soft keyboard. Thanks for auto correct or it would be kind of tricky. But my initial reaction to the nexus 7 running android jelly bean is it’s very nice. I can do pretty much any daily task on it almost as well as my laptop. EXCEPT for code development. There just ain’t no way this will run emacs, eclipse and a Java environment. Though Busy box gives me some hope (oh yeah, I “rooted” the nexus – pretty easy so I think it’s not highly discouraged like the NOOK tablet.)

For traditional personal info management tasks (address book, calendar, document view/edit, email), browsing the web, searching the device, music, reading books, playing games, maps, GPS location, viewing videos from YouTube and netflix; this is the best 7in. tablet I’ve seen. And I have just started messing around with Google now – pretty cool voice recognition and on-demand info organized in widget-thingy’s called “cards.”. The Tegra 3 quad ARM A9 processor is really speedy. I could spend a lot of time on this baby.

I tried doing some development on it: a small java app, an NDK C code app via the ADB link from my laptop. No problems so far. I then pulled down the ASOP Jellybean distro from git and started looking at the code. But in reality, studying the android kernel is a BIG time suck.

So now I’m going to try a Bluetooth keyboard and/or ATOMPUB upload to see if this tablet could be my daily beast. Also access the dahetral.com and google websites.

Anyways this touch typing is getting tedious.

Atompub Example File

This is an example atom upload that I'm just testing out. Comments are stripped, so the following wordpress "more" separator is removed

<!--more-->

To load this via AtomPub I use cURL, which has a little bit of a strange interface, but it works. The primary section in this file is <content>, which contains the actual post in XHTML.

The rough source for this post can be found in a PDF doc here. You can hack it up for your site and try out atompub. I have done some editting on file to reference it on the WordPress Codex after I uploaded the PDF, thus this file and the PDF are not exactly the same.

See XHTML Entities for those characters that cannot be used in the content body. Generally, it's just &, >, < and ". Everything else seems to be okay.

For some reason wordpress handles newlines like a <br/> so that's a little tricky. I need to figure out a way for wordpress to eat newlines.

  • To add a new post do:

    curl -v -k -u 'user:pass' -H "Content-Type: application/atom+xml" -T "atom-example.xml" https://www.turvene.net/wp/wp-app.php/posts
  • To update the current post do:

    curl -v -k -u 'user:pass' -H "Content-Type: application/atom+xml" -X PUT -T "atom-example.xml" https://www.turvene.net/wp/wp-app.php/post/<postid>
  • To retrieve the post do:

    curl -v -k -u 'user:pass' https://www.mysite/wp/wp-app.php/post/<postid>

Also, I'm trying to figure out how to format some of the XHTML codes to what I want.
An example using <pre> where <code> ain't
so great:

     main() {
       printf("this is a code fragment");
       
       // C comment statment
       // Another
     }

I can always change the CSS for these to do what I want when I create my own theme. That's on my todo list.

I wanted to add the XML source for this file as an attachment but it was difficult. I had to
convert the file to either Openoffice ODT, M$ doc or PDF format and then link to it
here. But first I had to figure out the link URI for the attachment, which was a little tricky.

The alternative was to use the The WordPress Editor, with which I'm not that happy. Once one edits a post via the WP editor, it is very difficult to update the post using atompub.

So I used atompub to add the link ref above, One can use the post permalink from the site, or the postid. One interesting note is the link can be relative so the whole http://www.turvene.net/wp can be discarded. That's kind of nice.

Using the Atom Publishing Protocol in WordPress

After getting more comfortable with WordPress (See The WordPress Post Editor Is Limited, I started looking at mechanisms to make posting/post updates even easier. I first started writing my own importer based on the Atom Publishing Protocol. And then, much to my delight, looked at a little file called wp-app.php which has the comment Atom Publishing Protocol support for WordPress. Wouldn’t it be great if this did what I want?

Continue reading Using the Atom Publishing Protocol in WordPress

Starting WordPress Blog

Well, I got fed-up with maintaining a blogging product on my company website (see FOSS products) and decided to look around for alternatives. A lot (a great big bunch) of people are using WordPress for their personal blog page. In fact one of the big Google architects, Matt Cutts uses it for his personal blog. So I’m trying it.

And here’s how…
Continue reading Starting WordPress Blog