Errol is a file sender that can be used to watch a directory and automatically transfers the new files (or modified ones) with XMPP.
You can find the previous description here.
I recently updated it to V2.0.1. This articles describes the changes since last article.
- Replaced all the
yield fromsyntax to
async/awaitsyntax for asyncio calls
- Added some options to enable or not the muc/pubsub features. If your XMPP account does not have a proper pubsub service or if you don't want to advertise your file transfer, these functionalities are not mandatory anymore.
- Moving from aionotify to watchdog. aionotify was not actively developed since 2 years. Even if is not asynchronous, watchdog can be used with hachiko.
Errol should now be usable on Linux, Windows, Mac OS X and FreeBSD because watchdog supports all these operating systems. Note: only Linux has been tested so far.
I also performed small improvements, refactoring and bug fixes.
The list of dependencies has been updated but remains quite small.
You can easily install errol with pip.
$ pip install errol
On Archlinux, a PKGBUILD is available in AUR.
The complete list of options is available in the template config file.
$ cat config.example.ini [XMPP] pubsub_enable=true muc_enable=true pubsub=pubsub.example.org node=be.agayon.errol:0 firstname.lastname@example.org email@example.com/errol password=pass ressource_receiver=-receiver ressource_sender=- nick_sender=example_sender nick_receiver=example_receiver firstname.lastname@example.org/errol-receiver presence_file=/tmp/errol_presence.txt
- jid : the jabber account
- password: the xmpp password
- pubsub: the pubsub server (publish activity)
- room: the MUC (chatroom) where errol display information.
- presence_file: a writable file used to keep track of presences. I use it in a Django Application. 1
The files will be sent by email@example.com/errol-0 and received by firstname.lastname@example.org/errol-receiver . The nicks are the usernames used on the MUC.
Errol should now be usable with only a simple XMPP account and a directory to watch. If you are interested by the Pubsub feature, don't hesitate to read the previous article. It contains a section to setup a pubsub node, configure it and access it with several tools.
- When receiver is online, the file contains '1' and '0' otherwise. It is not super clean but I did not wanted to bring XMPP features in a Django app. ↩