rolfedh-doc-utils 0.1.18__py3-none-any.whl → 0.1.20__py3-none-any.whl

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.
archive_unused_files.py CHANGED
@@ -11,6 +11,7 @@ import argparse
11
11
  from doc_utils.unused_adoc import find_unused_adoc
12
12
  from doc_utils.version_check import check_version_on_startup
13
13
  from doc_utils.file_utils import parse_exclude_list_file
14
+ from doc_utils.version import __version__
14
15
 
15
16
  from doc_utils.spinner import Spinner
16
17
  def main():
@@ -25,6 +26,7 @@ def main():
25
26
  parser.add_argument('--exclude-dir', action='append', default=[], help='Directory to exclude (can be used multiple times).')
26
27
  parser.add_argument('--exclude-file', action='append', default=[], help='File to exclude (can be used multiple times).')
27
28
  parser.add_argument('--exclude-list', type=str, help='Path to a file containing directories or files to exclude, one per line.')
29
+ parser.add_argument('--version', action='version', version=f'%(prog)s {__version__}')
28
30
  args = parser.parse_args()
29
31
 
30
32
  # Use provided scan directories or None for auto-discovery
archive_unused_images.py CHANGED
@@ -10,6 +10,7 @@ import argparse
10
10
  from doc_utils.unused_images import find_unused_images
11
11
  from doc_utils.version_check import check_version_on_startup
12
12
  from doc_utils.file_utils import parse_exclude_list_file
13
+ from doc_utils.version import __version__
13
14
 
14
15
  from doc_utils.spinner import Spinner
15
16
  def main():
@@ -20,6 +21,7 @@ def main():
20
21
  parser.add_argument('--exclude-dir', action='append', default=[], help='Directory to exclude (can be used multiple times).')
21
22
  parser.add_argument('--exclude-file', action='append', default=[], help='File to exclude (can be used multiple times).')
22
23
  parser.add_argument('--exclude-list', type=str, help='Path to a file containing directories or files to exclude, one per line.')
24
+ parser.add_argument('--version', action='version', version=f'%(prog)s {__version__}')
23
25
  args = parser.parse_args()
24
26
 
25
27
  scan_dirs = ['.']
check_scannability.py CHANGED
@@ -19,6 +19,7 @@ from datetime import datetime
19
19
  from doc_utils.scannability import check_scannability
20
20
  from doc_utils.version_check import check_version_on_startup
21
21
  from doc_utils.file_utils import collect_files, parse_exclude_list_file
22
+ from doc_utils.version import __version__
22
23
 
23
24
  from doc_utils.spinner import Spinner
24
25
  BASE_SENTENCE_WORD_LIMIT = 22
@@ -43,6 +44,7 @@ def main():
43
44
  parser.add_argument('--exclude-dir', action='append', default=[], help='Directory to exclude (can be used multiple times).')
44
45
  parser.add_argument('--exclude-file', action='append', default=[], help='File to exclude (can be used multiple times).')
45
46
  parser.add_argument('--exclude-list', type=str, help='Path to a file containing directories or files to exclude, one per line.')
47
+ parser.add_argument('--version', action='version', version=f'%(prog)s {__version__}')
46
48
  # Do not add -h/--help to argparse, handled manually above
47
49
  args = parser.parse_args()
48
50
 
@@ -39,6 +39,7 @@ def process_file(file_path: Path, dry_run: bool = False, verbose: bool = False)
39
39
  changes_made = False
40
40
  in_block = False # Track if we're inside a block (admonition, listing, etc.)
41
41
  in_conditional = False # Track if we're inside a conditional block
42
+ in_comment_block = False # Track if we're inside a //// comment block
42
43
 
43
44
  for i, current_line in enumerate(lines):
44
45
  prev_line = lines[i-1] if i > 0 else ""
@@ -48,9 +49,11 @@ def process_file(file_path: Path, dry_run: bool = False, verbose: bool = False)
48
49
  if re.match(r'^(ifdef::|ifndef::)', current_line):
49
50
  in_conditional = True
50
51
  # Add blank line before conditional if needed
