2022-02-05 21:44:52 +01:00
|
|
|
from pathlib import Path
|
|
|
|
|
2022-02-07 18:36:30 +01:00
|
|
|
from PyTeX.build.build import PyTeXBuilder
|
|
|
|
from PyTeX.build.build.build_dir_spec import BuildDirConfig
|
2022-02-07 18:33:00 +01:00
|
|
|
from PyTeX.build.build.pytex_config import PyTeXConfig
|
2022-02-07 22:28:13 +01:00
|
|
|
from PyTeX.build.build.relative_path import RelativePath
|
2022-02-06 15:11:45 +01:00
|
|
|
from PyTeX.format.formatting_config import FormattingConfig
|
2022-02-05 21:44:52 +01:00
|
|
|
|
2022-02-07 17:43:23 +01:00
|
|
|
spec = BuildDirConfig(
|
2022-02-05 21:44:52 +01:00
|
|
|
source_root=Path('src'),
|
|
|
|
tex_root=Path('build/source'),
|
|
|
|
build_root=Path('build'),
|
|
|
|
doc_root=Path('build/doc'),
|
|
|
|
wrapper_dir=Path('mkessler')
|
|
|
|
)
|
|
|
|
|
|
|
|
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')
|
|
|
|
|
2022-02-06 23:53:07 +01:00
|
|
|
d1 = {
|
|
|
|
'a': 1,
|
|
|
|
'b': 2
|
|
|
|
}
|
|
|
|
|
|
|
|
d2 = {
|
|
|
|
'a': 3,
|
|
|
|
'c': 4
|
|
|
|
}
|
|
|
|
|
|
|
|
d3 = d1 | d2
|
|
|
|
|
2022-02-07 00:04:31 +01:00
|
|
|
config: FormattingConfig = FormattingConfig()
|
2022-02-06 23:53:07 +01:00
|
|
|
|
2022-02-07 00:04:31 +01:00
|
|
|
dump = config.to_json()
|
|
|
|
|
2022-02-07 18:33:00 +01:00
|
|
|
conf_path = Path('/home/maximilian/git/LatexPackages/.pytexrc')
|
2022-02-07 01:09:05 +01:00
|
|
|
|
2022-02-07 18:33:00 +01:00
|
|
|
pytex_config = PyTeXConfig.from_yaml(conf_path)
|
2022-02-07 01:09:05 +01:00
|
|
|
|
2022-02-07 19:00:25 +01:00
|
|
|
|
|
|
|
builder = PyTeXBuilder(conf_path)
|
|
|
|
|
2022-02-07 23:12:17 +01:00
|
|
|
builder.build_tex_sources()
|
|
|
|
|
2022-02-08 00:24:25 +01:00
|
|
|
v = builder.version_info
|
|
|
|
|
2022-02-07 01:09:05 +01:00
|
|
|
pass
|