diff --git a/src/var/lib/tyto/program/dom.py b/src/var/lib/tyto/program/dom.py index 0e7f82c..96d47b2 100644 --- a/src/var/lib/tyto/program/dom.py +++ b/src/var/lib/tyto/program/dom.py @@ -155,7 +155,10 @@ if not hole: exec(open(config).read()) try: os.path.exists(articles_d) - user_uri_dir = user_dir.rsplit(articles_d)[1] + if '/articles' in user_dir: + user_uri_dir = user_dir.rsplit(articles_d)[1] + else: + user_uri_dir = '' os.chdir(articles_d) except: corrupt = True except: diff --git a/src/var/lib/tyto/program/wip.py b/src/var/lib/tyto/program/wip.py index fab3543..eee8cda 100644 --- a/src/var/lib/tyto/program/wip.py +++ b/src/var/lib/tyto/program/wip.py @@ -55,14 +55,15 @@ def manage(target): elif target in args.pass_targets: do = { - 'updated' : wip_all, - 'again' : wip_all, - 'added' : wip_all, - 'sidebar' : html.create_sidebar, - 'navbar' : html.create_navbar, - 'metas' : html.create_user_metas, - 'footer' : html.create_user_footer, - 'stats' : stats.manage + 'updated' : wip_all, + 'again' : wip_all, + 'added' : wip_all, + 'sidebar' : html.create_sidebar, + 'navbar' : html.create_navbar, + 'metas' : html.create_user_metas, + 'footer' : html.create_user_footer, + 'stats' : stats.manage, + 'template' : wip_template } try: @@ -154,6 +155,16 @@ def wip_all(process): if not found: sys.exit(28) +#===============================# +# Create all mods in wip server # +#-------------------------------# +def wip_template(server): + html.create_user_metas(server) + html.create_navbar(server) + html.create_sidebar(server) + html.create_user_footer(server) + + #===================# # Start wip modules # # Set DB #