Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
76fb89a
Add mapping file design document
kiyotis Feb 19, 2026
c147337
docs: Address PR review comments on mapping file design
kiyotis Feb 19, 2026
85a6312
fix: Address PR review comments on mapping file design
kiyotis Feb 19, 2026
2926489
docs: Clarify mapping file design based on review feedback
kiyotis Feb 19, 2026
f9181e4
docs: Improve category taxonomy table structure
kiyotis Feb 19, 2026
6d22cc1
fix: Update target paths to use type/category format for clarity
kiyotis Feb 19, 2026
94b95ea
docs: Add comprehensive path pattern analysis for mapping design
kiyotis Feb 19, 2026
1591c3f
docs: Fix source path patterns in mapping table to match actual Nabla…
kiyotis Feb 19, 2026
3e218bb
docs: Correct additional source path patterns in mapping taxonomy
kiyotis Feb 19, 2026
ab1235d
docs: Add complete file mapping table for Nablarch v6 English documen…
kiyotis Feb 19, 2026
abc23b5
docs: Mark TOC-only index files as excluded in mapping table
kiyotis Feb 19, 2026
a911fe3
docs: Complete mapping file categorization and create consolidated ma…
kiyotis Feb 19, 2026
3ec1b3f
docs: Move mapping files to doc/mapping/ and remove redundant file
kiyotis Feb 19, 2026
2f58846
docs: Merge Target Path and Target File Name columns in mapping table
kiyotis Feb 19, 2026
7894e58
docs: Fix target paths to follow type/category-id/filename rule
kiyotis Feb 19, 2026
52c54a1
docs: Use English version of nablarch-patterns files
kiyotis Feb 19, 2026
35f5dd0
docs: Fix duplicate target paths and rename index.md files
kiyotis Feb 19, 2026
cbb74d6
docs: Refactor category taxonomy to use Type and Category ID structure
kiyotis Feb 19, 2026
19db963
docs: Update mapping file design to use Markdown table format
kiyotis Feb 19, 2026
2906686
docs: Add Processing Pattern column to mapping design
kiyotis Feb 19, 2026
10ea94c
docs: Update title extraction to use local files and URL format
kiyotis Feb 19, 2026
c3e1ef2
docs: Simplify Source Path to plain text format
kiyotis Feb 19, 2026
65d9ee2
docs: Generate mapping-v6.md with titles and processing patterns
kiyotis Feb 19, 2026
c3fc2cf
fix: Add filename mapping for duplicate_form_submission.rst
kiyotis Feb 19, 2026
df86e21
fix: Correct official URLs to use minor version and English paths
kiyotis Feb 19, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
358 changes: 358 additions & 0 deletions doc/mapping/all-files-mapping-v6.md

Large diffs are not rendered by default.

354 changes: 354 additions & 0 deletions doc/mapping/mapping-file-design.md

Large diffs are not rendered by default.

311 changes: 311 additions & 0 deletions doc/mapping/mapping-v6.md

Large diffs are not rendered by default.

80 changes: 80 additions & 0 deletions scripts/add-type-column.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
#!/usr/bin/env python3
"""Add Type column to mapping file table."""

import re
import sys

def extract_type_from_target_path(target_path):
"""Extract type from target path (first directory component)."""
if not target_path or target_path.strip() == '':
return ''
parts = target_path.strip().split('/')
return parts[0] if parts else ''

def process_table_row(line):
"""Process a table row and add Type column."""
# Skip separator rows
if re.match(r'^\|[-:\s|]+\|$', line):
# Update separator for new column structure
return '|-------------|------|-------------|---------------------|--------------|'

# Parse table row
parts = [p.strip() for p in line.split('|')]
if len(parts) < 5: # | + 4 columns + |
return line

# parts[0] is empty (before first |)
# parts[1] is Source Path
# parts[2] is Category (will become Category ID)
# parts[3] is Source Path Pattern
# parts[4] is Target Path
# parts[5] is empty (after last |)

