mirror of
https://github.com/krateng/maloja.git
synced 2023-08-10 21:12:55 +03:00
Reorganized tasks
This commit is contained in:
parent
d48ffc964d
commit
be79dc1888
@ -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))
|
||||
|
@ -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):
|
@ -2,7 +2,7 @@ import tarfile
|
||||
from datetime import datetime
|
||||
import glob
|
||||
import os
|
||||
from .globalconf import datadir
|
||||
from ...globalconf import datadir
|
||||
|
||||
|
||||
user_files = {
|
@ -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
|
@ -1,6 +1,6 @@
|
||||
import os, datetime, re
|
||||
from .cleanup import *
|
||||
from .utilities import *
|
||||
from ...cleanup import *
|
||||
from ...utilities import *
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user