pytex/main.py
2022-02-06 23:53:07 +01:00

56 lines
941 B
Python

from pathlib import Path
from PyTeX.build.build import PyTeXBuilder
from PyTeX.build.build.build_dir_spec import BuildDirSpecification
from PyTeX.build.enums import *
from PyTeX.build.paths import RelativePath
from PyTeX.format.formatting_config import FormattingConfig
spec = BuildDirSpecification(
source_root=Path('src'),
tex_root=Path('build/source'),
build_root=Path('build'),
doc_root=Path('build/doc'),
wrapper_dir=Path('mkessler')
)
builder = PyTeXBuilder(
build_dir_spec=spec
)
p: RelativePath = RelativePath(Path('src'), 'src/hello/bla')
rel = p.relative_path
q = p / 'test'
re2 = q.relative_path
p2 = RelativePath(Path('doc'), 'build/doc/mkessler/hello/bla')
p3 = p / p2
p4 = p.with_name('myname')
d1 = {
'a': 1,
'b': 2
}
d2 = {
'a': 3,
'c': 4
}
d3 = d1 | d2
print(p)
config: FormattingConfig = FormattingConfig()
config._naming_scheme = 'test'
n = config.naming_scheme