SuperAPI AI Directory

generate-mocs

Office & productivity

View repository

Updated 10-15 22:14

About this skill

Update directory page

This skill is used to manually refresh the directory page / navigation page (MOC) in Obsidian.

Step 0: Read shared configuration

First read ../_shared/user-config.json, if ../_shared/user-config.local.json exists, then use it to override the default values.

Explicitly generate and consistently use these variables in subsequent steps:

  • VAULT_PATH
  • NOTES_PATH
  • CONCEPTS_PATH
  • AUTO_REFRESH_INDEXES
  • GIT_COMMIT_ENABLED
  • GIT_PUSH_ENABLED

Where:

  • NOTES_PATH = {VAULT_PATH}/{paper_notes_folder}
  • CONCEPTS_PATH = {NOTES_PATH}/{concepts_folder}
  • GIT_PUSH_ENABLED only when GIT_COMMIT_ENABLED=true can it be true

Subsequent steps consistently use the above variables.

Execution steps

  1. Run the concept directory page script:
python3 ../_shared/generate_concept_mocs.py
  1. Run the paper directory page script:
python3 ../_shared/generate_paper_mocs.py
  1. Report:
    • How many directories were scanned
    • How many directory pages were created / updated
    • Where the directory page files were written

git automation

Under the default configuration:

  • AUTO_REFRESH_INDEXES=true
  • GIT_COMMIT_ENABLED=false
  • GIT_PUSH_ENABLED=false

Only when GIT_COMMIT_ENABLED=true should git operations be performed, and the following must be checked first:

  1. VAULT_PATH/.git whether it exists
  2. git add whether there are actually staged changes afterward

Only commit when both of the above conditions are met.

Only push when GIT_PUSH_ENABLED=true and the repository has a remote configured.

Result requirements

  • The directory page generation logic must come from the repository's built-in script, not relying on VAULT_PATH/scripts/*
  • Repeated runs should remain idempotent
  • When the user manually runs this skill, it is not affected by the AUTO_REFRESH_INDEXES switch