Awnlib
From AWN Wiki
Contents |
[edit] About awnlib
awnlib is a library that wraps around the default AWN API so that writing applets is easy and fun. The current version is 1.5, which is an official part of libawn-extras (itself a part of awn-extras). You can visit the Forum Thread to contact the developer, but IRC (irc.freenode.net/#awn) is prefered.
[edit] awnlib 2.0
awnlib is currently in version 1.5. Its developers hope to release a version 2.0 rather soon, which will bring the following changes:
- Full PEP8 coding style. Overall, this will involve renaming the library and changing a few method names.
- Limit all lines to a maximum of 79 characters.
- Function/method names should be lowercase, with words separated by underscores
- Modules should have short, all-lowercase names
- See also: PEP8 Checker
- A stable API, so that updates to awnlib will not break existing applets
- A way to test the library, probably in the form of a testing applet
- A general code review
- Perhaps other changes
In any case, awnlib 2.0 will be deployed in such a way so as not to break applets based off of 1.5.
Hopefully, awnlib can be integrated into AWN proper (not just AWN-Extras) shortly after the release of 2.0.
[edit] Tutorials
There's a nice tutorial called Writing Applets With awnlib that shows you how to get started, explains how to use themed icons, saving and retrieving settings, creating a preferences window, how to use a Cairo context or just an image as your applet icon, timers, and much more.
[edit] API Docs
The API documentation is available as a PDF file, as generated by epydoc. These are API docs for 1.5.bugfix. They can also be generated from the python source by running epydoc --pdf src/libawn-extras/bindings/python/awnlib.py in the source folder (this requires epydoc to be installed). Generating the docs yourself has the benefit of always giving you the most recent docs.

