give config to package defined actions
This commit is contained in:
@@ -6,7 +6,8 @@ import datetime
|
||||
import pytz
|
||||
from dateutil import parser as dateutilparser
|
||||
|
||||
def clean_data():
|
||||
|
||||
def clean_data(config):
|
||||
open(config["top_mbox_file"], 'w').close()
|
||||
|
||||
|
||||
@@ -18,10 +19,10 @@ def clean_data():
|
||||
if "file" in top and os.path.isfile(top["file"]):
|
||||
os.remove(top["file"])
|
||||
|
||||
def read_db():
|
||||
def read_db(config):
|
||||
subprocess.run(["helpers/read_db.sh"], check=True)
|
||||
|
||||
def read_topmails():
|
||||
def read_topmails(config):
|
||||
in_mbox = mailbox.Maildir(config["top_inbox_maildir"])
|
||||
out_mbox = mailbox.mbox(config["top_mbox_file"])
|
||||
|
||||
@@ -45,5 +46,5 @@ def read_topmails():
|
||||
|
||||
out_mbox.close()
|
||||
|
||||
def compile_presentation():
|
||||
def compile_presentation(config):
|
||||
subprocess.run(["helpers/compile_presentation.sh"], check=True)
|
||||
|
||||
Reference in New Issue
Block a user