Hi all,
I'm please to announce the release of couchapp 0.8.0 today. You can
download this release on github:
https://github.com/couchapp/couchapp/downloads
- couchapp-0.8-macosx.zip — Couchapp 0.8.0 for macosx
- couchapp-0.8-win.zip — Couchapp 0.8.0 for windows
- Couchapp-0.8.0.tar.gz — Couchapp 0.8.0 sources
As usual you can also install it via pypi:
$ pip install couchapp
More installation options are on the website:
http://www.couchapp.org/page/installing
Full changelog is here:
https://github.com/couchapp/couchapp/compare/0.7.0...0.8.0
Among fixes, some new features and enhancements are available on this
release:
## MacOSX and Windows standalone. On these platforms you don't need
anymore to install Python and dependencies manually, you just need to
use installer, and a standalone executable will be installed.
## Evently have been updated.
## cross-platform autopush features.
Autopush function is now provided by default with couchapp and can be
used on BSDs, Linux, MacOSX and Windows. This features allows you to
synchronyze automatically your couchapp project with one or more
CouchDB
nodes. To use it, launch this command in your application folder:
$ couchapp autopush . somedb
Available options are:
autopush [OPTION]... [COUCHAPPDIR] DEST --no-atomic
send attachments one by one --update-delay [VAL] time between each
update
Technically autopush command is using the watchdog module written
by
Yesudeep Mangalapilly
https://github.com/gorakhargosh/watchdog which
is
provide an API to watch file systems events on most platforms. This
library try to use inotify on linux, fsevents on macosx, kqueue on
BSDs, ...
## hooks can now be shell scripts or python scripts.
This feature allows you to launch a script on different couchapp
actions
(pre/post push, clone, generate). To use it, edit your configuration
file:
{
"hooks": {
"pre-push": [
["py": "somemodule.py"],
["sh": "/some/shell/script"]
],
"post-push": [
"/another/shell/script"
]
}
}
by defaults hooks are shell script. To create a python hook
just add a hook function to the script or module you call.
def hook(path, hook_type, *args, **kwargs):
pass
where path is the couchapp path and args are different arguments
depending on the hook type.
pre-push -> dbs
post-push -> dbs
pre/post-pushapps -> dbs, pushapps=True
pre/post-clone -> sources
pre/post-generate -> None
pre/post-vendor -> source, action (install/update)
enjoy,
- benoît