52
+ # Don't add if previous line is a comment (they form a logical unit)
51
53
  if (prev_line and
52
54
  not re.match(r'^\s*$', prev_line) and
53
- not re.match(r'^(ifdef::|ifndef::|endif::)', prev_line)):
55
+ not re.match(r'^(ifdef::|ifndef::|endif::)', prev_line) and
56
+ not re.match(r'^//', prev_line)):
54
57
  new_lines.append("")
55
58
  changes_made = True
56
59
  if verbose:
@@ -70,19 +73,55 @@ def process_file(file_path: Path, dry_run: bool = False, verbose: bool = False)
70
73
  if verbose:
71
74
  messages.append(" Added blank line after conditional block")
72
75
 
76
+ # Check for comment block delimiters (////)
77
+ elif re.match(r'^////+$', current_line):
78
+ in_comment_block = not in_comment_block # Toggle comment block state
79
+ new_lines.append(current_line)
80
+
81
+ # If we're closing a comment block, add blank line after if needed
82
+ if not in_comment_block:
83
+ if (next_line and
84
+ not re.match(r'^\s*$', next_line) and
85
+ not re.match(r'^////+$', next_line)):
86
+ new_lines.append("")
87
+ changes_made = True
88
+ if verbose:
89
+ messages.append(" Added blank line after comment block")
90
+
73
91
  # Check for block delimiters (====, ----, ...., ____)
74
92
  # These are used for admonitions, listing blocks, literal blocks, etc.
75
93
  elif re.match(r'^(====+|----+|\.\.\.\.+|____+)$', current_line):
76
94
  in_block = not in_block # Toggle block state
77
95
  new_lines.append(current_line)
96
+
97
+ # Check for role blocks ([role="..."])
98
+ # Role blocks don't need special spacing - they're followed directly by content
99
+ elif not in_block and not in_comment_block and re.match(r'^\[role=', current_line):
100
+ new_lines.append(current_line)
101
+
102
+ # Check for block titles (.Title)
103
+ elif not in_block and not in_comment_block and re.match(r'^\.[A-Z]', current_line):
104
+ # Add blank line before block title if needed
105
+ if (prev_line and
106
+ not re.match(r'^\s*$', prev_line) and
107
+ not re.match(r'^=+\s+', prev_line) and
108
+ not re.match(r'^\[role=', prev_line)): # Don't add if previous is heading, empty, or role block
109
+ new_lines.append("")
110
+ changes_made = True
111
+ if verbose:
112
+ truncated = current_line[:50] + "..." if len(current_line) > 50 else current_line
113
+ messages.append(f" Added blank line before block title: {truncated}")
114
+ new_lines.append(current_line)
115
+
78
116
  # Check if current line is a heading (but not if we're in a block)
79
117
  elif not in_block and re.match(r'^=+\s+', current_line):
80
118
  new_lines.append(current_line)
81
119
 
82
- # Check if next line is not empty and not another heading
120
+ # Check if next line is not empty, not another heading, and not a comment block
83
121
  if (next_line and
84
122
  not re.match(r'^=+\s+', next_line) and
85
- not re.match(r'^\s*$', next_line)):
123
+ not re.match(r'^\s*$', next_line) and
124
+ not re.match(r'^////+$', next_line)): # Don't add if next is comment block
86
125
  new_lines.append("")
87
126
  changes_made = True
88
127
  if verbose:
@@ -98,15 +137,19 @@ def process_file(file_path: Path, dry_run: bool = False, verbose: bool = False)
98
137
  # Check if next line is an include directive
99
138
  if next_line and re.match(r'^include::', next_line):
100
139
  # This comment belongs to the include, add blank line before comment if needed
140
+ # This includes when previous line is an include (to separate include blocks)
101
141
  if (prev_line and
102
142
  not re.match(r'^\s*$', prev_line) and
103
143
  not re.match(r'^//', prev_line) and
104
- not re.match(r'^:', prev_line)): # Don't add if previous is attribute
144
+ not re.match(r'^:', prev_line)):
105
145
  new_lines.append("")
106
146
  changes_made = True
107
147
  if verbose:
108
148
  messages.append(" Added blank line before comment above include")
109
- new_lines.append(current_line)
149
+ new_lines.append(current_line)
150
+ else:
151
+ # Standalone comment, just add it
152
+ new_lines.append(current_line)
110
153
 
111
154
  # Check if current line is an attribute (starts with :)
112
155
  elif re.match(r'^:', current_line):
@@ -125,7 +168,10 @@ def process_file(file_path: Path, dry_run: bool = False, verbose: bool = False)
125
168
  changes_made = True
126
169
  if verbose:
127
170
  messages.append(" Added blank line before attribute above include")
128
- new_lines.append(current_line)
171
+ new_lines.append(current_line)
172
+ else:
173
+ # Standalone attribute, just add it
174
+ new_lines.append(current_line)
129
175
 
130
176
  # Check if current line is an include directive
131
177
  elif re.match(r'^include::', current_line):
@@ -155,10 +201,10 @@ def process_file(file_path: Path, dry_run: bool = False, verbose: bool = False)
155
201
  if not (is_attribute_include and is_near_h1):
156
202
  # Don't add blank line if there's a comment or attribute above (it was handled by the comment/attribute logic)
157
203
  if not has_comment_above and not has_attribute_above:
158
- # Add blank line before include if previous line is not empty and not an include
204
+ # Add blank line before include if previous line is not empty
205
+ # This includes adding blank lines between consecutive includes
159
206
  if (prev_line and
160
- not re.match(r'^\s*$', prev_line) and
161
- not re.match(r'^include::', prev_line)):
207
+ not re.match(r'^\s*$', prev_line)):
162
208
  new_lines.append("")
163
209
  changes_made = True
164
210
  if verbose:
doc_utils/version.py ADDED
@@ -0,0 +1,8 @@
1
+ """Version information for doc-utils."""
2
+
3
+ # This should match the version in pyproject.toml
4
+ __version__ = "0.1.20"
5
+
6
+ def get_version():
7
+ """Return the current version string."""
8
+ return __version__
@@ -136,6 +136,26 @@ def check_for_update(force_check: bool = False) -> Optional[str]:
136
136
  return None
137
137
 
138
138
 
139
+ def detect_install_method() -> str:
140
+ """
141
+ Detect how the package was installed.
142
+
143
+ Returns:
144
+ 'pipx', 'pip', or 'unknown'
145
+ """
146
+ # Check if running from pipx venv
147
+ if 'pipx' in sys.prefix:
148
+ return 'pipx'
149
+
150
+ # Check PIPX_HOME environment variable
151
+ pipx_home = os.environ.get('PIPX_HOME') or os.path.join(Path.home(), '.local', 'pipx')
152
+ if pipx_home and str(Path(sys.prefix)).startswith(str(Path(pipx_home))):
153
+ return 'pipx'
154
+
155
+ # Default to pip
156
+ return 'pip'
157
+
158
+
139
159
  def show_update_notification(latest_version: str, current_version: str = None):
140
160
  """Show update notification to user."""
141
161
  if not current_version:
@@ -144,9 +164,17 @@ def show_update_notification(latest_version: str, current_version: str = None):
144
164
  except Exception:
145
165
  current_version = 'unknown'
146
166
 
167
+ # Detect installation method and recommend appropriate upgrade command
168
+ install_method = detect_install_method()
169
+
147
170
  # Use stderr to avoid interfering with tool output
148
171
  print(f"\n📦 Update available: {current_version} → {latest_version}", file=sys.stderr)
149
- print(f" Run: pip install --upgrade rolfedh-doc-utils", file=sys.stderr)
172
+
173
+ if install_method == 'pipx':
174
+ print(f" Run: pipx upgrade rolfedh-doc-utils", file=sys.stderr)
175
+ else:
176
+ print(f" Run: pip install --upgrade rolfedh-doc-utils", file=sys.stderr)
177
+
150
178
  print("", file=sys.stderr)
151
179
 
152
180
 
