all repos — nasg @ 38fdc6bd334c4f0b797605a0a1f757237fe98600

version 2.0 finalized
Peter Molnar hello@petermolnar.eu
Sun, 17 Dec 2017 17:37:32 +0000
commit

38fdc6bd334c4f0b797605a0a1f757237fe98600

parent

69943e41cd95b0cff89efa4277abb6a37e67a9d2

M archive.pyarchive.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
M nasg.pynasg.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
M router.pyrouter.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
M shared.pyshared.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 @@ cursor = self.db.cursor()

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 @@ section = 'site'

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):
M templates/Singular.htmltemplates/Singular.html

@@ -76,21 +76,28 @@ Did you like what you read?<br />Leave a tip!</a>

{% endif %} </p> <ul> - {% for value in [3] %} - {% for name, url in site.payment.items() %} - <li> - <a rel="payment" title="pay {{ site.author.name }} via {{ name }} {{ site.currency }}{{ value }}" href="{{ url }}{{value}}"> - {{ site.currency }}{{value}} - <span class="method"> - <svg class="icon"><use xlink:href="#icon-{{ name }}"></use></svg> - with {{ name }} - </span> - </a> - </li> - {% endfor %} + {% for name, url in site.payment.items() %} + <li> + <a rel="payment" title="pay {{ site.author.name }} via {{ name }} {{ site.donation.currency }}{{ site.donation.amount }}" href="{{ url }}{{ site.donation.amount }}"> + {{ site.donation.currency }}{{ site.donation.amount }} + <span class="method"> + <svg class="icon"><use xlink:href="#icon-{{ name }}"></use></svg> + with {{ name }} + </span> + </a> + </li> + {% endfor %} + {% for name, walletid in site.cryptocurrencies.items() %} + <!-- + <li> + <a rel="payment" title="pay {{ site.author.name }} with {{ name }}" href="#"> + <span class="wallet">{{ walletid }}</span> + <span class="method">{{ name }}</span> + </a> + </li> + --> {% endfor %} </ul> - </aside>
M templates/block_footer.htmltemplates/block_footer.html

@@ -27,6 +27,12 @@ <a rel="me" class="u-{{ silo }} url u-url" href="{{ url }}">{{ silo }}</a>

</dd> {% endfor %} </dl> + <dl class="cryptocurrencies"> +{% for name, walletid in site.cryptocurrencies.items() %} + <dt>{{ name }}</dt> + <dd>{{ walletid }}</dd> +{% endfor %} + </dl> </nav> </footer>
M templates/style-dark.csstemplates/style-dark.css

@@ -376,6 +376,18 @@ .content-footer dl dd:last-of-type:after {

content: ''; } +.content-footer dl.cryptocurrencies { + font-size: 0.7rem; + margin-top: 0.3rem; +} + +.content-footer dl.cryptocurrencies dt { + display: inline-block; + visibility: visible; + text-transform: uppercase; +} + + input { vertical-align:middle; border: none;