42 lines
859 B
Python
42 lines
859 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')
|
|
|
|
print(p)
|
|
|
|
config: FormattingConfig = FormattingConfig()
|
|
config._naming_scheme = 'test'
|
|
n = config.naming_scheme
|