Python Community Server: Development

A weblog about programming in Python, C#, Java, Perl and C++ - and the occasional comment on PyCS development
new: discuss community servers on the CommunityServerWiki!

SunMonTueWedThuFriSat
1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31

[ Sep ] [ Nov ]

the locals
also available in XML
Copyright (c) 2002 Phillip Pearson
spread the dot

2002-10-31

Note to self

Read this article about programmatically creating Access databases from within C#.

This is something I need to make DbWrappers do for it to really save developer time.

For the uninitiated, DbWrappers is a tool that makes C# code out of database definitions (in XML), so you can do stuff like:

using ( MyReader r = MyTable.SelectMany( null, null ) ) {
    while ( r.Read() ) {
        MyRow row = foo.Row;
        // (now do something with 'row', like drop it in an ArrayList)
    }
}

That saves you a few hundred lines of code, and makes database refactoring somewhat less painful - you only need to change two bits of code, not about 5.

Anyway, if I can get it to generate its own tables, you'll only need to change one bit of code, which is perfect.

Comment on this post [ so far]

Upstreaming to a Radio Community Server without Radio

I see that Christian Crumlish wants to put a file on his defunct space at Salon.Com that he has abandoned for a slightly nicer URL, and now wants to upstream files to that server to finish off the job of redirecting his old RSS feed to the new location.

Unfortunately, his copy of Radio is now set up to upstream to the FTP server for his new site, and he can't get it posting back to Salon. Here's a quick solution for him - a little bit of Python code to just upstream a single file to a community server.

Download this --> upone.py

You need to have Python installed. Just download the installer from that link and accept all the defaults (if you're on Windows, which presumably you are if you're using Radio). Once you've installed it, open a command prompt in the directory you saved upone.py into, and type:

upone.py (server RPC URL) (usernum) (password) (local filename) (remote filename)

If you're upstreaming to blogs.salon.com, you want:

upone.py http://rcs.salon.com/RPC2 (usernum) (password) (local filename) (remote filename)

And Christian wants to make a file called rss.xml in the same directory as upone.py and run:

upone.py http://rcs.salon.com/RPC2 0001111 (password) rss.xml rss.xml

Look for the bit in the response starting with "message" and make sure it says something positive. If not, and you can't figure out what's gone wrong, drop me a line (there's a mail link on this page somewhere) and I'll help you out.

Comment on this post [ so far]

Testing the new weblogs.com RSS RPC URL

Hmm ... RSS pings to Weblogs.Com are now meant to go to rssrpc.weblogs.com/RPC2. This post is a test to make sure I've got it right in bzero.

Comment on this post [ so far]