Batch fix CN translations: 12 LOW-issue files #8
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Update llms-full.txt | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| - 'posts/**/*.md' | |
| - 'posts-cn/**/*.md' | |
| - 'organizational-futures/**/*.md' | |
| - 'organizational-futures-cn/**/*.md' | |
| - 'epistemic-voids/**/*.md' | |
| - 'epistemic-voids-cn/**/*.md' | |
| - 'individual-posts/**/*.md' | |
| - 'individual-posts-cn/**/*.md' | |
| - 'scripts/generate-llms-full.sh' | |
| workflow_dispatch: # Allow manual trigger | |
| jobs: | |
| update-llms-full: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Generate llms-full.txt | |
| run: | | |
| OUTPUT_FILE="llms-full.txt" | |
| cat > "$OUTPUT_FILE" << 'HEADER' | |
| # LOOM: Locus of Observed Meanings - Complete Content | |
| > This file contains the complete content of the LOOM repository, concatenated for LLM consumption. | |
| > For the structured index, see: llms.txt | |
| > Repository: https://github.com/linxule/loom | |
| > Primary publication: https://www.threadcounts.org/ | |
| > License: CC BY 4.0 | |
| --- | |
| HEADER | |
| echo "## English Articles (LOOM Series)" >> "$OUTPUT_FILE" | |
| echo "" >> "$OUTPUT_FILE" | |
| for file in posts/loom_post_*.md; do | |
| if [ -f "$file" ]; then | |
| echo "---" >> "$OUTPUT_FILE" | |
| echo "Source: https://raw.githubusercontent.com/linxule/loom/main/$file" >> "$OUTPUT_FILE" | |
| echo "" >> "$OUTPUT_FILE" | |
| cat "$file" >> "$OUTPUT_FILE" | |
| echo -e "\n" >> "$OUTPUT_FILE" | |
| fi | |
| done | |
| echo "## Chinese Articles (观阙LOOM Series)" >> "$OUTPUT_FILE" | |
| echo "" >> "$OUTPUT_FILE" | |
| for file in posts-cn/*.md; do | |
| if [ -f "$file" ]; then | |
| echo "---" >> "$OUTPUT_FILE" | |
| echo "Source: https://raw.githubusercontent.com/linxule/loom/main/$file" >> "$OUTPUT_FILE" | |
| echo "" >> "$OUTPUT_FILE" | |
| cat "$file" >> "$OUTPUT_FILE" | |
| echo -e "\n" >> "$OUTPUT_FILE" | |
| fi | |
| done | |
| echo "## Organizational Futures Series" >> "$OUTPUT_FILE" | |
| echo "" >> "$OUTPUT_FILE" | |
| for file in organizational-futures/*.md; do | |
| if [ -f "$file" ]; then | |
| echo "---" >> "$OUTPUT_FILE" | |
| echo "Source: https://raw.githubusercontent.com/linxule/loom/main/$file" >> "$OUTPUT_FILE" | |
| echo "" >> "$OUTPUT_FILE" | |
| cat "$file" >> "$OUTPUT_FILE" | |
| echo -e "\n" >> "$OUTPUT_FILE" | |
| fi | |
| done | |
| echo "## Organizational Futures Series (中文)" >> "$OUTPUT_FILE" | |
| echo "" >> "$OUTPUT_FILE" | |
| for file in organizational-futures-cn/*.md; do | |
| if [ -f "$file" ]; then | |
| echo "---" >> "$OUTPUT_FILE" | |
| echo "Source: https://raw.githubusercontent.com/linxule/loom/main/$file" >> "$OUTPUT_FILE" | |
| echo "" >> "$OUTPUT_FILE" | |
| cat "$file" >> "$OUTPUT_FILE" | |
| echo -e "\n" >> "$OUTPUT_FILE" | |
| fi | |
| done | |
| echo "## Epistemic Voids Series" >> "$OUTPUT_FILE" | |
| echo "" >> "$OUTPUT_FILE" | |
| for file in epistemic-voids/*.md; do | |
| if [ -f "$file" ]; then | |
| echo "---" >> "$OUTPUT_FILE" | |
| echo "Source: https://raw.githubusercontent.com/linxule/loom/main/$file" >> "$OUTPUT_FILE" | |
| echo "" >> "$OUTPUT_FILE" | |
| cat "$file" >> "$OUTPUT_FILE" | |
| echo -e "\n" >> "$OUTPUT_FILE" | |
| fi | |
| done | |
| echo "## Epistemic Voids Series (认知空隙 中文)" >> "$OUTPUT_FILE" | |
| echo "" >> "$OUTPUT_FILE" | |
| for file in epistemic-voids-cn/*.md; do | |
| if [ -f "$file" ]; then | |
| echo "---" >> "$OUTPUT_FILE" | |
| echo "Source: https://raw.githubusercontent.com/linxule/loom/main/$file" >> "$OUTPUT_FILE" | |
| echo "" >> "$OUTPUT_FILE" | |
| cat "$file" >> "$OUTPUT_FILE" | |
| echo -e "\n" >> "$OUTPUT_FILE" | |
| fi | |
| done | |
| echo "## Individual Posts" >> "$OUTPUT_FILE" | |
| echo "" >> "$OUTPUT_FILE" | |
| for file in individual-posts/*.md; do | |
| if [ -f "$file" ]; then | |
| echo "---" >> "$OUTPUT_FILE" | |
| echo "Source: https://raw.githubusercontent.com/linxule/loom/main/$file" >> "$OUTPUT_FILE" | |
| echo "" >> "$OUTPUT_FILE" | |
| cat "$file" >> "$OUTPUT_FILE" | |
| echo -e "\n" >> "$OUTPUT_FILE" | |
| fi | |
| done | |
| echo "## Individual Posts (中文)" >> "$OUTPUT_FILE" | |
| echo "" >> "$OUTPUT_FILE" | |
| for file in individual-posts-cn/*.md; do | |
| if [ -f "$file" ]; then | |
| echo "---" >> "$OUTPUT_FILE" | |
| echo "Source: https://raw.githubusercontent.com/linxule/loom/main/$file" >> "$OUTPUT_FILE" | |
| echo "" >> "$OUTPUT_FILE" | |
| cat "$file" >> "$OUTPUT_FILE" | |
| echo -e "\n" >> "$OUTPUT_FILE" | |
| fi | |
| done | |
| echo "Generated llms-full.txt with $(wc -l < "$OUTPUT_FILE") lines" | |
| - name: Check for changes | |
| id: git-check | |
| run: | | |
| git diff --exit-code llms-full.txt || echo "changed=true" >> $GITHUB_OUTPUT | |
| - name: Commit and push if changed | |
| if: steps.git-check.outputs.changed == 'true' | |
| run: | | |
| git config --local user.email "github-actions[bot]@users.noreply.github.com" | |
| git config --local user.name "github-actions[bot]" | |
| git add llms-full.txt | |
| git commit -m "Auto-update llms-full.txt [skip ci]" | |
| git push |