[Subversion] / CityKid / citykid / commands.py |
No default branch
Bookmark a link to HEAD:
(view)
(download)
(as text)
Add dump command, to export raw CityDesk data w/.json sidecars and/or front matter
Py 2.7 compat; add postmortem debug for CityBlog (which essentially is dead meat now anyway since Google dropped the old blogger API for good.)
Uploads via rsync, assuming you have Cygwin in c:\cygwin and the target specified in the ``rsync_target`` CityDesk variable.
Read the blogger blog ID, user id, and password from CityDesk variables instead of the command line, so at least you don't have to put them in the registry (and so you can upload to a different blog from different files with the same Tools menu entry).
Don't try to convert unicode to a string before encoding it to UTF8. (D'oh!)
Don't crash on empty folders.
Added 'text' attribute to articles, to get processed version with PTMFOG magic names removed. Added timestamp preservation: files whose contents haven't changed will keep the same timestamp, to better support the use of tools like "make" and rsync. Orphan deletion: files that do not have a corresponding CityDesk object will be deleted when the containing folder is published, thus cleaning up debris in the staging area when objects are renamed or deleted. Simplified save() process for greater efficiency. Added 'byTemplate' mapping to find articles by their template type. Added 'sorted()' implementation for Python 2.3.
Simplified template loading, by using a version of Kid that incorporates my namespace initialization patch. Only launch generated .html files or directories, not other file types like .gif, .css, etc.
Support absolute links in teasers. XML and XHTML output. Refactor to allow easier calling of Kid code that's in an article body. Indexes for audience, article name, keywords, and path. CityKid can now regenerate the entire dirtSimple.org site in about 26 seconds, including startup time, which is slightly faster than CityDesk. Regenerating individual pages of course takes much less time.
Output files. Save articles in XHTML Transitional. Walk the site hierarchy and generate files. Launch the folder or article after completing generation. Allow templates access to the running command as 'cmd'. The 'citykid' command is now essentially sufficient to substitute for CityDesk's built-in scripting language, although there are many convenience features that will probably be needed or desirable, such as XML output for articles with an .xml extension (e.g. RSS/Atom feeds).
Write page(s) to files in a staging area adjacent to the .cty file. Support teaser [[self-links]]. Add a template-accessible variable for the 'all' collection, containing all articles available to publish during this run. Preload all articles and folders for maximum processing speed.
Implement kid templating. Declare setup() dependencies correctly. Compute relative links. More efficient state preloads. Processing for CityDesk's PTMFOG##### "magic name" links. About all that's left to implement is writing out articles to files in a staging area, and some usable querying methods for common operations. (And maybe options to launch a web browser on the file(s), or rsync them to a server. And maybe docs, in case anybody besides me ever wants to use this...)
Another attempt to fix the screwed-up import
cvs-admin@eby-sarna.com Powered by ViewCVS 1.0-dev |
ViewCVS and CVS Help |