User:Tancre/Others/How to set a live collective webpage (Raspberry Pi+Etherpad): Difference between revisions

From XPUB & Lens-Based wiki
No edit summary
No edit summary
Line 1: Line 1:
= How to set a live collective webpage =
= How to set a 'live' collective webpage =


== What do you need? ==
== What do you need? ==
Line 5: Line 5:
* etherpad
* etherpad
* [[Wget]]
* [[Wget]]
== How does it work? ==
== What - Where==
/var/www/html/liveHTML
*README.txt
*live.sh
== How ==
=== live.sh ===
<source lang="bash">
#!/bin/bash
while true                                                      # run a loop
do
wget -O live.tmp https://pad.xpub.nl/p/test/export/txt          # download the txt of a pad's link into a file.tmp
mv live.tmp live.html                                            # rename .tmp into .html
sleep 5                                                          # 5 seconds delay
done                                                            # restart the loop
</source>

Revision as of 17:21, 23 January 2019

How to set a 'live' collective webpage

What do you need?

  • web server (Rapberry pi + apache2)
  • etherpad
  • Wget

How does it work?

What - Where

/var/www/html/liveHTML

  • README.txt
  • live.sh

How

live.sh

#!/bin/bash

while true                                                       # run a loop
do
wget -O live.tmp https://pad.xpub.nl/p/test/export/txt           # download the txt of a pad's link into a file.tmp
mv live.tmp live.html                                            # rename .tmp into .html
sleep 5                                                          # 5 seconds delay
done                                                             # restart the loop