<commit_before>#!/usr/bin/env python

import os
import string

template = '''#summary {Description}
#sidebar TableOfContents

= Pool =
  * [http://code.google.com/p/rudix/downloads/detail?name={PkgFile} {PkgFile}]

= Port source =
  * [http://code.google.com/p/rudix/source/browse/Ports/{Name} Ports/{Name}]
'''

class Global_Env_Dict(object):
    def __getitem__(self, key):
        if key in globals():
            return globals()[key]
        else:
            return os.getenv(key)

env = Global_Env_Dict()
fmt = string.Formatter()
output = fmt.vformat(template, None, env)

tbl = string.maketrans('-', '_')
wiki = '%s.wiki' % env['Name'].translate(tbl)
with open(wiki, 'w') as f:
    f.write(output)
<commit_msg>mkwikipage.py script create pages with G+ button.<commit_after>#!/usr/bin/env python

import os
import string

template = '''#summary {Description}
#sidebar TableOfContents

<g:plusone size="small"></g:plusone>

= Pool =
  * [http://code.google.com/p/rudix/downloads/detail?name={PkgFile} {PkgFile}]

= Port source =
  * [http://code.google.com/p/rudix/source/browse/Ports/{Name} Ports/{Name}]
'''

class Global_Env_Dict(object):
    def __getitem__(self, key):
        if key in globals():
            return globals()[key]
        else:
            return os.getenv(key)

env = Global_Env_Dict()
fmt = string.Formatter()
output = fmt.vformat(template, None, env)

tbl = string.maketrans('-', '_')
wiki = '%s.wiki' % env['Name'].translate(tbl)
with open(wiki, 'w') as f:
    f.write(output)

{'fraction_non_alphanumeric': 0.171523178807947, 'fraction_numerical': 0.0, 'mean_word_length': 3.678018575851393, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, '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': '6774933', 'n_tokens_mistral': 539, 'n_tokens_neox': 532, 'n_words': 110}