Relearn 2017pad 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
Bots session
-
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
-
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.
Vocabulary
-
stanza: "In XMPP, data is sent over a pair of XML streams. The root element for both of these streams is <stream />, 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:
Questions
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
-
incoming message in xmpp
-
pandoc is used to transform the markdown document into html, combined with a stylesheet
-
then weasyprint is used to generate a PDF document
https://wkhtmltopdf.org/usage/wkhtmltopdf.txt