Skip to content

pyroscope/weeplug

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

weeplug

A collection of WeeChat Python scripts.

To make writing these scripts easier, weeplug provides the plumbing and helpers to write them in an object-oriented style, and hides the gory (C) details of the Python plugin as far as possible, like manual memory management and so-called ‘pointers’. weeplug also makes it easy to use a Python virtualenv, to provide your WeeChat scripts with external dependencies.

Installation

weeplug is a normal Python package and uses a standard Python project layout. The package is installed into a virtualenv dedicated to WeeChat, and then shoehorned into the Python plugin's loading mechanism by means of a shim file.

/usr/bin/virtualenv ~/.weechat/venv
~/.weechat/venv/bin/pip install -e "git+https://github.com/pyroscope/weeplug.git#egg=weeplug"

To directly use the code from a git working directory at another location, additionally call this command:

~/.weechat/venv/bin/python ./setup.py develop -U

TODO add weeplug link helper command to do this

Finally, to make the weeplug scripts available within your WeeChat configuration, symlink the shim.py file to the default script location for each script.

weeplug_base="$(dirname $(~/.weechat/venv/bin/python -c 'import weeplug; print weeplug.__file__'))"
for script in "$weeplug_base/scripts"/[^_]*.py; do
    ln -nfs "$weeplug_base/data/shim.py" ~/.weechat/python/"$(basename $script)"
done

Usage

'fluxfeed' Script

TODO

References

Related Projects

GitHub

About

A collection of WeeChat Python scripts, and an OOP layer for WeeChat.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages