Outils pour utilisateurs

Outils du site


transparencia:groupes-locaux:bru-schaerbeek:bruschcnscmn:howto

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentesRévision précédente
transparencia:groupes-locaux:bru-schaerbeek:bruschcnscmn:howto [2017/12/07 15:06] patricktransparencia:groupes-locaux:bru-schaerbeek:bruschcnscmn:howto [2017/12/07 15:45] (Version actuelle) patrick
Ligne 15: Ligne 15:
 La page de manuel de Dokuwiki concernant les recherches peut être trouvé à l'adresse :  La page de manuel de Dokuwiki concernant les recherches peut être trouvé à l'adresse : 
 ici https://www.dokuwiki.org/start?id=fr:search ici https://www.dokuwiki.org/start?id=fr:search
 +
 +<file python>
 +def txt_2_dir_and_enveloppe():
 +    ''' quick and dirty for pv schaerbeek '''
 +    global Str_path_base
 +
 +    _b_dry_run = True
 +
 +    for _str_entry_0 in os.listdir(Str_path_base):
 +        if os.path.splitext(_str_entry_0)[1] == '.txt':
 +            _str_path_entry_0 = os.path.join(Str_path_base, _str_entry_0)
 +            with open(_str_path_entry_0, 'r') as _file_in:
 +                _str_txt = _file_in.read()
 +                _str_path_dir = os.path.join(Str_path_base, os.path.splitext(_str_entry_0)[0].lower())
 +                os.mkdir(_str_path_dir)
 +                _str_path_dir_start = os.path.join(_str_path_dir, 'start.txt')
 +                _str_dw = ''
 +                _str_dw += '===== PV du %s =====\n' % os.path.splitext(_str_entry_0)[0].split('_')[0]
 +                _str_dw += 'Procès verbal de la séance du conseil communal de Schaerbeek du %s\n\n' % os.path.splitext(_str_entry_0)[0].split('_')[0]
 +                _str_dw += "<code>\n%s\n</code>\n" % _str_txt
 +                _str_dw += "\n\n----\n\n"
 +                _str_dw += "~~SHORTURL~~\n"
 +                _str_dw += '===== Discussion générale =====\n'
 +                _str_dw += '~~DISCUSSION~~\n'
 +                if _b_dry_run:
 +                    print(_str_dw)
 +                else:
 +                    with open(_str_path_dir_start, 'w') as _file:
 +                                    _file.write(_str_dw)
 +</file>
  
transparencia/groupes-locaux/bru-schaerbeek/bruschcnscmn/howto.1512655597.txt.gz · Dernière modification : 2017/12/07 15:06 de patrick