doc_utils_cli.py ADDED
@@ -0,0 +1,148 @@
1
+ #!/usr/bin/env python3
2
+ """
3
+ doc-utils - CLI tools for AsciiDoc documentation projects
4
+
5
+ Main entry point that provides a hub for all doc-utils tools.
6
+ """
7
+
8
+ import argparse
9
+ import sys
10
+ from doc_utils.version import __version__
11
+ from doc_utils.version_check import check_version_on_startup
12
+
13
+
14
+ # Tool definitions with descriptions
15
+ TOOLS = [
16
+ {
17
+ 'name': 'validate-links',
18
+ 'description': 'Validates all links in documentation with URL transposition [EXPERIMENTAL]',
19
+ 'example': 'validate-links --transpose "https://prod--https://preview"'
20
+ },
21
+ {
22
+ 'name': 'extract-link-attributes',
23
+ 'description': 'Extracts link/xref macros with attributes into reusable definitions',
24
+ 'example': 'extract-link-attributes --dry-run'
25
+ },
26
+ {
27
+ 'name': 'replace-link-attributes',
28
+ 'description': 'Resolves Vale LinkAttribute issues by replacing attributes in link URLs',
29
+ 'example': 'replace-link-attributes --dry-run'
30
+ },
31
+ {
32
+ 'name': 'format-asciidoc-spacing',
33
+ 'description': 'Standardizes spacing after headings and around includes [EXPERIMENTAL]',
34
+ 'example': 'format-asciidoc-spacing --dry-run modules/'
35
+ },
36
+ {
37
+ 'name': 'check-scannability',
38
+ 'description': 'Analyzes document readability by checking sentence/paragraph length',
39
+ 'example': 'check-scannability --max-sentence-length 5'
40
+ },
41
+ {
42
+ 'name': 'archive-unused-files',
43
+ 'description': 'Finds and optionally archives unreferenced AsciiDoc files',
44
+ 'example': 'archive-unused-files # preview\narchive-unused-files --archive # execute'
45
+ },
46
+ {
47
+ 'name': 'archive-unused-images',
48
+ 'description': 'Finds and optionally archives unreferenced image files',
49
+ 'example': 'archive-unused-images # preview\narchive-unused-images --archive # execute'
50
+ },
51
+ {
52
+ 'name': 'find-unused-attributes',
53
+ 'description': 'Identifies unused attribute definitions in AsciiDoc files',
54
+ 'example': 'find-unused-attributes # auto-discovers attributes files'
55
+ },
56
+ ]
57
+
58
+
59
+ def print_tools_list():
60
+ """Print a formatted list of all available tools."""
61
+ print("\n🛠️ Available Tools:\n")
62
+
63
+ for tool in TOOLS:
64
+ # Print tool name and description
65
+ experimental = " [EXPERIMENTAL]" if "[EXPERIMENTAL]" in tool['description'] else ""
66
+ desc = tool['description'].replace(" [EXPERIMENTAL]", "")
67
+ print(f" {tool['name']}{experimental}")
68
+ print(f" {desc}")
69
+ print()
70
+
71
+
72
+ def print_help():
73
+ """Print comprehensive help information."""
74
+ print(f"doc-utils v{__version__}")
75
+ print("\nCLI tools for maintaining clean, consistent AsciiDoc documentation repositories.")
76
+
77
+ print_tools_list()
78
+
79
+ print("📚 Usage:")
80
+ print(" doc-utils --version Show version information")
81
+ print(" doc-utils --list List all available tools")
82
+ print(" doc-utils --help Show this help message")
83
+ print(" <tool-name> --help Show help for a specific tool")
84
+ print()
85
+ print("📖 Documentation:")
86
+ print(" https://rolfedh.github.io/doc-utils/")
87
+ print()
88
+ print("💡 Examples:")
89
+ print(" find-unused-attributes")
90
+ print(" check-scannability --max-sentence-length 5")
91
+ print(" format-asciidoc-spacing --dry-run modules/")
92
+ print()
93
+ print("⚠️ Safety First:")
94
+ print(" Always work in a git branch and review changes with 'git diff'")
95
+ print()
96
+
97
+
98
+ def main():
99
+ """Main entry point for doc-utils command."""
100
+ # Check for updates (non-blocking)
101
+ check_version_on_startup()
102
+
103
+ parser = argparse.ArgumentParser(
104
+ description='doc-utils - CLI tools for AsciiDoc documentation projects',
105
+ add_help=False # We'll handle help ourselves
106
+ )
107
+
108
+ parser.add_argument(
109
+ '--version',
110
+ action='version',
111
+ version=f'doc-utils {__version__}'
112
+ )
113
+
114
+ parser.add_argument(
115
+ '--list',
116
+ action='store_true',
117
+ help='List all available tools'
118
+ )
119
+
120
+ parser.add_argument(
121
+ '--help', '-h',
122
+ action='store_true',
123
+ help='Show this help message'
124
+ )
125
+
126
+ # Parse known args to allow for future expansion
127
+ args, remaining = parser.parse_known_args()
128
+
129
+ # Handle flags
130
+ if args.list:
131
+ print_tools_list()
132
+ return 0
133
+
134
+ if args.help or len(sys.argv) == 1:
135
+ print_help()
136
+ return 0
137
+
138
+ # If we get here with remaining args, show help
139
+ if remaining:
140
+ print(f"doc-utils: unknown command or option: {' '.join(remaining)}")
141
+ print("\nRun 'doc-utils --help' for usage information.")
142
+ return 1
143
+
144
+ return 0
145
+
146
+
147
+ if __name__ == '__main__':
148
+ sys.exit(main())
@@ -11,6 +11,7 @@ import argparse
11
11
  import sys
