syncing local and remote S3 bucket with s3cmd

So, I started hosting www.bucket3.com to S3.

I use s3cmd to upload my files to S3 and keep local and remote files in sync.

I initially uploaded my files using

s3cmd put --recursive -P html/ s3://www.bucket3.com/

(-P indicates that the uploaded files should be world readable)

Then, whenever I create new content, I use

3cmd sync -P html/ s3://www.bucket3.com/

s3cmd is written in python.

bucket3 "attached" files

If you have posts that link to other media, such as images, you don't have to use absolute URLs. Just include the filenames in the "attached:" field in the frontmatter, and they will be copied to the right folder in the resulting HTML.

Here is an example:

an image

will your content survive?

Yesterday, I came across this post on BusinessWeek: How to save this blog (or at least the posts)

It's a problem I've faced many times: you need to save your old blog, or your old website, in a form that will be accessible i n the future, and won't need any investment (in money or time from your part).

Some may say that the solution is to move your content to an open source content management system. I don't think so. You will have to keep up with the updates, new database versions, incompatibilities of future versions of the CMS with your current hosting environment etc. After a couple of years, you will realize that in order to keep up with the newest versions of the CMS you will have to upgrade your apache server, and then you will find out that you have to upgrade your linux distribution...

IMHO, the best format is static HTML pages. If you have a web server, you will be able to host them. And even if you don't you will be able to read them locally!

This is one of the main reasons I expect a lot from web publishing systems that create static pages in the first place: this content will most probably survive longer.

testing rssCloud

I'm interested to see how I could add rssCloud support to bucket3.

Here is some code in python that seems to work and notify Dave Winer's cloud server.

import httplib, urllib
params = urllib.urlencode({'url': "http://bucket3.com/blog/feed/rss2.xml"})
headers = {"Content-type": "application/x-www-form-urlencoded", 
    "Accept": "text/plain"}
conn = httplib.HTTPConnection("rpc.rsscloud.org:5337")
conn.request("POST", "/rsscloud/ping", params, headers)
response = conn.getresponse()
print response.status, response.reason
data = response.read()
print data
conn.close()

This is my first post!

Hello, World!

This is my first post in bucket3!

Learn more about bucket3,

Modify this file and run bucket3.py again :-)

Fork me on GitHub