This commit is contained in:
2025-12-01 16:45:47 +01:00
parent 5f9a95f2ca
commit 55966be158
72 changed files with 710 additions and 1233 deletions

View File

@@ -1,12 +1,12 @@
#!/usr/bin/env hero
!!atlas.scan
!!doctree.scan
git_url: 'https://git.ourworld.tf/tfgrid/docs_tfgrid4/src/branch/main/collections/mycelium_economics'
!!atlas.scan
!!doctree.scan
git_url: 'https://git.ourworld.tf/tfgrid/docs_tfgrid4/src/branch/main/collections/authentic_web'
// !!atlas.scan
// !!doctree.scan
// git_url: 'https://git.ourworld.tf/geomind/docs_geomind/src/branch/main/collections/usecases'
!!atlas.export destination: '/tmp/atlas_export'
!!doctree.export destination: '/tmp/doctree_export'

View File

@@ -1,15 +1,15 @@
#!/usr/bin/env hero
!!atlas.scan
git_url: 'https://git.ourworld.tf/geomind/atlas_geomind/src/branch/main/content'
meta_path: '/tmp/atlas_export_meta'
!!doctree.scan
git_url: 'https://git.ourworld.tf/geomind/doctree_geomind/src/branch/main/content'
meta_path: '/tmp/doctree_export_meta'
!!atlas.scan
git_url: 'https://git.ourworld.tf/tfgrid/atlas_threefold/src/branch/main/content'
meta_path: '/tmp/atlas_export_meta'
!!doctree.scan
git_url: 'https://git.ourworld.tf/tfgrid/doctree_threefold/src/branch/main/content'
meta_path: '/tmp/doctree_export_meta'
ignore3: 'static,templates,groups'
!!atlas.export
destination: '/tmp/atlas_export_test'
!!doctree.export
destination: '/tmp/doctree_export_test'
include: true
redis: true

View File

@@ -1,5 +1,5 @@
#!/usr/bin/env hero
!!atlas.scan git_url:"https://git.ourworld.tf/tfgrid/docs_tfgrid4/src/branch/main/collections/tests"
!!doctree.scan git_url:"https://git.ourworld.tf/tfgrid/docs_tfgrid4/src/branch/main/collections/tests"
!!atlas.export destination: '/tmp/atlas_export'
!!doctree.export destination: '/tmp/doctree_export'

View File

@@ -1,14 +1,14 @@
#!/usr/bin/env -S vrun
import incubaid.herolib.data.atlas
import incubaid.herolib.data.doctree
import incubaid.herolib.ui.console
import os
fn main() {
println('=== ATLAS DEBUG SCRIPT ===\n')
// Create and scan atlas
mut a := atlas.new(name: 'main')!
// Create and scan doctree
mut a := doctree.new(name: 'main')!
// Scan the collections
println('Scanning collections...\n')
@@ -29,7 +29,7 @@ fn main() {
path: '/Users/despiegk/code/git.ourworld.tf/tfgrid/docs_tfgrid4/collections/mycelium_cloud_tech'
)!
// Initialize atlas (post-scanning validation)
// Initialize doctree (post-scanning validation)
a.init_post()!
// Print all pages per collection
@@ -190,7 +190,7 @@ fn main() {
println('\n\n=== EXPORT AND FILE VERIFICATION TEST ===\n')
// Create export directory
export_path := '/tmp/atlas_debug_export'
export_path := '/tmp/doctree_debug_export'
if os.exists(export_path) {
os.rmdir_all(export_path)!
}

View File

@@ -1,18 +1,18 @@
#!/usr/bin/env -S v -n -w -cg -gc none -cc tcc -d use_openssl -enable-globals run
import incubaid.herolib.data.atlas
import incubaid.herolib.data.doctree
import incubaid.herolib.core.pathlib
import incubaid.herolib.web.atlas_client
import incubaid.herolib.web.doctree_client
import os
// Example: Atlas Export and AtlasClient Usage
// Example: DocTree Export and AtlasClient Usage
println('Atlas Export & Client Example')
println('DocTree Export & Client Example')
println('============================================================')
// Setup test directory
test_dir := '/tmp/atlas_example'
export_dir := '/tmp/atlas_export'
test_dir := '/tmp/doctree_example'
export_dir := '/tmp/doctree_export'
os.rmdir_all(test_dir) or {}
os.rmdir_all(export_dir) or {}
os.mkdir_all(test_dir)!
@@ -30,9 +30,9 @@ page1.write('# Introduction\n\nWelcome to the docs!')!
mut page2 := pathlib.get_file(path: '${col_path}/guide.md', create: true)!
page2.write('# Guide\n\n!!include docs:intro\n\nMore content here.')!
// Create and scan atlas
println('\n1. Creating Atlas and scanning...')
mut a := atlas.new(name: 'my_docs')!
// Create and scan doctree
println('\n1. Creating DocTree and scanning...')
mut a := doctree.new(name: 'my_docs')!
a.scan(path: test_dir)!
println(' Found ${a.collections.len} collection(s)')
@@ -60,7 +60,7 @@ println(' ✓ Export complete')
// Use AtlasClient to access exported content
println('\n4. Using AtlasClient to read exported content...')
mut client := atlas_client.new(export_dir: export_dir)!
mut client := doctree_client.new(export_dir: export_dir)!
// List collections
collections := client.list_collections()!