GithubHelp home page GithubHelp logo

pyroscope / weeplug Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 1.0 292 KB

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

License: GNU General Public License v3.0

Python 100.00%
weechat weechat-scripts python python-plugin

weeplug's Introduction

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.