Browse Source

reverted the 3 previous commits ;), (Danny laughs at me), and using subprocess.call() now to let the bot generate the website

master
mb@mb 7 years ago
parent
commit
27daffefe2
  1. 4
      streambot.py

4
streambot.py

@ -3,7 +3,7 @@ import logging
import argparse import argparse
from sleekxmpp import ClientXMPP from sleekxmpp import ClientXMPP
from sleekxmpp.exceptions import IqError, IqTimeout from sleekxmpp.exceptions import IqError, IqTimeout
import os import os, subprocess
import urllib import urllib
import datetime import datetime
import ssl import ssl
@ -85,7 +85,7 @@ class ArchivistBot(ClientXMPP):
urllib.urlretrieve(msg['oob']['url'], targetFile, context=ctx) urllib.urlretrieve(msg['oob']['url'], targetFile, context=ctx)
logging.getLogger().debug("saved to %s" % targetFile) logging.getLogger().debug("saved to %s" % targetFile)
cmd = 'pelican /home/gitea/clones/varia/varia.website/content/ -o /var/www/stream/' cmd = 'subprocess.call(["make","publish"], cwd="/home/gitea/clones/varia.website/")'
print(cmd) print(cmd)
os.system(cmd) os.system(cmd)

Loading…
Cancel
Save