Total Pageviews

Tuesday 19 November 2013

博客发布助手-jpa

http://jpa.berlios.de/
http://jpa.berlios.de/docs.html#quickstart

Installation guide

This section describes installation procedure for pre-release (0.x) version of JPA. Final versions will have more polished installation routine, but for now it's required to install some packages in separate steps. Sorry for inconvenience.

Python

Ensure you have installed Python version 2.4.0 or newer. Python for main platforms (Windows™ and Linux™, it is already installed on OSX™) is freely downloadable from its homepage or from ActiveState. If you are on Windows™, I recommend downloading and installing ActivePython distribution, as it will contain few additional libraries. If this is not an option for you (or you want to stick to default Python due to other reasons), you will also need to download and install Win32 Extensions for Python. Although this package is not a strict dependency and the program will work without it, its presence will activate many additional functions of program, so I consider it a highly recommended package for Windows™ users.

GTK runtime and PyGTK

JPA uses GTK as GUI library, so you will need to download and install GTK runtime and Python bindings for GTK. This should not be a problem on GNU/Linux, as GTK is usually installed by default on any modern distribution, but Windows™ users must download and install separate packages. If you don't want/plan to hack JPA, GTK runtime from gladewin32 project will be sufficient, otherwise download and install developer edition from this website. Be aware that most probably other distributions of GTK runtime will not work (i.e. the runtime from Gimp does not contain Glade libraries).
The next step would be download and installation of PyGTK, Python bindings to GTK. Windows users can download this package from Cedric Gustin's website. There was a rumours, that version 2.8 is unstable on Windows™ but I didn't observe any unusual behavious. As usual, your mileage may vary, so if you experience program crashes, try to uninstall PyGTK 2.8 and install version 2.6 (they should be enough compatible). Again, GNU/Linux users should be able to install PyGTK in easier fashion from its distribution sources, if it's not installed already. If you happen to be the user of some exotic distribution, you may always get the sources and install them in usual fashion.

SQLite and PySQLite

JPA requires SQLite 3 and PySQLite 2. GNU/Linux users should be able to install them from their distribution sources. Windows™ users need to download and install only PySQLite. Please, select newest stable version available (2.2.2 at the time of writing this document).

SQLObject

JPA requires SQLObject version 0.7 or newer. It may be downloaded from Python CheeseShop. Earlier versions will definitely not work as they lack proper unicode support, installing bugfix versions is highly recommended. This library is considered stable, although its version number resembles beta software.

ElementTree and cElementTree

As most of conversation with remote services is done using XML, JPA requires installation of Fredrik Lundh's ElementTree library. To speed up XML document processing, additional installation of cElementTree is recommended. It is possible, that future versions of JPA would accept any implementation of ElementTree interface (i.e. lxml), but for now the original one is required. Be aware, that this step would not be required with Python version 2.5.0 and above, as ElementTree implementation will be included in standard library and JPA would be ready for this new feature just in time.

GTKSpell

To be able to use spell checking on GNU/Linux systems, you will need GTKSpell library, which is available as a part of gnome-python-extras package (this package is not available to Windows™ users, sorry). You must install this package to be able to use spell-checking in entry editor window. Installation of this package is strictly optional, although I find this functionality very handy, so consider installing this library a recommendation.
Future versions will provide separate installation of this library and installation of the gnome-python-extras will not be required.
Back to table of content

Quickstart guide

After succesfull installation of JPA and all its dependencies, you have to define some so-called identity — it's a set of data, by which you identify yourself in your weblogging service. Identity is closely tied to service and may contain data such as your login (aka user name), password and some other data specific to you. Go to "Tools" and select "Identities" menu item. A window with empty list should appear, so click on "Add" button. A form with few fields will appear. Give your identity a name, select service type and fill your login data. In case you selected generic type (MetaWeblog or XML-RPC Blogger), you have to supply some additional data, so expand "Advanced" and fill required fields: select protocol type (XML-RPC) and service URI (aka entry point, you might want to ask your administrator to provide you such data). If your service works on non-standard network port, uncheck "Use default port" and fill the field (again, you may have to ask your service administrator for this data). Click on "OK" button to save your data. If your service supports weblog discovery (blogger.com and generic services are known to support this feature), you may click on "Discover weblogs" button to get a list of your weblogs in this service. A window with list will appear and after some time (it's a network operation, so it may take up to minute or two) list will be filled with data retrieved from service. Had you had any weblog, you may check a tick mark in first column of the list and the weblogs will be added to your weblogs list after clicking on "OK" button. Close the identities list and go to "Tools" menu again, but click on "Weblogs" menu item. A window will open, with a list of all your weblogs. When you define more identities and have more weblogs, in this window you will be able to limit displaying weblogs to specific identity. You can also perform weblog discovery from here.
Having a weblog already defined, you can write and publish entries, edit existing entries and republish them, even delete entries from remote services. Happy blogging.