pytex/main.py

37 lines
696 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
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')
print(p)