task2md 1.1.0__tar.gz → 1.1.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. {task2md-1.1.0 → task2md-1.1.2}/PKG-INFO +1 -1
  2. {task2md-1.1.0 → task2md-1.1.2}/docs/index.md +1 -1
  3. task2md-1.1.2/docs/task/file.md +2 -0
  4. task2md-1.1.2/docs/task/header.md +2 -0
  5. task2md-1.1.2/docs/task/index.md +2 -0
  6. task2md-1.1.2/docs/task/task.md +2 -0
  7. task2md-1.1.2/docs/task/variable.md +2 -0
  8. {task2md-1.1.0 → task2md-1.1.2}/mkdocs.yml +6 -5
  9. {task2md-1.1.0 → task2md-1.1.2}/pyproject.toml +1 -1
  10. {task2md-1.1.0 → task2md-1.1.2}/src/task2md/task2md.py +2 -1
  11. {task2md-1.1.0 → task2md-1.1.2}/src/task2md/template/file.py +8 -0
  12. {task2md-1.1.0 → task2md-1.1.2}/src/task2md/template/index.py +1 -1
  13. {task2md-1.1.0 → task2md-1.1.2}/tests/task/test_index.py +2 -2
  14. {task2md-1.1.0 → task2md-1.1.2}/tests/test_dir.py +2 -2
  15. task2md-1.1.0/docs/task/file.md +0 -2
  16. task2md-1.1.0/docs/task/header.md +0 -2
  17. task2md-1.1.0/docs/task/task.md +0 -2
  18. task2md-1.1.0/docs/task/variable.md +0 -2
  19. {task2md-1.1.0 → task2md-1.1.2}/.gitignore +0 -0
  20. {task2md-1.1.0 → task2md-1.1.2}/.gitlab-ci.yml +0 -0
  21. {task2md-1.1.0 → task2md-1.1.2}/.markdownlint.yaml +0 -0
  22. {task2md-1.1.0 → task2md-1.1.2}/.pre-commit-config.yaml +0 -0
  23. {task2md-1.1.0 → task2md-1.1.2}/.python-version +0 -0
  24. {task2md-1.1.0 → task2md-1.1.2}/.releaserc +0 -0
  25. {task2md-1.1.0 → task2md-1.1.2}/.vale.ini +0 -0
  26. {task2md-1.1.0 → task2md-1.1.2}/.yamllint +0 -0
  27. {task2md-1.1.0 → task2md-1.1.2}/LICENSE +0 -0
  28. {task2md-1.1.0 → task2md-1.1.2}/README.md +0 -0
  29. {task2md-1.1.0 → task2md-1.1.2}/Taskfile.project.yml +0 -0
  30. {task2md-1.1.0 → task2md-1.1.2}/Taskfile.yml +0 -0
  31. {task2md-1.1.0 → task2md-1.1.2}/docs/cli.md +0 -0
  32. {task2md-1.1.0 → task2md-1.1.2}/docs/task2md.md +0 -0
  33. {task2md-1.1.0 → task2md-1.1.2}/docs/util/dir.md +0 -0
  34. {task2md-1.1.0 → task2md-1.1.2}/lychee.toml +0 -0
  35. {task2md-1.1.0 → task2md-1.1.2}/requirements-dev.lock +0 -0
  36. {task2md-1.1.0 → task2md-1.1.2}/requirements.lock +0 -0
  37. {task2md-1.1.0 → task2md-1.1.2}/src/task2md/__init__.py +0 -0
  38. {task2md-1.1.0 → task2md-1.1.2}/src/task2md/template/__init__.py +0 -0
  39. {task2md-1.1.0 → task2md-1.1.2}/src/task2md/template/header.py +0 -0
  40. {task2md-1.1.0 → task2md-1.1.2}/src/task2md/template/task.py +0 -0
  41. {task2md-1.1.0 → task2md-1.1.2}/src/task2md/template/variable.py +0 -0
  42. {task2md-1.1.0 → task2md-1.1.2}/src/task2md/util/__init__.py +0 -0
  43. {task2md-1.1.0 → task2md-1.1.2}/src/task2md/util/dir.py +0 -0
  44. {task2md-1.1.0 → task2md-1.1.2}/tests/__init__.py +0 -0
  45. {task2md-1.1.0 → task2md-1.1.2}/tests/files/empty.yml +0 -0
  46. {task2md-1.1.0 → task2md-1.1.2}/tests/files/lint.yml +0 -0
  47. {task2md-1.1.0 → task2md-1.1.2}/tests/task/__init__.py +0 -0
  48. {task2md-1.1.0 → task2md-1.1.2}/tests/task/test_file.py +0 -0
  49. {task2md-1.1.0 → task2md-1.1.2}/tests/task/test_header.py +0 -0
  50. {task2md-1.1.0 → task2md-1.1.2}/tests/task/test_task.py +0 -0
  51. {task2md-1.1.0 → task2md-1.1.2}/tests/task/test_variable.py +0 -0
  52. {task2md-1.1.0 → task2md-1.1.2}/tests/test_file.py +0 -0
  53. {task2md-1.1.0 → task2md-1.1.2}/tests/test_task2md.py +0 -0
  54. {task2md-1.1.0 → task2md-1.1.2}/tests/util/test_dir.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: task2md