12
12
  from doc_utils.extract_link_attributes import extract_link_attributes
13
13
  from doc_utils.version_check import check_version_on_startup
14
+ from doc_utils.version import __version__
14
15
 
15
16
 
16
17
  def main():
@@ -86,6 +87,7 @@ Examples:
86
87
  default='both',
87
88
  help='Type of macros to process: link, xref, or both (default: both)'
88
89
  )
90
+ parser.add_argument('--version', action='version', version=f'%(prog)s {__version__}')
89
91
 
90
92
  args = parser.parse_args()
91
93
 
find_unused_attributes.py CHANGED
@@ -15,6 +15,7 @@ from datetime import datetime
15
15
  from doc_utils.unused_attributes import find_unused_attributes, find_attributes_files, select_attributes_file, comment_out_unused_attributes
16
16
  from doc_utils.spinner import Spinner
17
17
  from doc_utils.version_check import check_version_on_startup
18
+ from doc_utils.version import __version__
18
19
 
19
20
  def main():
20
21
  # Check for updates (non-blocking, won't interfere with tool operation)
@@ -27,6 +28,7 @@ def main():
27
28
  )
28
29
  parser.add_argument('-o', '--output', action='store_true', help='Write results to a timestamped txt file in your home directory.')
29
30
  parser.add_argument('-c', '--comment-out', action='store_true', help='Comment out unused attributes in the attributes file with "// Unused".')
31
+ parser.add_argument('--version', action='version', version=f'%(prog)s {__version__}')
30
32
  args = parser.parse_args()
31
33
 
32
34
  # Determine which attributes file to use
@@ -11,6 +11,7 @@ from pathlib import Path
11
11
 
12
12
  from doc_utils.format_asciidoc_spacing import process_file, find_adoc_files
13
13
  from doc_utils.version_check import check_version_on_startup
14
+ from doc_utils.version import __version__
14
15
 
15
16
 
16
17
  from doc_utils.spinner import Spinner
@@ -63,6 +64,7 @@ Examples:
63
64
  action='store_true',
64
65
  help='Show detailed output'
65
66
  )
67
+ parser.add_argument('--version', action='version', version=f'%(prog)s {__version__}')
66
68
 
67
69
  args = parser.parse_args()
68
70
 
@@ -20,6 +20,7 @@ from doc_utils.replace_link_attributes import (
20
20
  find_adoc_files
21
21
  )
22
22
  from doc_utils.version_check import check_version_on_startup
23
+ from doc_utils.version import __version__
23
24
  from doc_utils.spinner import Spinner
24
25
 
25
26
 
@@ -111,6 +112,7 @@ def main():
111
112
  default='both',
112
113
  help='Type of macros to process: link, xref, or both (default: both)'
113
114
  )
115
+ parser.add_argument('--version', action='version', version=f'%(prog)s {__version__}')
114
116
 
115
117
  args = parser.parse_args()
116
118
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: rolfedh-doc-utils
3
- Version: 0.1.18
3
+ Version: 0.1.20
4
4
  Summary: CLI tools for AsciiDoc documentation projects
5
5
  Author: Rolfe Dlugy-Hegwer
6
6
  License: MIT License
@@ -57,6 +57,9 @@ These tools can modify or delete files. **Always:**
57
57
  # Install
58
58
  pipx install rolfedh-doc-utils
59
59
 
60
+ # Verify installation
61
+ doc-utils --version
62
+
60
63
  # Upgrade to latest version
61
64
  pipx upgrade rolfedh-doc-utils
62
65
  ```
@@ -75,6 +78,18 @@ pip install -e .
75
78
 
76
79
  ## 🛠️ Available Tools
77
80
 
81
+ ### Quick Reference
82
+
83
+ Run `doc-utils` to see all available tools and their descriptions:
84
+
85
+ ```bash
86
+ doc-utils --help # Show comprehensive help
87
+ doc-utils --list # List all tools
88
+ doc-utils --version # Show version
89
+ ```
90
+
91
+ ### Individual Tools
92
+
78
93
  **Note:** Commands use hyphens (`-`), while Python files use underscores (`_`). After installing with pipx, use the hyphenated commands directly.
79
94
 
80
95
  | Tool | Description | Usage |
@@ -197,11 +212,11 @@ Before submitting PRs:
197
212
 
198
213
  ### 🔔 Update Notifications
199
214
 
200
- All tools now check for updates automatically and notify you when a new version is available:
215
+ All tools automatically check for updates and notify you when a new version is available. The notification will recommend the appropriate upgrade command based on how you installed the package:
201
216
 
202
217
  ```
203
- 📦 Update available: 0.1.15 → 0.1.16
204
- Run: pip install --upgrade rolfedh-doc-utils
218
+ 📦 Update available: 0.1.19 → 0.1.20
219
+ Run: pipx upgrade rolfedh-doc-utils
205
220
  ```
206
221
 
207
222
  To disable update checks, set the environment variable:
@@ -0,0 +1,29 @@
1
+ archive_unused_files.py,sha256=OJZrkqn70hiOXED218jMYPFNFWnsDpjsCYOmBRxYnHU,2274
2
+ archive_unused_images.py,sha256=fZeyEZtTd72Gbd3YBXTy5xoshAAM9qb4qFPMjhHL1Fg,1864
3
+ check_scannability.py,sha256=O6ROr-e624jVPvPpASpsWo0gTfuCFpA2mTSX61BjAEI,5478
4
+ doc_utils_cli.py,sha256=3ShuLw--q-LpADHfz80ftEQndgVnXyTkupXnoRMR2UA,4726
5
+ extract_link_attributes.py,sha256=wR2SmR2la-jR6DzDbas2PoNONgRZ4dZ6aqwzkwEv8Gs,3516
6
+ find_unused_attributes.py,sha256=77CxFdm72wj6SO81w-auMdDjnvF83jWy_qaM7DsAtBw,4263
7
+ format_asciidoc_spacing.py,sha256=nmWpw2dgwhd81LXyznq0rT8w6Z7cNRyGtPJGRyKFRdc,4212
8
+ replace_link_attributes.py,sha256=Cpc4E-j9j-4_y0LOstAKYOPl02Ln_2bGNIeqp3ZVCdA,7624
9
+ validate_links.py,sha256=lWuK8sgfiFdfcUdSVAt_5U9JHVde_oa6peSUlBQtsac,6145
10
+ doc_utils/__init__.py,sha256=qqZR3lohzkP63soymrEZPBGzzk6-nFzi4_tSffjmu_0,74
11
+ doc_utils/extract_link_attributes.py,sha256=U0EvPZReJQigNfbT-icBsVT6Li64hYki5W7MQz6qqbc,22743
12
+ doc_utils/file_utils.py,sha256=fpTh3xx759sF8sNocdn_arsP3KAv8XA6cTQTAVIZiZg,4247
13
+ doc_utils/format_asciidoc_spacing.py,sha256=QMeEGkbcZnK7MJDWdi6s_ct5LQ5A4zOfDaDwg8yrli0,12528
14
+ doc_utils/replace_link_attributes.py,sha256=gmAs68_njBqEz-Qni-UGgeYEDTMxlTWk_IOm76FONNE,7279
15
+ doc_utils/scannability.py,sha256=XwlmHqDs69p_V36X7DLjPTy0DUoLszSGqYjJ9wE-3hg,982
16
+ doc_utils/spinner.py,sha256=lJg15qzODiKoR0G6uFIk2BdVNgn9jFexoTRUMrjiWvk,3554
17
+ doc_utils/topic_map_parser.py,sha256=tKcIO1m9r2K6dvPRGue58zqMr0O2zKU1gnZMzEE3U6o,4571
18
+ doc_utils/unused_adoc.py,sha256=2cbqcYr1os2EhETUU928BlPRlsZVSdI00qaMhqjSIqQ,5263
19
+ doc_utils/unused_attributes.py,sha256=OHyAdaBD7aNo357B0SLBN5NC_jNY5TWXMwgtfJNh3X8,7621
20
+ doc_utils/unused_images.py,sha256=nqn36Bbrmon2KlGlcaruNjJJvTQ8_9H0WU9GvCW7rW8,1456
21
+ doc_utils/validate_links.py,sha256=iBGXnwdeLlgIT3fo3v01ApT5k0X2FtctsvkrE6E3VMk,19610
22
+ doc_utils/version.py,sha256=BZlea1i6_Z9BTH1ITRRSnO3AEaAbTNlKLE-J4GL1QIo,203
23
+ doc_utils/version_check.py,sha256=eHJnZmBTbdhhY2fJQW9KnnyD0rWEvCZpMg6oSr0fOmI,7090
24
+ rolfedh_doc_utils-0.1.20.dist-info/licenses/LICENSE,sha256=vLxtwMVOJA_hEy8b77niTkdmQI9kNJskXHq0dBS36e0,1075
25
+ rolfedh_doc_utils-0.1.20.dist-info/METADATA,sha256=SNhIc-1rGCXJVSJvL827C1bzHCpQu6Dr-3pJnJzeh4U,8203
26
+ rolfedh_doc_utils-0.1.20.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
27
+ rolfedh_doc_utils-0.1.20.dist-info/entry_points.txt,sha256=m3z-u5BsRe5Zt05cJdP5w4R-3d7wfa6yfJ6lHdxJYT8,449
28
+ rolfedh_doc_utils-0.1.20.dist-info/top_level.txt,sha256=AeJfm0SrL6JK9YcehGnIi-UeRksDC0YETck667IEzeo,196
29
+ rolfedh_doc_utils-0.1.20.dist-info/RECORD,,
@@ -2,6 +2,7 @@
2
2
  archive-unused-files = archive_unused_files:main
3
3
  archive-unused-images = archive_unused_images:main
4
4
  check-scannability = check_scannability:main
5
+ doc-utils = doc_utils_cli:main
5
6
  extract-link-attributes = extract_link_attributes:main
6
7
  find-unused-attributes = find_unused_attributes:main
7
8
  format-asciidoc-spacing = format_asciidoc_spacing:main
@@ -2,6 +2,7 @@ archive_unused_files
2
2
  archive_unused_images
3
3
  check_scannability
4
4
  doc_utils
5
+ doc_utils_cli
5
6
  extract_link_attributes
6
7
  find_unused_attributes
7
8
  format_asciidoc_spacing
validate_links.py CHANGED
@@ -13,6 +13,7 @@ import sys
13
13
  import json
14
14
  from doc_utils.validate_links import LinkValidator, parse_transpositions, format_results
15
15
  from doc_utils.version_check import check_version_on_startup
16
+ from doc_utils.version import __version__
16
17
  from doc_utils.spinner import Spinner
17
18
 
18
19
 
@@ -132,6 +133,7 @@ Examples:
132
133
  action='store_true',
133
134
  help='Exit with error code if broken links are found'
134
135
  )
136
+ parser.add_argument('--version', action='version', version=f'%(prog)s {__version__}')
135
137
 
136
138
  args = parser.parse_args()
137
139
 
@@ -1,27 +0,0 @@
1
- archive_unused_files.py,sha256=VL4hEN40CTYJzScyevY1fn7Fs2O083qfJUYdrv5JxxM,2142
2
- archive_unused_images.py,sha256=uZ4-OSMja98toyraDaeG6OMjV7kU2hq-QsTjnDl-BfQ,1732
3
- check_scannability.py,sha256=IdHwzQtBWzx95zIDOx3B7OyzoKxTVtpn0wJUErFQRC0,5346
4
- extract_link_attributes.py,sha256=bfWC6h4QWj6YvwZ3-tc3K7oMC2wN4QdA4YMCKcYdKCg,3384
5
- find_unused_attributes.py,sha256=KYVhIgJobEtMzzVI4P7wkMym7Z6N27IdxQmg3qySvAo,4131
6
- format_asciidoc_spacing.py,sha256=B3Bo68_i_RJNlUdNLZ4TiYUslrbwhSkzX3Dyd9JWRo0,4080
7
- replace_link_attributes.py,sha256=OGD-COUG3JUCYOoARa32xqaSEcA-p31AJLk-d-FPUUQ,7492
8
- validate_links.py,sha256=KmN4dULwLiLM2lUyteXwbBuTuQHcNkCq0nhiaZ48BtI,6013
9
- doc_utils/__init__.py,sha256=qqZR3lohzkP63soymrEZPBGzzk6-nFzi4_tSffjmu_0,74
10
- doc_utils/extract_link_attributes.py,sha256=U0EvPZReJQigNfbT-icBsVT6Li64hYki5W7MQz6qqbc,22743
11
- doc_utils/file_utils.py,sha256=fpTh3xx759sF8sNocdn_arsP3KAv8XA6cTQTAVIZiZg,4247
12
- doc_utils/format_asciidoc_spacing.py,sha256=XnVJekaj39aDzjV3xFKl58flM41AaJzejxNYJIIAMz0,10139
13
- doc_utils/replace_link_attributes.py,sha256=gmAs68_njBqEz-Qni-UGgeYEDTMxlTWk_IOm76FONNE,7279
14
- doc_utils/scannability.py,sha256=XwlmHqDs69p_V36X7DLjPTy0DUoLszSGqYjJ9wE-3hg,982
15
- doc_utils/spinner.py,sha256=lJg15qzODiKoR0G6uFIk2BdVNgn9jFexoTRUMrjiWvk,3554
16
- doc_utils/topic_map_parser.py,sha256=tKcIO1m9r2K6dvPRGue58zqMr0O2zKU1gnZMzEE3U6o,4571
17
- doc_utils/unused_adoc.py,sha256=2cbqcYr1os2EhETUU928BlPRlsZVSdI00qaMhqjSIqQ,5263
18
- doc_utils/unused_attributes.py,sha256=OHyAdaBD7aNo357B0SLBN5NC_jNY5TWXMwgtfJNh3X8,7621
19
- doc_utils/unused_images.py,sha256=nqn36Bbrmon2KlGlcaruNjJJvTQ8_9H0WU9GvCW7rW8,1456
20
- doc_utils/validate_links.py,sha256=iBGXnwdeLlgIT3fo3v01ApT5k0X2FtctsvkrE6E3VMk,19610
21
- doc_utils/version_check.py,sha256=1ySC6Au21OqUMZr7AkIa3nMNh3M6wLQmPQCi-ZFIqoE,6338
22
- rolfedh_doc_utils-0.1.18.dist-info/licenses/LICENSE,sha256=vLxtwMVOJA_hEy8b77niTkdmQI9kNJskXHq0dBS36e0,1075
23
- rolfedh_doc_utils-0.1.18.dist-info/METADATA,sha256=0MRwKnjHS1EEX5--O9m0UQVvQpYSICZ1k-VSTX3VhQA,7824
24
- rolfedh_doc_utils-0.1.18.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
25
- rolfedh_doc_utils-0.1.18.dist-info/entry_points.txt,sha256=2J4Ojc3kkuArpe2xcUOPc0LxSWCmnctvw8hy8zpnbO4,418
26
- rolfedh_doc_utils-0.1.18.dist-info/top_level.txt,sha256=1w0JWD7w7gnM5Sga2K4fJieNZ7CHPTAf0ozYk5iIlmo,182
27
- rolfedh_doc_utils-0.1.18.dist-info/RECORD,,