added sample config

This commit is contained in:
Remy Moll 2022-08-24 14:39:39 +02:00
parent 40498ac8f0
commit aba2b10978
5 changed files with 61 additions and 5 deletions

View File

@ -1,6 +1,5 @@
import sys
from webbrowser import get
sys.path.append("../app")
sys.path.append("/app/auto_news/")
import runner
import logging
logger = logging.getLogger()
@ -8,6 +7,7 @@ import json
from rich.console import Console
from rich.table import Table
import subprocess, os
console = Console()
logger.info("Overwriting production values for single time media-fetch")
@ -55,13 +55,17 @@ def show():
for e in entries:
t.add_column(e, justify = "right")
sel = runner.models.ArticleDownload.select()
sel = runner.models.ArticleDownload.select().order_by(runner.models.ArticleDownload.pub_date)
for s in sel:
c = [getattr(s, e) for e in entries]#
c = [getattr(s, e) for e in entries] #
c[-1] = str([a.author for a in c[-1]])
print(c)
# print(c)
t.add_row(*c)
path = os.path.join(s.save_path, s.file_name).replace("..", "/code")
subprocess.Popen(["evince", f"file://{path}"], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
input("go on?")
console.print(t)

View File

@ -0,0 +1,3 @@
user=remoll
domain=D
password=**************

View File

@ -0,0 +1,12 @@
settings {
logfile = "/tmp/lsyncd.log",
statusFile = "/tmp/lsyncd.status",
nodaemon = true,
}
sync {
default.rsync,
source = "/sync/local_files",
target = "/sync/remote_files",
init = false,
}

View File

@ -0,0 +1,33 @@
[MAIL]
smtp_server: smtp.ethz.ch
port: 587
sender: remoll@ethz.ch
recipient: dirk.helbing@gess.ethz.ch
uname: remoll
password: **************+
[SLACK]
bot_id: U02MR1R8UJH
responsible_id: U01AC9ZEN2G
archive_id: C02MM7YG1V4
debug_id: C02NM2H9J5Q
api_wait_time: 90
auth_token: xoxb-1339422048646-2739059300629-4pFDsNtHTgoOnX6punPXZcfq
app_token: xapp-1-A02MDABPHBR-2741993006290-487109066f65f3463961aaa7f9109addbe40958f83989942ea9809dd23bf69e8
[DATABASE]
download_db_name: downloads.db
chat_db_name: messages.db
db_path_prod: /app/containerdata
db_path_dev: /code/.dev
db_backup: /app/containerdata/backups
[DOWNLOADS]
local_storage_path: /app/containerdata/files
default_download_path: /app/containerdata/tmp
remote_storage_path: /helbing_support/Files RM/Archiving
browser_profile_path: /app/containerdata/dependencies/7hlyfqxt.Auto News
blacklisted_href_domains: ["google.", "facebook."]

View File

@ -0,0 +1,4 @@
OPENCONNECT_URL=sslvpn.ethz.ch/student-net
OPENCONNECT_USER=remoll@student-net.ethz.ch
OPENCONNECT_PASSWORD=**************
OPENCONNECT_OPTIONS=--authgroup student-net