diff --git a/archive.py b/archive.py index 0b1db6b..03f8be9 100644 --- a/archive.py +++ b/archive.py @@ -1,3 +1,34 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- +# vim: set fileencoding=utf-8 : + +__author__ = "Peter Molnar" +__copyright__ = "Copyright 2017, Peter Molnar" +__license__ = "GPLv3" +__version__ = "2.0" +__maintainer__ = "Peter Molnar" +__email__ = "hello@petermolnar.eu" +__status__ = "Production" + +""" + silo archiver module of NASG + Copyright (C) 2017 Peter Molnar + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +""" + import os import json import requests diff --git a/nasg.py b/nasg.py index e5ed491..5169234 100644 --- a/nasg.py +++ b/nasg.py @@ -1,4 +1,33 @@ #!/usr/bin/env python3 +# -*- coding: utf-8 -*- +# vim: set fileencoding=utf-8 : + +__author__ = "Peter Molnar" +__copyright__ = "Copyright 2017, Peter Molnar" +__license__ = "GPLv3" +__version__ = "2.0" +__maintainer__ = "Peter Molnar" +__email__ = "hello@petermolnar.eu" +__status__ = "Production" + +""" + silo archiver module of NASG + Copyright (C) 2017 Peter Molnar + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +""" import os import re diff --git a/router.py b/router.py index 7dfc783..f222b37 100644 --- a/router.py +++ b/router.py @@ -1,5 +1,33 @@ #!/usr/bin/env python3 +# -*- coding: utf-8 -*- +# vim: set fileencoding=utf-8 : +__author__ = "Peter Molnar" +__copyright__ = "Copyright 2017, Peter Molnar" +__license__ = "GPLv3" +__version__ = "2.0" +__maintainer__ = "Peter Molnar" +__email__ = "hello@petermolnar.eu" +__status__ = "Production" + +""" + silo archiver module of NASG + Copyright (C) 2017 Peter Molnar + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +""" from sanic import Sanic import sanic.response from sanic.log import log as logging diff --git a/shared.py b/shared.py index 5efc479..8c00e2a 100644 --- a/shared.py +++ b/shared.py @@ -1,3 +1,34 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- +# vim: set fileencoding=utf-8 : + +__author__ = "Peter Molnar" +__copyright__ = "Copyright 2017, Peter Molnar" +__license__ = "GPLv3" +__version__ = "2.0" +__maintainer__ = "Peter Molnar" +__email__ = "hello@petermolnar.eu" +__status__ = "Production" + +""" + silo archiver module of NASG + Copyright (C) 2017 Peter Molnar + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +""" + import configparser import os import re @@ -264,27 +295,6 @@ class BaseDB(object): cursor.execute('PRAGMA auto_vacuum;') self.db.close() -# class TokenDBng(BaseDB): - # def __init__(self): - #self.fpath = config.get('var', 'tokendb') - # super().__init__(self.fpath) - #cursor = self.db.cursor() - # cursor.execute(''' - # CREATE TABLE IF NOT EXISTS `tokens` ( - #`service` TEXT PRIMARY KEY NOT NULL UNIQUE, - #`timestamp` TIMESTAMP NOT NULL DEFAULT (strftime('%s', 'now')) - #`oauth_token` TEXT NOT NULL, - #`oauth_token_secret` TEXT NOT NULL, - #`access_token` TEXT NOT NULL, - #`access_token_secret` TEXT NOT NULL, - #`verifier` TEXT NOT NULL - #); - #''') - # self.db.commit() - - -# TODO class SearchDBng(object): -# TODO class EXIFDBng(object): class TokenDB(object): def __init__(self, uuid='tokens'): @@ -576,8 +586,9 @@ def __setup_sitevars(): for o in config.options(section): SiteVars.update({o: config.get(section, o)}) - # TODO this should be a nice recursive function instead - # extra site section + # this should be a nice recursive function instead + # extra site section - nope, because it relies on order + # and author won't get appended for section in config.get('site', 'appendwith').split(): SiteVars.update({section: {}}) for o in config.options(section): diff --git a/templates/Singular.html b/templates/Singular.html index ae77b51..7c30c32 100644 --- a/templates/Singular.html +++ b/templates/Singular.html @@ -76,21 +76,28 @@ {% endif %}