Пример #1
0
#! /usr/bin/env python3

import re

from collections import defaultdict
from itertools import product

from mistool.os_use import PPath
from mistool.string_use import between, joinand
from orpyste.data import ReadBlock

BASENAME = PPath(__file__).stem.replace("build-", "")
BASENAME = BASENAME.replace("[slow]", "")

THIS_DIR = PPath(__file__).parent
STY_FILE = THIS_DIR / f'{BASENAME}.sty'
TEX_FILE = STY_FILE.parent / (STY_FILE.stem + "[fr].tex")

PATTERN_FOR_PEUF = re.compile("\d+-(.*)")
match = re.search(PATTERN_FOR_PEUF, STY_FILE.stem)
PEUF_FILE = STY_FILE.parent / (match.group(1).strip() + ".peuf")

DECO = " " * 4

# ----------- #
# -- TOOLS -- #
# ----------- #

DELIMS = {'[...]': "C", ']...[': "O"}