<commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*- #
from __future__ import unicode_literals
from datetime import datetime
import ast

AUTHOR = u'<NAME>'
SITENAME = u'Raketomodelářský klub Letovice'
SITENAME_SHORT = u'RMK Letovice'
SITEURL = ''

TIMEZONE = 'Europe/Prague'

DEFAULT_LANG = u'cs'

DEFAULT_PAGINATION = 10

DEFAULT_CATEGORY = 'Ostatní'

# Paths
PATH = 'content'
ARTICLE_URL = 'clanky/{category}/{slug}.html'
ARTICLE_SAVE_AS = 'clanky/{category}/{slug}.html'
PAGE_URL = '{slug}.html'
PAGE_SAVE_AS = '{slug}.html'
CATEGORY_URL = 'kategorie/{slug}.html'
CATEGORY_SAVE_AS = 'kategorie/{slug}.html'
CATEGORY_PAGINATION_URL = 'kategorie/{slug}-{page}.html'
CATEGORY_PAGINATION_SAVE_AS = 'kategorie/{slug}-{page}.html'


# Plugins
PLUGIN_PATHS = ('plugins',)
PLUGINS = ('archives_per_category',)

# Archives
ARCHIVE_DIR = 'archiv'
ARCHIVE_YEARS = ('2011', '2010')
YEAR_ARCHIVE_SAVE_AS = ARCHIVE_DIR + '/{date:%Y}/index.html'
YEAR_ARCHIVES_PER_CATEGORY_SAVE_AS = (ARCHIVE_DIR +
                                      '/{category}/{date:%Y}/index.html')
CATEGORIES_TO_ARCHIVE = ('letove-akce',)

# Static files
STATIC_DIR = 'theme'
MY_CSS = 'css/style.css'
BOOTSTRAP_CSS = 'css/bootstrap.min.css'
BOOTSTRAP_JS = 'js/bootstrap.min.js'
LOGO = 'images/logo.png'
JUMBOTRON_IMAGE = 'images/top.jpg'

# External resources
JQUERY = 'https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js'
HTML5SHIV = 'https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js'
RESPOND = 'https://oss.maxcdn.com/respond/1.4.2/respond.min.js'

# Content
WELCOME_MESSAGE = 'Vítejte na stránkách Raketomodelářského klubu Letovice'
NAVIGATION_BAR = ({'label': 'Úvod', 'href': '/'},
                  {'label': 'Letové akce',
                   'href': '/kategorie/letove-akce.html',
                   'actions_list': (
                       ('2010', '/' + ARCHIVE_DIR + '/letove-akce/2010'),
                   )},
                  {'label': 'Fotogalerie', 'href': 'zonerama'},
                  {'label': 'Historie', 'href': '/historie-klubu.html'})
CONTACTS = ({'name': '<NAME>',
             'info': 'předseda klubu',
             'phone': 'XXX XXX XXX',
             'mail': ('jan', 'seznam', 'cz')},
            {'name': '<NAME>',
             'info': 'administrátor',
             'mail': ('p.horacek94', 'gmail', 'com')})


# Jinja filters
def key_equals(objects, key, param):
    filtered = []
    for o in objects:
        if getattr(o, key) == param:
            filtered.append(o)
    return filtered


def parse_structure(string):
    return ast.literal_eval(string)


def parse_and_format_date(string):
    new = datetime.strptime(string, '%Y-%m-%d').strftime('%-d. %-m. %Y')
    return new

JINJA_FILTERS = {'key_equals': key_equals,
                 'parse_structure': parse_structure,
                 'parse_and_format_date': parse_and_format_date}

# Don't want any feeds
FEED_ALL_ATOM = None
CATEGORY_FEED_ATOM = None
TRANSLATION_FEED_ATOM = None
AUTHOR_FEED_ATOM = None
AUTHOR_FEED_RSS = None
<commit_msg>content: proper archive and contact values<commit_after>#!/usr/bin/env python
# -*- coding: utf-8 -*- #
from __future__ import unicode_literals
from datetime import datetime
import ast

