1
0
mirror of https://github.com/krateng/maloja.git synced 2023-08-10 21:12:55 +03:00

Reorganized tasks

This commit is contained in:
Krateng 2020-06-20 17:52:26 +02:00
parent d48ffc964d
commit be79dc1888
5 changed files with 15 additions and 14 deletions

View File

@ -6,6 +6,7 @@ import os
import signal
from .setup import setup
from . import tasks
def getInstance():
try:
@ -82,11 +83,10 @@ def main(action,*args,**kwargs):
"run":direct,
"debug":direct,
# "import":loadlastfm,
# "backup":backuphere,
"import":tasks.loadlastfm,
"backup":tasks.backuphere,
# "update":update,
# "fix":fixdb
"fix":tasks.fixdb
}
if action in actions: actions[action](*args,**kwargs)
else: print("Valid commands: " + " ".join(a for a in actions))

View File

@ -1,9 +1,10 @@
import os
from ..lastfmconverter import convert
from ..backup import backup
from ..fixexisting import fix
from ..globalconf import datadir
from .control import restart
from .lastfmconverter import convert
from .backup import backup
from .fixexisting import fix
from ...globalconf import datadir
from ..control import restart
from doreah.io import ask
def loadlastfm(filename):

View File

@ -2,7 +2,7 @@ import tarfile
from datetime import datetime
import glob
import os
from .globalconf import datadir
from ...globalconf import datadir
user_files = {

View File

@ -1,7 +1,7 @@
import os
from .globalconf import datadir
from ...globalconf import datadir
import re
from .cleanup import CleanerAgent
from ...cleanup import CleanerAgent
from doreah.logging import log
import difflib
import datetime

View File

@ -1,6 +1,6 @@
import os, datetime, re
from .cleanup import *
from .utilities import *
from ...cleanup import *
from ...utilities import *