source_path = parts[1]
category = parts[2]
pattern = parts[3]
target_path = parts[4]

# Extract type from target path
type_value = extract_type_from_target_path(target_path)

# Rebuild row with Type column inserted after Source Path
return f'| {source_path} | {type_value} | {category} | {pattern} | {target_path} |'

def main():
input_file = 'doc/mapping/all-files-mapping-v6.md'
output_file = 'doc/mapping/all-files-mapping-v6.md.new'

with open(input_file, 'r', encoding='utf-8') as f:
lines = f.readlines()

with open(output_file, 'w', encoding='utf-8') as f:
in_table = False
header_written = False

for line in lines:
line = line.rstrip('\n')

# Detect table header
if line.startswith('| Source Path | Category |'):
# Write new header
f.write('| Source Path | Type | Category ID | Source Path Pattern | Target Path |\n')
in_table = True
header_written = True
continue

# Process table rows
if in_table and line.startswith('|'):
processed = process_table_row(line)
f.write(processed + '\n')
else:
# Not in table or end of table
if in_table and not line.startswith('|'):
in_table = False
f.write(line + '\n')

print(f'Processed {input_file} -> {output_file}')
print('Review the output and replace the original file if correct.')

if __name__ == '__main__':
main()
97 changes: 97 additions & 0 deletions scripts/fix-development-tools-type.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
#!/usr/bin/env python3
"""Fix development-tools entries to use correct Type and Category ID."""

import re
import sys

def determine_dev_tools_category(source_path):
"""Determine the correct Category ID for development_tools files."""
if '/testing_framework/' in source_path:
return 'testing-framework'
elif '/toolbox/' in source_path:
return 'toolbox'
elif '/java_static_analysis/' in source_path:
return 'java-static-analysis'
else:
# Fallback for files directly under development_tools/
return 'development-tools-general'

def update_target_path(target_path, old_category, new_category):
"""Update target path to reflect new type and category structure."""
if not target_path or target_path.strip() == '':
return target_path

# Replace component/development-tools with development-tools/{new_category}
if target_path.startswith('component/development-tools/'):
filename = target_path.replace('component/development-tools/', '')
return f'development-tools/{new_category}/{filename}'

return target_path

def process_table_row(line):
"""Process a table row and fix development-tools entries."""
# Skip separator rows
if re.match(r'^\|[-:\s|]+\|$', line):
return line

# Parse table row
parts = [p.strip() for p in line.split('|')]
if len(parts) < 6: # | + 5 columns + |
return line

# parts[0] is empty (before first |)
# parts[1] is Source Path
# parts[2] is Type
# parts[3] is Category ID
# parts[4] is Source Path Pattern
# parts[5] is Target Path
# parts[6] is empty (after last |)

source_path = parts[1]
type_value = parts[2]
category_id = parts[3]
pattern = parts[4]
target_path = parts[5]

# Only process development-tools related entries
if category_id != 'development-tools' and type_value != 'component':
return line

if 'development_tools' not in source_path:
return line

# Determine new category based on source path
new_category = determine_dev_tools_category(source_path)

# Update type to development-tools
new_type = 'development-tools'

# Update target path
new_target_path = update_target_path(target_path, category_id, new_category)

# Rebuild row
return f'| {source_path} | {new_type} | {new_category} | {pattern} | {new_target_path} |'

def main():
input_file = 'doc/mapping/all-files-mapping-v6.md.new'
output_file = 'doc/mapping/all-files-mapping-v6.md.fixed'

with open(input_file, 'r', encoding='utf-8') as f:
lines = f.readlines()

with open(output_file, 'w', encoding='utf-8') as f:
for line in lines:
line = line.rstrip('\n')

# Process table rows
if line.startswith('|') and 'Source Path' not in line:
processed = process_table_row(line)
f.write(processed + '\n')
else:
f.write(line + '\n')

print(f'Processed {input_file} -> {output_file}')
print('Review the output and replace the original file if correct.')

if __name__ == '__main__':
main()
Loading