pad for things around the local network local network A local network as documentation tool. Server Log in $ ssh username@complex.local Server Users & groups to add a user: $ sudo adduser username there is a group called "relearn", it has a extra reading rights on the server for the following folders: - /var/lib/prosody/ - to add everyone to this group: $ for user in *; do sudo usermod -a -G relearn "$user"; done to show all users on the server: $ Etherpad Etherpad-lite We are using an Etherpad-lite installation, it is running on port :9001 * the etherpads are saved in a mysql database Etherdump by Michael Murtaugh, made for http://etherdump.constantvzw.org/ - git: https://gitlab.com/activearchives/etherdump xmpp * modules http://prosody.im/doc/modules + https://modules.prosody.im/ * extentions http://prosody.im/doc/xeplist * For logging: http://modules.prosody.im/mod_message_logging.html and or http://modules.prosody.im/mod_muc_log.html * example xmpp bot: https://git.bleu255.com/rms/log.html * for python use sleekxmpp: https://github.com/fritzy/SleekXMPP Bots session * enable mod_muc_log: https://modules.prosody.im/mod_muc_log.html $ cd /etc/prosody $ sudo nano prosody.cfg.lua add "muc_log" to ......... $ sudo prosodyctl restart * use muc_log_http: https://modules.prosody.im/mod_muc_log_http.html $ cd /etc/prosody $ sudo nano prosody.cfg.lua add "muc_log_http"; >>> didn't work for us * read the logs: $ cd /var/ ???????? RMS bot https://git.bleu255.com/rms/files.html $ pip install argparse logging sleekxmpp pyasn1 pyasn1_modules $ python rms.py -j username@domain.org -p entrepot -m room@muc.domain.org relearn bot https://gitlab.com/relearn/relearn2017 (soon) $ pip install argparse logging sleekxmpp pyasn1 pyasn1_modules * step 1: make a bot account (bot@domain.org) * step 2: invite the bot to the muc * step 3: run the bot from your terminal $ python relearn.py -j bot@domain.org -p entrepot -m example@muc.domain.org -j = jabber id -p = password -m = muc Bot needs * xmpp account: bot@complex.local * python scripts: (which depend on a .json file + software dependencies) * general bots * welcome.py * archive.py * introduction carousel * local_network_bot.py * etherpad_bot.py * xmpp_bot.py * collaborative_methods_bot.py * Chat rooms: * welcome@muc.complex.local - general common chatroom * update@muc.complex.local - for the update messaging board * local_network@muc.complex.local * etherpad@muc.complex.local * xmpp@muc.complex.local * collaborative_methods@muc.complex.local * rhitdol@muc.complex.local * vtna@muc.complex.local * nsuosp@muc.complex.local * cctf@muc.complex.local to do - install etherpad on complex - connect bot to etherpad - make pdf out of incoming message - connect to printer (connect printer to the network) sleekxmpp For the bots we use the library SleepXMPP. * documentation: https://github.com/fritzy/SleekXMPP/wiki * website: http://sleekxmpp.readthedocs.io/en/latest/ * list of events (triggers): http://sleekxmpp.readthedocs.io/en/latest/event_index.html * introduction to muc bots: http://sleekxmpp.readthedocs.io/en/latest/getting_started/muc.html Vocabulary * stanza: "In XMPP, data is sent over a pair of XML streams. The root element for both of these streams is , and any direct children of this element are referred to as stanzas. A stanza is just a chunk or fragment of XML sent during any XMPP communications. There are three main types of stanzas: * (See Stanzas: Message) * (See Stanzas: Presence) * (See Stanzas: Iq)" From: https://github.com/fritzy/SleekXMPP/wiki/Stanza-Objects Questions * how is "self" used in python classes? https://docs.python.org/3/tutorial/classes.html * How are the users bot & rms related to eachother? Role of the bots * interventionists on top of the etherpad * perhaps we should not see the XMPP muc's as the place to archive material, as the pads will be archived * For example: can a bot be a collector-tool? Where you could send interesting parts of the pads to? Or pictures? People can start a muc for a specific collection, and start adding items to it. The bot takes them from the pads (or from a file), following the padname + line number. It copies the content and places it into a .md file. (This file can be pandoced to html/pdf/...etc!) update bot 1. incoming message in xmpp 1. pandoc is used to transform the markdown document into html, combined with a stylesheet 1. then weasyprint is used to generate a PDF document https://wkhtmltopdf.org/usage/wkhtmltopdf.txt