Compare commits
No commits in common. "2961a61aa64957014149aca50101145cef361117" and "9bbb60c460911db021b53edd5ed6b388d039e67d" have entirely different histories.
2961a61aa6
...
9bbb60c460
5 changed files with 23 additions and 41 deletions
11
CHANGELOG.md
11
CHANGELOG.md
|
|
@ -1,14 +1,3 @@
|
|||
## 0.2.0a35 (2025-10-27)
|
||||
|
||||
### Feat
|
||||
|
||||
- tags documentation
|
||||
|
||||
### Fix
|
||||
|
||||
- add changelog support for github/gitlab format
|
||||
- tests
|
||||
|
||||
## 0.2.0a34 (2025-10-22)
|
||||
|
||||
### Feat
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ requires = ["flit_core >=3.8.0,<4"]
|
|||
|
||||
[project]
|
||||
name = "rougail.output_doc"
|
||||
version = "0.2.0a35"
|
||||
version = "0.2.0a34"
|
||||
authors = [{name = "Emmanuel Garette", email = "gnunux@gnunux.info"}]
|
||||
readme = "README.md"
|
||||
description = "Rougail output doc"
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
__version__ = "0.2.0a35"
|
||||
__version__ = "0.2.0a34"
|
||||
|
|
|
|||
|
|
@ -65,20 +65,6 @@ class Formater(CommonFormater):
|
|||
"""Set a text to italic"""
|
||||
return f"*{msg}*"
|
||||
|
||||
def delete(
|
||||
self,
|
||||
msg: str,
|
||||
) -> str:
|
||||
"""Set a text to deleted"""
|
||||
return f"~~{msg}~~"
|
||||
|
||||
def underline(
|
||||
self,
|
||||
msg: str,
|
||||
) -> str:
|
||||
"""Set a text to underline"""
|
||||
return f"<ins>{msg}</ins>"
|
||||
|
||||
def stripped(
|
||||
self,
|
||||
text: str,
|
||||
|
|
|
|||
|
|
@ -9,8 +9,6 @@ os.environ['COLUMNS'] = '80'
|
|||
test_ok = sorted(list((Path(__file__).parent / 'changelog').iterdir()))
|
||||
# test_ok = [Path(__file__).parent / 'changelog' / '40_dynamic_mod_default1']
|
||||
|
||||
EXT = {'github': 'md', 'asciidoc': 'adoc', 'json': 'json', 'console': 'sh', 'gitlab': 'gitlab.md', "html": "html"}
|
||||
|
||||
def idfn(fixture_value):
|
||||
return fixture_value.name
|
||||
|
||||
|
|
@ -36,16 +34,25 @@ def test_changelog(test_dir):
|
|||
rougailconfig['main_namespace'] = None
|
||||
rougailconfig["step.output"] = "doc"
|
||||
rougailconfig['main_structural_directories'] = [str(test_dir / "after" / "rougail" / "00-base.yml")]
|
||||
rougailconfig["doc.output_format"] = "asciidoc"
|
||||
rougailconfig["doc.contents"] = ["changelog"]
|
||||
rougailconfig["doc.previous_json_file"] = str(destfile)
|
||||
eolobj = Rougail(rougailconfig=rougailconfig)
|
||||
config = eolobj.run()
|
||||
for output_format, ext in EXT.items():
|
||||
if output_format == 'json':
|
||||
continue
|
||||
rougailconfig["doc.output_format"] = output_format
|
||||
result = RougailOutputDoc(config, rougailconfig=rougailconfig).run()[1]
|
||||
output_file = test_dir / f'result.{ext}'
|
||||
output_file = test_dir / 'result.adoc'
|
||||
if not output_file.is_file():
|
||||
with output_file.open('w') as outfh:
|
||||
outfh.write(result)
|
||||
with output_file.open() as outfh:
|
||||
attented_output = outfh.read()
|
||||
assert result == attented_output, f'filename {output_file}'
|
||||
#
|
||||
rougailconfig["doc.output_format"] = "console"
|
||||
# eolobj = Rougail(rougailconfig=rougailconfig)
|
||||
# config = eolobj.run()
|
||||
result = RougailOutputDoc(config, rougailconfig=rougailconfig).run()[1]
|
||||
output_file = test_dir / 'result.sh'
|
||||
if not output_file.is_file():
|
||||
with output_file.open('w') as outfh:
|
||||
outfh.write(result)
|
||||
|
|
|
|||
Loading…
Reference in a new issue