3
- Version: 1.1.0
3
+ Version: 1.1.2
4
4
  Summary: A program to generate markdown documentation files from Task files
5
5
  Project-URL: Homepage, https://gitlab.com/op_so/task/task2md
6
6
  Project-URL: Documentation, https://op_so.gitlab.io/task/task2md/
@@ -1,6 +1,6 @@
1
1
  # Overview
2
2
 
3
- Version: 1.1.0
3
+ Version: 1.1.2
4
4
 
5
5
  A CLI tool to generate from [Task](https://taskfile.dev/) files, some markdown
6
6
  documentation files for [`mkdocs`](https://squidfunk.github.io/mkdocs-material/) static site.
@@ -0,0 +1,2 @@
1
+
2
+ ::: src.task2md.template.file
@@ -0,0 +1,2 @@
1
+
2
+ ::: src.task2md.template.header
@@ -0,0 +1,2 @@
1
+
2
+ ::: src.task2md.template.index
@@ -0,0 +1,2 @@
1
+
2
+ ::: src.task2md.template.task
@@ -0,0 +1,2 @@
1
+
2
+ ::: src.task2md.template.variable
@@ -17,8 +17,9 @@ nav:
17
17
  - 'task2md.md'
18
18
  - 'util':
19
19
  - 'util/dir.md'
20
- - 'task':
21
- - 'task/file.md'
22
- - 'task/header.md'
23
- - 'task/task.md'
24
- - 'task/variable.md'
20
+ - 'template':
21
+ - 'template/file.md'
22
+ - 'template/header.md'
23
+ - 'template/index.md'
24
+ - 'template/task.md'
25
+ - 'template/variable.md'
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "task2md"
3
- version = "1.1.0"
3
+ version = "1.1.2"
4
4
  description = "A program to generate markdown documentation files from Task files"
5
5
  authors = [
6
6
  { name = "FX Soubirou", email = "soubirou@yahoo.fr" }
@@ -11,7 +11,7 @@ from task2md.util.dir import Dir
11
11
 
12
12
 
13
13
  @click.group()
14
- @click.version_option("1.1.0", prog_name="task2md")
14
+ @click.version_option("1.1.2", prog_name="task2md")
15
15
  def cli() -> None:
16
16
  """A CLI tool to generate markdown documentation files from Task files."""
17
17
  pass
@@ -72,6 +72,7 @@ def dir(
72
72
  f"Task documentation generated: {task_file.get_filename()}.md"
73
73
  )
74
74
  filename = "index"
75
+ index_file.task_files.sort()
75
76
  index_file.generate(out_dir)
76
77
  click.echo("Index documentation generated: index.md")
77
78
 
@@ -248,3 +248,11 @@ class File(BaseModel):
248
248
  output += task.to_md(self.get_filename())
249
249
 
250
250
  return output
251
+
252
+ def __lt__(self, other: "File") -> bool:
253
+ """A custom comparison function for sorting by name
254
+
255
+ Returns:
256
+ str: True if object is lower than other
257
+ """
258
+ return bool(self.get_filename() < other.get_filename())
@@ -45,6 +45,6 @@ List of templates:
45
45
  description = file.header.description
46
46
  tags = ", ".join(file.header.tags)
47
47
 
48
- output += f"| [{name}]({name}) | {description} | {tags} |\n"
48
+ output += f"| [{name}]({name}.md) | {description} | {tags} |\n"
49
49
 
50
50
  return output + "\n"
@@ -28,5 +28,5 @@ class TestFile:
28
28
  output = i.to_md()
29
29
  assert "# Available task templates" in output
30
30
  assert "| Templates | Description | Tags |" in output
31
- assert "| [lint1](lint1) | desc1 | tag11, tag12, tag13 |" in output
32
- assert "| [lint2](lint2) | desc2 | tag21, tag22 |" in output
31
+ assert "| [lint1](lint1.md) | desc1 | tag11, tag12, tag13 |" in output
32
+ assert "| [lint2](lint2.md) | desc2 | tag21, tag22 |" in output
@@ -58,10 +58,10 @@ class TestDir:
58
58
  assert " - yamllint or docker" in output
59
59
  output_index = self.get_output_content("index.md")
60
60
  assert (
61
- "| [lint](lint) | A set of tasks to lint different types of files. "
61
+ "| [lint](lint.md) | A set of tasks to lint different types of files. "
62
62
  "| lint, docker, CI |" in output_index
63
63
  )
64
- assert "| [empty](empty) | - | |" in output_index
64
+ assert "| [empty](empty.md) | - | |" in output_index
65
65
  os.remove("empty.md")
66
66
  os.remove("lint.md")
67
67
  os.remove("index.md")
@@ -1,2 +0,0 @@
1
-
2
- ::: src.task2md.task.file
@@ -1,2 +0,0 @@
1
-
2
- ::: src.task2md.task.header
@@ -1,2 +0,0 @@
1
-
2
- ::: src.task2md.task.task
@@ -1,2 +0,0 @@
1
-
2
- ::: src.task2md.task.variable
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes