rolfedh-doc-utils 0.1.3__py3-none-any.whl → 0.1.4__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.
- doc_utils/topic_map_parser.py +10 -2
- doc_utils/unused_adoc.py +3 -0
- doc_utils/unused_images.py +3 -0
- {rolfedh_doc_utils-0.1.3.dist-info → rolfedh_doc_utils-0.1.4.dist-info}/METADATA +1 -1
- {rolfedh_doc_utils-0.1.3.dist-info → rolfedh_doc_utils-0.1.4.dist-info}/RECORD +9 -9
- {rolfedh_doc_utils-0.1.3.dist-info → rolfedh_doc_utils-0.1.4.dist-info}/WHEEL +0 -0
- {rolfedh_doc_utils-0.1.3.dist-info → rolfedh_doc_utils-0.1.4.dist-info}/entry_points.txt +0 -0
- {rolfedh_doc_utils-0.1.3.dist-info → rolfedh_doc_utils-0.1.4.dist-info}/licenses/LICENSE +0 -0
- {rolfedh_doc_utils-0.1.3.dist-info → rolfedh_doc_utils-0.1.4.dist-info}/top_level.txt +0 -0
doc_utils/topic_map_parser.py
CHANGED
|
@@ -22,8 +22,16 @@ def detect_repo_type(base_path='.'):
|
|
|
22
22
|
if yml_files:
|
|
23
23
|
return 'topic_map'
|
|
24
24
|
|
|
25
|
-
# Check for master.adoc files
|
|
26
|
-
master_files =
|
|
25
|
+
# Check for master.adoc files using os.walk to avoid symlink issues
|
|
26
|
+
master_files = []
|
|
27
|
+
for root, dirs, files in os.walk(base_path):
|
|
28
|
+
# Skip symbolic link directories to prevent infinite recursion
|
|
29
|
+
dirs[:] = [d for d in dirs if not os.path.islink(os.path.join(root, d))]
|
|
30
|
+
|
|
31
|
+
# Check for master.adoc in this directory
|
|
32
|
+
if 'master.adoc' in files:
|
|
33
|
+
master_files.append(os.path.join(root, 'master.adoc'))
|
|
34
|
+
|
|
27
35
|
if master_files:
|
|
28
36
|
return 'master_adoc'
|
|
29
37
|
|
doc_utils/unused_adoc.py
CHANGED
|
@@ -6,6 +6,9 @@ from .file_utils import collect_files, write_manifest_and_archive
|
|
|
6
6
|
from .topic_map_parser import detect_repo_type, get_all_topic_map_references
|
|
7
7
|
|
|
8
8
|
def find_unused_adoc(scan_dirs, archive_dir, archive=False, exclude_dirs=None, exclude_files=None):
|
|
9
|
+
# Print safety warning
|
|
10
|
+
print("\n⚠️ SAFETY: Work in a git branch! Run without --archive first to preview.\n")
|
|
11
|
+
|
|
9
12
|
# Detect repository type
|
|
10
13
|
repo_type = detect_repo_type()
|
|
11
14
|
print(f"Detected repository type: {repo_type}")
|
doc_utils/unused_images.py
CHANGED
|
@@ -7,6 +7,9 @@ from .file_utils import collect_files, write_manifest_and_archive
|
|
|
7
7
|
IMAGE_EXTENSIONS = {'.png', '.jpg', '.jpeg', '.gif', '.svg'}
|
|
8
8
|
|
|
9
9
|
def find_unused_images(scan_dirs, archive_dir, archive=False, exclude_dirs=None, exclude_files=None):
|
|
10
|
+
# Print safety warning
|
|
11
|
+
print("\n⚠️ SAFETY: Work in a git branch! Run without --archive first to preview.\n")
|
|
12
|
+
|
|
10
13
|
image_files = collect_files(scan_dirs, IMAGE_EXTENSIONS, exclude_dirs, exclude_files)
|
|
11
14
|
adoc_files = collect_files(['.'], {'.adoc'}, exclude_dirs, exclude_files)
|
|
12
15
|
referenced_images = set()
|
|
@@ -5,13 +5,13 @@ find_unused_attributes.py,sha256=fk-K32eoCVHxoj7RiBNgSmX1arBLuwYfdSAOMc-wIx0,167
|
|
|
5
5
|
doc_utils/__init__.py,sha256=qqZR3lohzkP63soymrEZPBGzzk6-nFzi4_tSffjmu_0,74
|
|
6
6
|
doc_utils/file_utils.py,sha256=fpTh3xx759sF8sNocdn_arsP3KAv8XA6cTQTAVIZiZg,4247
|
|
7
7
|
doc_utils/scannability.py,sha256=XwlmHqDs69p_V36X7DLjPTy0DUoLszSGqYjJ9wE-3hg,982
|
|
8
|
-
doc_utils/topic_map_parser.py,sha256=
|
|
9
|
-
doc_utils/unused_adoc.py,sha256=
|
|
8
|
+
doc_utils/topic_map_parser.py,sha256=tKcIO1m9r2K6dvPRGue58zqMr0O2zKU1gnZMzEE3U6o,4571
|
|
9
|
+
doc_utils/unused_adoc.py,sha256=Bx8TH7twhtuDfxzrPLOWOzTLc5YBhIqrCNaKJJR_V38,2312
|
|
10
10
|
doc_utils/unused_attributes.py,sha256=HBgmHelqearfWl3TTC2bZGiJytjLADIgiGQUNKqXXPg,1847
|
|
11
|
-
doc_utils/unused_images.py,sha256=
|
|
12
|
-
rolfedh_doc_utils-0.1.
|
|
13
|
-
rolfedh_doc_utils-0.1.
|
|
14
|
-
rolfedh_doc_utils-0.1.
|
|
15
|
-
rolfedh_doc_utils-0.1.
|
|
16
|
-
rolfedh_doc_utils-0.1.
|
|
17
|
-
rolfedh_doc_utils-0.1.
|
|
11
|
+
doc_utils/unused_images.py,sha256=nqn36Bbrmon2KlGlcaruNjJJvTQ8_9H0WU9GvCW7rW8,1456
|
|
12
|
+
rolfedh_doc_utils-0.1.4.dist-info/licenses/LICENSE,sha256=vLxtwMVOJA_hEy8b77niTkdmQI9kNJskXHq0dBS36e0,1075
|
|
13
|
+
rolfedh_doc_utils-0.1.4.dist-info/METADATA,sha256=lPNDY0Lu9pBKxxzCXZp5TqSe3DuBqvBHYPVFyLWpP14,8152
|
|
14
|
+
rolfedh_doc_utils-0.1.4.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
15
|
+
rolfedh_doc_utils-0.1.4.dist-info/entry_points.txt,sha256=i8LqEsp0KD4YyVI_7wQ1TMgCuag32D7gQes6bLufmtM,216
|
|
16
|
+
rolfedh_doc_utils-0.1.4.dist-info/top_level.txt,sha256=BkaYN3KbtNvLQjs-QGBKCJb5UAtjEbC_IqxSSIN9P-w,95
|
|
17
|
+
rolfedh_doc_utils-0.1.4.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|