The Terminal prompt I started with: cd /Users/kirkmasden/Desktop/AppSheetAnalysis/
kirkmasden@Kirks-MacBook-Pro AppSheetAnalysis % source venv/bin/activate
(venv) kirkmasden@Kirks-MacBook-Pro AppSheetAnalysis % python appsheet_parser_and_orphan_detector-main/master_parser_and_orphan_detector.py "MyApp_Data/Application Documentation.html"
============================================================
đ ī¸ AppSheet HTML Documentation Parser
and Orphan Detector đ
============================================================
Project director: Kirk Masden
Chief coder: Claude Opus 4
Input directory: /Users/kirkmasden/Desktop/AppSheetAnalysis/MyApp_Data
Output directory: /Users/kirkmasden/Desktop/AppSheetAnalysis/20250907_124504_MyApp_Data_parse
Time: 2025-09-07 12:45:04
============================================================
PHASE 1: Parsing Tables and Slices
============================================================
đ Extracting data sources...
â Found 16 tables (9 regular, 1 system, 6 process)
đ Complete Table Summary:
đ Regular Tables: 9 (1,104 columns total)
ââ Archive: 84 columns
ââ Kankaku: 172 columns
ââ Options: 73 columns
ââ Overall: 125 columns
ââ Progress: 168 columns
ââ Seminar: 41 columns
ââ Settings: 189 columns
ââ Stats: 237 columns
ââ Welcome: 15 columns
đ System Table: 1 (15 columns total)
ââ _Per User Settings: 15 columns
đ Process Tables: 6 (1,104 columns total)
ââ Handle updated Kankaku record Process Table: 173 columns
ââ Process for Language change Bot Process Table: 192 columns
ââ Switch Enum Output: 189 columns
ââ Switch cram language Output: 189 columns
ââ Switch size language Output: 189 columns
ââ trigger update Output: 172 columns
đ Total number of columns: 2,223 â
đ Total number of tables: 16 â
đ Loaded 62 slice-to-table mappings
â
Slices saved to: appsheet_slices.csv
đ Regular tables to be analyzed (system and process tables excluded):
đ Number of tables: 9
ââ Archive (6 slices)
ââ Archive 1: 15 actions, 84 columns
ââ Archive 1DW: 2 actions, 50 columns
ââ Archive 2WD: 2 actions, 50 columns
ââ Archive table 2: 1 action, 53 columns
ââ Archive table 3: 1 action, 51 columns
ââ Graph: 1 action, 84 columns
ââ Kankaku (9 slices)
ââ All Cards for menu: 24 actions, 108 columns
ââ Card stats: 1 action, 92 columns
ââ Card stats 2: 0 actions, 51 columns
ââ D to W: 9 actions, 56 columns
ââ Definition: 25 actions, 63 columns
ââ Finished cards: 0 actions, 92 columns
ââ Todays Cards: 11 actions, 152 columns
ââ W to D: 17 actions, 61 columns
ââ Word: 21 actions, 65 columns
ââ Options (4 slices)
ââ Add menu 1: 28 actions, 73 columns
ââ Archive index: 5 actions, 42 columns
ââ Browse Archive: 9 actions, 44 columns
ââ Seminar 2: 15 actions, 73 columns
ââ Overall (1 slice)
ââ Overall slice: 1 action, 56 columns
ââ Progress (1 slice)
ââ Last in progress: 1 action, 168 columns
ââ Seminar (2 slices)
ââ Seminar slice: 20 actions, 41 columns
ââ Seminar slice all: 13 actions, 41 columns
ââ Settings (27 slices)
ââ Cram: 10 actions, 95 columns
ââ Cram 2: 8 actions, 189 columns
ââ DWend: 2 actions, 66 columns
ââ Dictionary: 9 actions, 85 columns
ââ Dictionary list: 9 actions, 85 columns
ââ Error: 8 actions, 189 columns
ââ Error 2: 1 action, 189 columns
ââ Help: 6 actions, 189 columns
ââ Language flag: 3 actions, 69 columns
ââ ListNoCards: 2 actions, 64 columns
ââ Mail: 1 action, 189 columns
ââ Movie list: 13 actions, 97 columns
ââ NoCards: 1 action, 69 columns
ââ NoCardsCram: 1 action, 69 columns
ââ NoDtoW: 1 action, 189 columns
ââ NoWtoD: 1 action, 189 columns
ââ Number to add: 1 action, 66 columns
ââ Position: 1 action, 61 columns
ââ Schedule: 4 actions, 113 columns
ââ Session slice: 13 actions, 74 columns
ââ Settings import: 3 actions, 71 columns
ââ System language: 1 action, 189 columns
ââ Time zone: 1 action, 100 columns
ââ WDend: 2 actions, 68 columns
ââ Web cards: 1 action, 189 columns
ââ Word size: 1 action, 64 columns
ââ YouGlish: 9 actions, 85 columns
ââ Stats (6 slices)
ââ Card statistics: 2 actions, 19 columns
ââ Dictionaries: 188 actions, 237 columns
ââ Stats Explanation: 0 actions, 237 columns
ââ Stats index: 1 action, 19 columns
ââ Stats index J: 1 action, 19 columns
ââ Stats setsumei: 0 actions, 50 columns
ââ Welcome (6 slices)
ââ Good job images: 1 action, 15 columns
ââ Hang in there images: 1 action, 15 columns
ââ Hello: 1 action, 15 columns
ââ Misc images: 1 action, 15 columns
ââ Morning: 1 action, 15 columns
ââ Welcome slice: 4 actions, 15 columns
đ Total number of slices: 62
đ Total number of columns in regular tables: 1,104
============================================================
PHASE 2: Parsing Columns
============================================================
đ Loading slice mapping from appsheet_slices.csv
â
Loaded 62 slice mappings
đ Extracting columns...
đ Scanning for system-generated tables...
â
Found 7 system-generated tables to filter
- Handle updated Kankaku record Process Table
- Process for Language change Bot Process Table
- Switch Enum Output
- Switch cram language Output
- Switch size language Output
- _Per User Settings
- trigger update Output
â ī¸ System-generated tables filtered from results:
- Handle updated Kankaku record Process Table
- Process for Language change Bot Process Table
- Switch Enum Output
- Switch cram language Output
- Switch size language Output
- _Per User Settings
- trigger update Output
Total: 1104 columns across 9 tables (7 system-generated tables filtered)
â
Columns saved to: appsheet_columns.csv
============================================================
PHASE 3: Parsing Format Rules
============================================================
đ Loading slice mapping from appsheet_slices.csv
â
Loaded 62 slice mappings
đ¨ Extracting format rules...
â Found 121 format rules
đ Format Rules Summary:
Archive: 5 rules
Kankaku: 21 rules
Options: 3 rules
Overall: 4 rules
Progress: 3 rules
Seminar: 10 rules
Settings: 26 rules
Stats: 49 rules
Total formatting targets:
Columns: 296
Actions: 104
â ī¸ Disabled rules: 2
â
Format rules saved to: appsheet_format_rules.csv
============================================================
PHASE 4: Parsing Actions
============================================================
đ Loading slice mapping from appsheet_slices.csv
â
Loaded 62 slice mappings
⥠Extracting actions...
đ Loading system action data from actions.txt
đ Found 581 actions in text file (96 system-generated)
â ī¸ WARNING: Duplicate action names detected!
Found duplicate action names in your app:
âĸ "View Ref (System) (in table: Options)" appears 2 times
ISSUE: When actions share the same name, we cannot reliably determine
which is system-generated and which is user-created. This prevents
accurate orphan detection for these actions.
RECOMMENDATION: Rename the user-created action(s) to have unique names.
(Note: System-generated action names cannot be changed)
How would you like to proceed?
1) Exit and fix the issue
- Edit your app in AppSheet to rename the user-created action(s)
- Generate fresh HTML and text files
- Run the analysis again
2) Continue with limitations
- Duplicate-named actions will be marked as "Unsure" status
- These actions will be excluded from orphan detection
- All other orphan detection will proceed normally
Choice (1/2): 2
Continuing with limitations...
â ī¸ Warning: The following action names contain multiple consecutive spaces:
âĸ View Ref (Card import) J
âĸ goodreads toggle 1
âĸ goodreads toggle 2
âĸ BrainyQuite toggle 1
âĸ BrainyQuite toggle 2
Consider renaming them in AppSheet to avoid confusion.
đ Actions Summary:
Total actions found: 581
User-created: 484
System-generated: 95
Unsure (duplicates): 2
By category:
Delete: 7
Edit: 6
Execute a group of actions: 53
Execute an action on a set of rows: 55
Go to a website: 143
Make a new record: 2
Navigate: 143
Write: 172
â
Actions saved to: appsheet_actions.csv
============================================================
PHASE 5: Parsing Views
============================================================
đī¸ Extracting views...
đ Loading slice mapping from appsheet_slices.csv
â
Loaded 62 slice mappings
đ Loading actions mapping from appsheet_actions.csv
â
Loaded 565 action mappings
đ Loading columns data from appsheet_columns.csv
â
Loaded column data for 9 tables
đ Loading actions data from appsheet_actions.csv
â
Loaded action data for 9 tables
đ Found 205 view headers in HTML
đ Loading view mappings from views1.txt and views2.txt
đ Found views1.txt (169 views) and views2.txt (256 views)
â
Identified views2.txt as containing system views
â
Found 87 system views and 169 user views
â Found 205 views
đ Views Summary:
Primary: 27 views
Menu: 14 views
Ref: 164 views
System status:
System views: 73
User views: 132
By type:
dashboard: 2
deck: 9
detail: 142
form: 39
table: 13
â
Views saved to: appsheet_views.csv
============================================================
PHASE 6: Parsing Navigation Targets
============================================================
đ Loading actions from appsheet_actions.csv
â
Loaded 581 actions
ââ Navigation actions: 143
ââ Group actions: 53
ââ Other actions skipped: 385
ââ External URLs: 143
ââ Data modifications: 185
ââ Other types: 57
đ¯ Extracting navigation targets...
â Processing 196 actions (143 navigation + 53 group)
â ī¸ Found 1 unparseable navigation expression
đ Navigation Targets Extracted:
Navigation targets: 310
ââ Direct (#control=, #page=): 31
ââ LINKTOVIEW: 174
ââ LINKTOROW: 53
đĄ Note: Actions with IFS/IF conditions generate multiple targets
(one per branch), so targets may be greater than actions
Unparseable expressions: 1
ââ Unknown pattern: 1
Group actions recorded: 53
Context conditions detected: 208
ââ View-based (CONTEXT("View")): 205
ââ ViewType-based: 3
ââ Table-based: 0
â
Navigation targets saved to: action_targets.csv
â ī¸ Unparseable expressions saved to: action_targets_unparseable.csv
============================================================
PHASE 7: Generating Navigation Edges
============================================================
đ Loading required data files...
â Loaded 310 navigation targets
â Loaded 205 views
â Loaded 565 actions
â Loaded columns for 9 tables
â Loaded 62 slices
đ¯ Generating navigation edges...
â
Wrote 657 navigation edges to navigation_edges.csv
đ Edge Generation Statistics:
ââ Views processed: 205
ââ Actions checked: 6009
ââ Group actions expanded: 257
ââ Edges created: 657
ââ Edges blocked by conditions: 7450
ââ Edges blocked by visibility: 1482
============================================================
Parsing complete!
============================================================
đ Summary of data to be analyzed:
â
Data Sources: 71 total
ââ Tables: 9
ââ Slices: 62
â
Columns: 1,104 total
ââ Physical: 248
ââ Virtual: 856
â
Format rules: 121
â
Actions: 581 total
ââ System-generated: 95
ââ User-created: 484
ââ Unknown (not in actions.txt): 2
â
Views: 205 total
ââ System-generated: 73
ââ User-created: 132
â
Navigation targets: 310
============================================================
đ Starting orphan detection...
============================================================
============================================================
PHASE 8: View Orphan Detection
============================================================
đ Starting View Orphan Detection...
đ Directory: 20250907_124504_MyApp_Data_parse
â Validating required files...
đ Extracting views...
â Found 205 total views
System-generated: 73
User-created: 132
đ Loading additional data:
Loaded column data for 9 tables
đ Searching for potential user view orphans...
Loading navigation edges from navigation_edges.csv...
â Loaded 657 navigation edges
â Graph contains 170 source views
â Identified 41 root views (primary + menu)
â Found 136 reachable views from 41 roots
đ Searching for unused system views...
Loading navigation edges from navigation_edges.csv...
â Loaded 657 navigation edges
â Graph contains 170 source views
â Identified 41 root views (primary + menu)
â Found 136 reachable views from 41 roots
đž Writing results...
â Potential user orphan views written to: potential_view_orphans.csv
â Unused system views written to: unused_system_views.csv
đ View Orphan Detection Summary:
Total views analyzed: 205
System-generated views: 73
User-created views: 132
â ī¸ Potential user view orphans found: 9
Reason Breakdown:
- Detail view not reachable from any root view: 3 views
- Ref view not reachable from any root view: 6 views
âšī¸ Unused system views found: 63
Reason Breakdown:
- System detail view not reachable from any root view: 27 views
- System ref view not reachable from any root view: 36 views
Note: System views cannot be deleted but are tracked
for accurate orphan detection in actions and columns.
============================================================
PHASE 9: Virtual Column Orphan Detection
============================================================
â Loaded 63 unused system views to exclude
đ Starting Virtual Column Orphan Detection...
đ Directory: 20250907_124504_MyApp_Data_parse
â Validating required files...
đ Loading unused system views...
â Loaded 63 unused system views to exclude
đ Extracting virtual columns...
â Found 856 virtual columns
đ Searching for potential orphans...
Processing: 100/856 virtual columns...
Processing: 200/856 virtual columns...
Processing: 300/856 virtual columns...
Processing: 400/856 virtual columns...
Processing: 500/856 virtual columns...
Processing: 600/856 virtual columns...
Processing: 700/856 virtual columns...
Processing: 800/856 virtual columns...
đž Writing results...
â Results written to: potential_virtual_column_orphans.csv
đ Orphan Detection Summary:
Total virtual columns analyzed: 856
System-generated REF_ROWS columns: 18
Label columns (UI display): 2
User-created virtual columns: 836
â ī¸ Potential orphans found: 70
â
Results saved to: potential_virtual_column_orphans.csv
============================================================
PHASE 10: Action Orphan Detection
============================================================
â Loaded 63 unused system views to exclude
âšī¸ No bot_actions.txt file found - bot detection disabled
đ Starting Action Orphan Detection...
đ Directory: 20250907_124504_MyApp_Data_parse
â Validating required files...
đ Loading unused system views...
â Loaded 63 unused system views to exclude
đ Extracting actions...
â Found 581 total actions
đ Searching for potential orphans...
â Loaded 205 views for visibility checking
đž Writing results...
â Results written to: potential_action_orphans.csv
đ Action Orphan Detection Summary:
Total actions analyzed: 581
System-generated actions: 95 (excluded)
Actions with status marked 'Unsure': 2 (excluded)
User-created actions: 484
â ī¸ Potential orphans found: 23
Orphan breakdown by type:
Standard orphans (can be deleted): 21
Unreachable in sequence (DO NOT delete directly): 2
Table breakdown of potential orphans:
- Archive: 1
âĸ Move to main data (card import) 3
- Kankaku: 10
âĸ View Ref (D to W Link to card stats) 3
âĸ WD to session stats
âĸ DW card stats V DW Set aside
âĸ WD card stats V WD Set aside
âĸ Go to card stats 3
... and 5 more
- Options: 5
âĸ Go to finished table (Options)
âĸ Go to Browse archive (Options)
âĸ View Ref (Card import)
âĸ View Ref (Card import) J
âĸ Go to empty message J
- Seminar: 1
âĸ Move to main data (card import) 2
- Settings: 6
âĸ Go to Cram setting (settings)
âĸ Activate when cram is on â ī¸ UNREACHABLE
Listed but unreachable in:
"Cram onoff switch"
"Cram onoff switch 2"
âĸ Activate when cram is off â ī¸ UNREACHABLE
Listed but unreachable in:
"Cram onoff switch"
"Cram onoff switch 2"
âĸ Go to options menu
âĸ Seminar all enum switch trigger
... and 1 more
đĄ Note: Actions used exclusively by bots could not be detected.
To exclude bot-used actions, create a bot_actions.txt file
listing one action name per line in the parse directory.
â ī¸ IMPORTANT: Unreachable actions require special handling!
In order to avoid disconcerting error messages, unreachable actions
should be removed from group actions that hold them (shown above)
before deletion is attempted.
============================================================
PHASE 11: Format Rule Orphan Detection
============================================================
đ Starting Format Rule Orphan Detection...
đ Directory: 20250907_124504_MyApp_Data_parse
â Validating required files...
đ Loading data...
â Found 121 format rules
đ Searching for potential orphans...
đž Writing results...
â Results written to: potential_format_rule_orphans.csv
đ Format Rule Orphan Detection Summary:
Total format rules analyzed: 121
Disabled rules (excluded): 2
Active rules checked: 119
â ī¸ Potential orphans found: 5
Table breakdown of potential orphans:
- Kankaku: 3
âĸ Card stats
âĸ Card stats 2
âĸ Cram 2
- Settings: 1
âĸ Header size 2
- Stats: 1
âĸ New Format Rule
â
Results saved to: potential_format_rule_orphans.csv
============================================================
PHASE 12: Slice Orphan Detection
============================================================
đ Starting Slice Orphan Detection...
đ Directory: 20250907_124504_MyApp_Data_parse
â Validating required files...
đ Extracting slices...
â Found 62 slices
đ Searching for potential orphans...
Checking view data sources...
Checking action references...
Checking column formula references...
Checking format rule references...
đž Writing results...
â Results written to: potential_slice_orphans.csv
đ Slice Orphan Detection Summary:
Total slices analyzed: 62
â ī¸ Potential orphans found: 5
Table breakdown of potential orphans:
- Archive: 2
âĸ Archive 1DW
âĸ Archive 2WD
- Kankaku: 1
âĸ Card stats 2
- Overall: 1
âĸ Overall slice
- Stats: 1
âĸ Stats setsumei
â
Results saved to: potential_slice_orphans.csv
============================================================
PHASE 13: Phantom View Reference Detection
============================================================
đ Starting Phantom View Reference Detection...
đ Directory: ./20250907_124504_MyApp_Data_parse
â Validating required files...
â Found 205 known views
â Using pre-parsed action targets from action_targets.csv
â Scanning 581 action only_if conditions
â Scanning 1104 Columns
â Scanning 205 Views
â Scanning 121 Format Rules
đ Total expressions analyzed: 1887
đž Writing results...
â ī¸ Found 9 expressions with phantom references
â
Results saved to: potential_phantom_view_references.csv
đ Unique phantom views found (sorted by frequency):
2x Card import
2x Options menu view J
1x D to W Card Stats
1x Card Import
1x Add menu 2
1x Add menu 2 J
1x Archive menu
1x All Cards
1x Card stats 3
============================================================
Orphan detection complete!
============================================================
đ Summary of potential orphans found:
â ī¸ Virtual columns: 70
â ī¸ Actions: 23
â ī¸ Views: 9
â ī¸ Format rules: 5
â ī¸ Slices: 5
â ī¸ Phantom view references: 9
đ Total potential orphans: 121
đ Results saved to: 20250907_124504_MyApp_Data_parse
⨠Analysis complete! Your AppSheet app structure has been fully analyzed.
======================================================================
PARSING AND ORPHAN DETECTION COMPLETE
======================================================================
Would you like to explore dependencies now? (y/n):