|
Cookbook /
Python-based Pmwiki EditorSummary: Provides author-preferred text editor support for PmWiki page edits
Version: 1.3.1 (February 9, 2007)
Prerequisites: Linux, a text editor.
Status: Beta
Maintainer: BenWilson
Categories: Editing
Table of Contents Q: I would like to edit PmWiki pages using my favorite text editor. A: The Python-based PmWiki Editor is a program intended to serve as an intermediary between your editor and the PmWiki page you want to edit. It was originally written to support vim. However, it should work with any text editor. If you use Emacs, please consider the Emacs PmWiki Mode as it was designed with Emacs in mind. Not that this recipe slights Emacs, but that recipe may provide a better solution for your Emacs-need. BackgroundScott Duff wrote a program called pmwikiedit, a Perl-based application that retrieves source from a Pmwiki site, allows the individual to edit the source using his favorite text editor, then repost the amended content back to the web server. I used that program greatly in the beginning, but when PmWiki v.2.0 came along, I found increasing difficulty with its use. Recently, I wanted to edit pages using vim like I used to when pmwikiedit worked. I also was working on my Python skills. As I am prone to doing, when trying to master a new language, I wrote this program from scratch in Python. I also sought to introduce various features that I found interesting to have. Pywe is a Python-based wiki-editor that allows the user to edit PmWiki pages using his preferred text editor. CommentsThe user-contributed commentary and notes regarding this recipe are found on the Pywe Discussion page. Related Recipes UsedShare other recipes that you use in combination with this recipe. Alternative Recipes UsedShare a recipe you use instead of this one. Download
Usage
In the first example, the "domain" refers to the section of the Options
Local File Interface. Pywe has three primary ways of using local files. First, the inject option submits a local text file to the PmWiki page. Second, the keep option keeps a local copy of the wiki page after it is edited by the author. That is, the remote copy is fed into the editor, and the copy submitted to the wiki site is kept as a local copy. Finally, the pull option simply pulls the remote copy and saves as a local copy. This can be used in conjunction with inject to allow the author to pull down a copy, edit and repost (although interviening changes would be overwritten). Beyond these three methods, a failed upload should archive the edited copy (similar to keep) locally to allow the author to inject the page when the network interference has passed. Deleting Pages. Pywe will allow deleting of pages. When invoked, the delete option will ask the user to confirm deletion by typing the word 'delete,' which is meant to put a person in the process and avoid automated deletions. Dating Pages. Pywe has two options for dating pages. This is meant to help those who either journal or update a Pm Calendar using this application. The date format for the calendar is "YMD" and the format for journalling is "Y-M-D." Pywerc FileThe Pywerc file is an RFC 822
compliant "*.ini" file formatted configuration file. This allows the
user to configure options via a configuration file such that a different
set of configurations exists per domain. This is represented by the
Pywerc Configuration Variables. To reduce typing, the .pywerc file stores the following values on a per domain basis.
Issue TrackingAre you aware of a problem with Pmwe? This recipe is actively maintained on a the Python-based PmWiki Editor web page. There I maintain a development journal, a repository for defects and features and a more complete release history. Release Notes
|