AUTHOR = u'<NAME>'
SITENAME = u'Raketomodelářský klub Letovice'
SITENAME_SHORT = u'RMK Letovice'
SITEURL = ''

TIMEZONE = 'Europe/Prague'

DEFAULT_LANG = u'cs'

DEFAULT_PAGINATION = 10

DEFAULT_CATEGORY = 'Ostatní'

# Paths
PATH = 'content'
ARTICLE_URL = 'clanky/{category}/{slug}.html'
ARTICLE_SAVE_AS = 'clanky/{category}/{slug}.html'
PAGE_URL = '{slug}.html'
PAGE_SAVE_AS = '{slug}.html'
CATEGORY_URL = 'kategorie/{slug}.html'
CATEGORY_SAVE_AS = 'kategorie/{slug}.html'
CATEGORY_PAGINATION_URL = 'kategorie/{slug}-{page}.html'
CATEGORY_PAGINATION_SAVE_AS = 'kategorie/{slug}-{page}.html'


# Plugins
PLUGIN_PATHS = ('plugins',)
PLUGINS = ('archives_per_category',)

# Archives
ARCHIVE_DIR = 'archiv'
ARCHIVE_YEARS = range(2015, 2010, -1)
YEAR_ARCHIVE_SAVE_AS = ARCHIVE_DIR + '/{date:%Y}/index.html'
YEAR_ARCHIVES_PER_CATEGORY_SAVE_AS = (ARCHIVE_DIR +
                                      '/{category}/{date:%Y}/index.html')
CATEGORIES_TO_ARCHIVE = ('letove-akce',)

# Static files
STATIC_DIR = 'theme'
MY_CSS = 'css/style.css'
BOOTSTRAP_CSS = 'css/bootstrap.min.css'
BOOTSTRAP_JS = 'js/bootstrap.min.js'
LOGO = 'images/logo.png'
JUMBOTRON_IMAGE = 'images/top.jpg'

# External resources
JQUERY = 'https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js'
HTML5SHIV = 'https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js'
RESPOND = 'https://oss.maxcdn.com/respond/1.4.2/respond.min.js'

# Content
WELCOME_MESSAGE = 'Vítejte na stránkách Raketomodelářského klubu Letovice'
NAVIGATION_BAR = ({'label': 'Úvod', 'href': '/'},
                  {'label': 'Letové akce',
                   'href': '/kategorie/letove-akce.html',
                   'actions_list': [
                       (year, '/%s/letove-akce/%d' % (ARCHIVE_DIR, year))
                       for year in range(2015, 2010, -1)
                   ]},
                  {'label': 'Fotogalerie', 'href': 'zonerama'},
                  {'label': 'Historie', 'href': '/historie-klubu.html'})
CONTACTS = ({'name': '<NAME>',
             'info': 'předseda klubu',
             'phone': '606 803 431',
             'mail': ('kasparj45', 'seznam', 'cz')},
            {'name': '<NAME>',
             'info': 'administrátor',
             'mail': ('p.horacek94', 'gmail', 'com')})


# Jinja filters
def key_equals(objects, key, param):
    filtered = []
    for o in objects:
        if getattr(o, key) == param:
            filtered.append(o)
    return filtered


def parse_structure(string):
    return ast.literal_eval(string)


def parse_and_format_date(string):
    new = datetime.strptime(string, '%Y-%m-%d').strftime('%-d. %-m. %Y')
    return new

JINJA_FILTERS = {'key_equals': key_equals,
                 'parse_structure': parse_structure,
                 'parse_and_format_date': parse_and_format_date}

# Don't want any feeds
FEED_ALL_ATOM = None
CATEGORY_FEED_ATOM = None
TRANSLATION_FEED_ATOM = None
AUTHOR_FEED_ATOM = None
AUTHOR_FEED_RSS = None

{'fraction_non_alphanumeric': 0.15839166531010906, 'fraction_numerical': 0.013185739866514732, 'mean_word_length': 3.1938566552901024, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3985212', 'n_tokens_mistral': 2424, 'n_tokens_neox': 2337, 'n_words': 403}