...
This commit is contained in:
@@ -28,7 +28,7 @@ fn get_platform_id() string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn read_secrets() ! {
|
fn read_secrets() ! {
|
||||||
secret_file := os.join_path(os.home_dir(), 'code/git.ourworld.tf/despiegk/hero_secrets/mysecrets.sh')
|
secret_file := os.join_path(os.home_dir(), 'code/git.threefold.info/despiegk/hero_secrets/mysecrets.sh')
|
||||||
if os.exists(secret_file) {
|
if os.exists(secret_file) {
|
||||||
println('Reading secrets from ${secret_file}')
|
println('Reading secrets from ${secret_file}')
|
||||||
content := os.read_file(secret_file)!
|
content := os.read_file(secret_file)!
|
||||||
|
|||||||
@@ -73,9 +73,9 @@ function sshknownkeysadd {
|
|||||||
then
|
then
|
||||||
ssh-keyscan github.com >> ~/.ssh/known_hosts
|
ssh-keyscan github.com >> ~/.ssh/known_hosts
|
||||||
fi
|
fi
|
||||||
if ! grep git.ourworld.tf ~/.ssh/known_hosts > /dev/null
|
if ! grep git.threefold.info ~/.ssh/known_hosts > /dev/null
|
||||||
then
|
then
|
||||||
ssh-keyscan git.ourworld.tf >> ~/.ssh/known_hosts
|
ssh-keyscan git.threefold.info >> ~/.ssh/known_hosts
|
||||||
fi
|
fi
|
||||||
git config --global pull.rebase false
|
git config --global pull.rebase false
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import freeflowuniverse.herolib.core.playbook
|
|||||||
import os
|
import os
|
||||||
|
|
||||||
mut plbook := playbook.new(
|
mut plbook := playbook.new(
|
||||||
path: '${os.home_dir()}/code/git.ourworld.tf/ourworld_holding/investorstool/output'
|
path: '${os.home_dir()}/code/git.threefold.info/ourworld_holding/investorstool/output'
|
||||||
)!
|
)!
|
||||||
mut it := investortool.play(mut plbook)!
|
mut it := investortool.play(mut plbook)!
|
||||||
it.check()!
|
it.check()!
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import os
|
|||||||
|
|
||||||
const name = 'tf9_budget'
|
const name = 'tf9_budget'
|
||||||
|
|
||||||
const wikipath = '${os.home_dir()}/code/git.ourworld.tf/ourworld_holding/info_ourworld/collections/${name}'
|
const wikipath = '${os.home_dir()}/code/git.threefold.info/ourworld_holding/info_ourworld/collections/${name}'
|
||||||
const summarypath = '${wikipath}/summary.md'
|
const summarypath = '${wikipath}/summary.md'
|
||||||
|
|
||||||
// mut sh := spreadsheet.sheet_new(name: 'test2') or { panic(err) }
|
// mut sh := spreadsheet.sheet_new(name: 'test2') or { panic(err) }
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ mut gs := gittools.new()!
|
|||||||
mydocs_path := gs.get_path(
|
mydocs_path := gs.get_path(
|
||||||
pull: true
|
pull: true
|
||||||
reset: false
|
reset: false
|
||||||
url: 'https://git.ourworld.tf/tfgrid/info_docs_depin/src/branch/main/docs'
|
url: 'https://git.threefold.info/tfgrid/info_docs_depin/src/branch/main/docs'
|
||||||
)!
|
)!
|
||||||
|
|
||||||
println(mydocs_path)
|
println(mydocs_path)
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
!!juggler.configure
|
!!juggler.configure
|
||||||
url: 'https://git.ourworld.tf/projectmycelium/itenv'
|
url: 'https://git.threefold.info/projectmycelium/itenv'
|
||||||
username: ''
|
username: ''
|
||||||
password: ''
|
password: ''
|
||||||
port: 8000
|
port: 8000
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
hero juggler -u https://git.ourworld.tf/projectmycelium/itenv
|
hero juggler -u https://git.threefold.info/projectmycelium/itenv
|
||||||
@@ -8,7 +8,7 @@ import veb
|
|||||||
osal.load_env_file('${os.dir(@FILE)}/.env')!
|
osal.load_env_file('${os.dir(@FILE)}/.env')!
|
||||||
|
|
||||||
mut j := juggler.configure(
|
mut j := juggler.configure(
|
||||||
url: 'https://git.ourworld.tf/projectmycelium/itenv'
|
url: 'https://git.threefold.info/projectmycelium/itenv'
|
||||||
username: os.getenv('JUGGLER_USERNAME')
|
username: os.getenv('JUGGLER_USERNAME')
|
||||||
password: os.getenv('JUGGLER_PASSWORD')
|
password: os.getenv('JUGGLER_PASSWORD')
|
||||||
reset: true
|
reset: true
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import os
|
|||||||
mut sm := startupmanager.get()!
|
mut sm := startupmanager.get()!
|
||||||
sm.start(
|
sm.start(
|
||||||
name: 'juggler'
|
name: 'juggler'
|
||||||
cmd: 'hero juggler -secret planetfirst -u https://git.ourworld.tf/projectmycelium/itenv -reset true'
|
cmd: 'hero juggler -secret planetfirst -u https://git.threefold.info/projectmycelium/itenv -reset true'
|
||||||
env: {
|
env: {
|
||||||
'HOME': os.home_dir()
|
'HOME': os.home_dir()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/env -S v -n -w -cg -gc none -cc tcc -d use_openssl -enable-globals run
|
#!/usr/bin/env -S v -n -w -cg -gc none -cc tcc -d use_openssl -enable-globals run
|
||||||
|
|
||||||
import freeflowuniverse.herolib.schemas.jsonrpc
|
import freeflowuniverse.herolib.schemas.jsonrpc
|
||||||
import freeflowuniverse.herolib.schemas.openrpc
|
import freeflowuniverse.herolib.schemas.openrpc //for the model as used
|
||||||
import json
|
import json
|
||||||
import x.json2
|
import x.json2
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ println('=====================')
|
|||||||
println('\n1. Setting up doctree data in Redis...')
|
println('\n1. Setting up doctree data in Redis...')
|
||||||
|
|
||||||
tree.scan(
|
tree.scan(
|
||||||
git_url: 'https://git.ourworld.tf/tfgrid/docs_tfgrid4/src/branch/main/collections'
|
git_url: 'https://git.threefold.info/tfgrid/docs_tfgrid4/src/branch/main/collections'
|
||||||
git_pull: false
|
git_pull: false
|
||||||
)!
|
)!
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ mut tree := doctree.new(name: 'test')!
|
|||||||
// git_pull bool
|
// git_pull bool
|
||||||
|
|
||||||
tree.scan(
|
tree.scan(
|
||||||
git_url: 'https://git.ourworld.tf/tfgrid/docs_tfgrid4/src/branch/main/collections'
|
git_url: 'https://git.threefold.info/tfgrid/docs_tfgrid4/src/branch/main/collections'
|
||||||
git_pull: false
|
git_pull: false
|
||||||
)!
|
)!
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ mut docs := starlight.new(
|
|||||||
|
|
||||||
// Create a new starlight site
|
// Create a new starlight site
|
||||||
mut site := docs.get(
|
mut site := docs.get(
|
||||||
url: 'https://git.ourworld.tf/tfgrid/docs_aibox'
|
url: 'https://git.threefold.info/tfgrid/docs_aibox'
|
||||||
init: true // init means we put config files if not there
|
init: true // init means we put config files if not there
|
||||||
)!
|
)!
|
||||||
|
|
||||||
|
|||||||
@@ -88,9 +88,9 @@ function sshknownkeysadd {
|
|||||||
then
|
then
|
||||||
ssh-keyscan github.com >> ~/.ssh/known_hosts
|
ssh-keyscan github.com >> ~/.ssh/known_hosts
|
||||||
fi
|
fi
|
||||||
if ! grep git.ourworld.tf ~/.ssh/known_hosts > /dev/null
|
if ! grep git.threefold.info ~/.ssh/known_hosts > /dev/null
|
||||||
then
|
then
|
||||||
ssh-keyscan git.ourworld.tf >> ~/.ssh/known_hosts
|
ssh-keyscan git.threefold.info >> ~/.ssh/known_hosts
|
||||||
fi
|
fi
|
||||||
git config --global pull.rebase false
|
git config --global pull.rebase false
|
||||||
|
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ fn main() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Read the rhaiwrapping.md file
|
// Read the rhaiwrapping.md file
|
||||||
rhai_wrapping_md := os.read_file('/Users/timurgordon/code/git.ourworld.tf/herocode/sal/aiprompts/rhaiwrapping.md') or {
|
rhai_wrapping_md := os.read_file('/Users/timurgordon/code/git.threefold.info/herocode/sal/aiprompts/rhaiwrapping.md') or {
|
||||||
println('Failed to read rhaiwrapping.md: ${err}')
|
println('Failed to read rhaiwrapping.md: ${err}')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@@ -140,7 +140,7 @@ fn main() {
|
|||||||
|
|
||||||
println('Task completed successfully')
|
println('Task completed successfully')
|
||||||
println('The wrapper files have been generated and compiled in the target directory.')
|
println('The wrapper files have been generated and compiled in the target directory.')
|
||||||
println('Check /Users/timurgordon/code/git.ourworld.tf/herocode/sal/src/rhai for the compiled output.')
|
println('Check /Users/timurgordon/code/git.threefold.info/herocode/sal/src/rhai for the compiled output.')
|
||||||
}
|
}
|
||||||
|
|
||||||
// Define the prompt functions
|
// Define the prompt functions
|
||||||
@@ -158,17 +158,17 @@ fn create_example(input string) string {
|
|||||||
|
|
||||||
// Define a Rhai wrapper generator function for Container functions
|
// Define a Rhai wrapper generator function for Container functions
|
||||||
fn create_rhai_wrappers(name string, source_code string, example_rhai string, wrapper_md string, errors_md string, crate_path string) string {
|
fn create_rhai_wrappers(name string, source_code string, example_rhai string, wrapper_md string, errors_md string, crate_path string) string {
|
||||||
guides := os.read_file('/Users/timurgordon/code/git.ourworld.tf/herocode/sal/aiprompts/rhaiwrapping_classicai.md') or {
|
guides := os.read_file('/Users/timurgordon/code/git.threefold.info/herocode/sal/aiprompts/rhaiwrapping_classicai.md') or {
|
||||||
panic('Failed to read guides')
|
panic('Failed to read guides')
|
||||||
}
|
}
|
||||||
engine := $tmpl('./prompts/engine.md')
|
engine := $tmpl('./prompts/engine.md')
|
||||||
vector_vs_array := os.read_file('/Users/timurgordon/code/git.ourworld.tf/herocode/sal/aiprompts/rhai_array_vs_vector.md') or {
|
vector_vs_array := os.read_file('/Users/timurgordon/code/git.threefold.info/herocode/sal/aiprompts/rhai_array_vs_vector.md') or {
|
||||||
panic('Failed to read guides')
|
panic('Failed to read guides')
|
||||||
}
|
}
|
||||||
rhai_integration_fixes := os.read_file('/Users/timurgordon/code/git.ourworld.tf/herocode/sal/aiprompts/rhai_integration_fixes.md') or {
|
rhai_integration_fixes := os.read_file('/Users/timurgordon/code/git.threefold.info/herocode/sal/aiprompts/rhai_integration_fixes.md') or {
|
||||||
panic('Failed to read guides')
|
panic('Failed to read guides')
|
||||||
}
|
}
|
||||||
rhai_syntax_guide := os.read_file('/Users/timurgordon/code/git.ourworld.tf/herocode/sal/aiprompts/rhai_syntax_guide.md') or {
|
rhai_syntax_guide := os.read_file('/Users/timurgordon/code/git.threefold.info/herocode/sal/aiprompts/rhai_syntax_guide.md') or {
|
||||||
panic('Failed to read guides')
|
panic('Failed to read guides')
|
||||||
}
|
}
|
||||||
generic_wrapper_rs := $tmpl('./templates/generic_wrapper.rs')
|
generic_wrapper_rs := $tmpl('./templates/generic_wrapper.rs')
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ fn main() {
|
|||||||
|
|
||||||
println('Task completed successfully')
|
println('Task completed successfully')
|
||||||
println('The wrapper files have been generated and compiled in the target directory.')
|
println('The wrapper files have been generated and compiled in the target directory.')
|
||||||
println('Check /Users/timurgordon/code/git.ourworld.tf/herocode/sal/src/rhai for the compiled output.')
|
println('Check /Users/timurgordon/code/git.threefold.info/herocode/sal/src/rhai for the compiled output.')
|
||||||
}
|
}
|
||||||
|
|
||||||
// Validates command line arguments and returns the source code path
|
// Validates command line arguments and returns the source code path
|
||||||
@@ -175,11 +175,11 @@ fn run_wrapper_generation_task(prompt_content string, gen RhaiGen) !string {
|
|||||||
// Define a Rhai wrapper generator function for Container functions
|
// Define a Rhai wrapper generator function for Container functions
|
||||||
fn create_rhai_wrappers(name string, source_code string, example_rhai string, wrapper_md string, errors_md string, crate_path string) string {
|
fn create_rhai_wrappers(name string, source_code string, example_rhai string, wrapper_md string, errors_md string, crate_path string) string {
|
||||||
// Load all required template and guide files
|
// Load all required template and guide files
|
||||||
guides := load_guide_file('/Users/timurgordon/code/git.ourworld.tf/herocode/sal/aiprompts/rhaiwrapping_classicai.md')
|
guides := load_guide_file('/Users/timurgordon/code/git.threefold.info/herocode/sal/aiprompts/rhaiwrapping_classicai.md')
|
||||||
engine := $tmpl('./prompts/engine.md')
|
engine := $tmpl('./prompts/engine.md')
|
||||||
vector_vs_array := load_guide_file('/Users/timurgordon/code/git.ourworld.tf/herocode/sal/aiprompts/rhai_array_vs_vector.md')
|
vector_vs_array := load_guide_file('/Users/timurgordon/code/git.threefold.info/herocode/sal/aiprompts/rhai_array_vs_vector.md')
|
||||||
rhai_integration_fixes := load_guide_file('/Users/timurgordon/code/git.ourworld.tf/herocode/sal/aiprompts/rhai_integration_fixes.md')
|
rhai_integration_fixes := load_guide_file('/Users/timurgordon/code/git.threefold.info/herocode/sal/aiprompts/rhai_integration_fixes.md')
|
||||||
rhai_syntax_guide := load_guide_file('/Users/timurgordon/code/git.ourworld.tf/herocode/sal/aiprompts/rhai_syntax_guide.md')
|
rhai_syntax_guide := load_guide_file('/Users/timurgordon/code/git.threefold.info/herocode/sal/aiprompts/rhai_syntax_guide.md')
|
||||||
generic_wrapper_rs := $tmpl('./templates/generic_wrapper.rs')
|
generic_wrapper_rs := $tmpl('./templates/generic_wrapper.rs')
|
||||||
|
|
||||||
// Build the prompt content
|
// Build the prompt content
|
||||||
|
|||||||
@@ -67,11 +67,11 @@ pub fn rhai_wrapper_generation_prompt(name string, source_code string, source_pk
|
|||||||
errors_md := os.read_file('${current_dir}/prompts/errors.md')!
|
errors_md := os.read_file('${current_dir}/prompts/errors.md')!
|
||||||
|
|
||||||
// Load all required template and guide files
|
// Load all required template and guide files
|
||||||
guides := os.read_file('/Users/timurgordon/code/git.ourworld.tf/herocode/sal/aiprompts/rhaiwrapping_classicai.md')!
|
guides := os.read_file('/Users/timurgordon/code/git.threefold.info/herocode/sal/aiprompts/rhaiwrapping_classicai.md')!
|
||||||
engine := $tmpl('./prompts/engine.md')
|
engine := $tmpl('./prompts/engine.md')
|
||||||
vector_vs_array := os.read_file('/Users/timurgordon/code/git.ourworld.tf/herocode/sal/aiprompts/rhai_array_vs_vector.md')!
|
vector_vs_array := os.read_file('/Users/timurgordon/code/git.threefold.info/herocode/sal/aiprompts/rhai_array_vs_vector.md')!
|
||||||
rhai_integration_fixes := os.read_file('/Users/timurgordon/code/git.ourworld.tf/herocode/sal/aiprompts/rhai_integration_fixes.md')!
|
rhai_integration_fixes := os.read_file('/Users/timurgordon/code/git.threefold.info/herocode/sal/aiprompts/rhai_integration_fixes.md')!
|
||||||
rhai_syntax_guide := os.read_file('/Users/timurgordon/code/git.ourworld.tf/herocode/sal/aiprompts/rhai_syntax_guide.md')!
|
rhai_syntax_guide := os.read_file('/Users/timurgordon/code/git.threefold.info/herocode/sal/aiprompts/rhai_syntax_guide.md')!
|
||||||
generic_wrapper_rs := $tmpl('./templates/generic_wrapper.rs')
|
generic_wrapper_rs := $tmpl('./templates/generic_wrapper.rs')
|
||||||
|
|
||||||
prompt := $tmpl('./prompts/main.md')
|
prompt := $tmpl('./prompts/main.md')
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// File: /root/code/git.ourworld.tf/herocode/sal/src/virt/nerdctl/container_builder.rs
|
// File: /root/code/git.threefold.info/herocode/sal/src/virt/nerdctl/container_builder.rs
|
||||||
|
|
||||||
use std::collections::HashMap;
|
use std::collections::HashMap;
|
||||||
use crate::virt::nerdctl::{execute_nerdctl_command, NerdctlError};
|
use crate::virt::nerdctl::{execute_nerdctl_command, NerdctlError};
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ client.send(subject:'this is a test',to:'kristof@incubaid.com',body:'
|
|||||||
if you have a secrets file you could import as
|
if you have a secrets file you could import as
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
//e.g. source ~/code/git.ourworld.tf/despiegk/hero_secrets/mysecrets.sh
|
//e.g. source ~/code/git.threefold.info/despiegk/hero_secrets/mysecrets.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
following env variables are supported
|
following env variables are supported
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ pub fn cmd_mdbook(mut cmdroot Command) {
|
|||||||
|
|
||||||
example:
|
example:
|
||||||
|
|
||||||
hero mdbook -u https://git.ourworld.tf/tfgrid/info_tfgrid/src/branch/main/heroscript
|
hero mdbook -u https://git.threefold.info/tfgrid/info_tfgrid/src/branch/main/heroscript
|
||||||
|
|
||||||
If you do -gp it will pull newest book content from git and give error if there are local changes.
|
If you do -gp it will pull newest book content from git and give error if there are local changes.
|
||||||
If you do -gr it will pull newest book content from git and overwrite local changes (careful).
|
If you do -gr it will pull newest book content from git and overwrite local changes (careful).
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ heroscript has numerous ways to execute actions using your hero tool.
|
|||||||
|
|
||||||
example:
|
example:
|
||||||
|
|
||||||
hero run -u https://git.ourworld.tf/threefold_coop/info_asimov/src/branch/main/heroscript
|
hero run -u https://git.threefold.info/threefold_coop/info_asimov/src/branch/main/heroscript
|
||||||
|
|
||||||
Can also do -e or -st to see sourcetree
|
Can also do -e or -st to see sourcetree
|
||||||
|
|
||||||
|
|||||||
@@ -47,10 +47,10 @@ fn test_parser() {
|
|||||||
|
|
||||||
fn test_parser2() {
|
fn test_parser2() {
|
||||||
mut pb := new(
|
mut pb := new(
|
||||||
text: "!!play.run url:'https://git.ourworld.tf/despiegk/cfg/src/branch/main/myit/hetzner.md'"
|
text: "!!play.run url:'https://git.threefold.info/despiegk/cfg/src/branch/main/myit/hetzner.md'"
|
||||||
) or { panic(err) }
|
) or { panic(err) }
|
||||||
mut a := pb.actions[0]
|
mut a := pb.actions[0]
|
||||||
assert a.actor == 'play'
|
assert a.actor == 'play'
|
||||||
assert a.name == 'run'
|
assert a.name == 'run'
|
||||||
assert a.params.get('url')! == 'https://git.ourworld.tf/despiegk/cfg/src/branch/main/myit/hetzner.md'
|
assert a.params.get('url')! == 'https://git.threefold.info/despiegk/cfg/src/branch/main/myit/hetzner.md'
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ pub fn play_juggler(mut plbook playbook.PlayBook) ! {
|
|||||||
port := p.get_int_default('port', 8000)!
|
port := p.get_int_default('port', 8000)!
|
||||||
|
|
||||||
j = juggler.configure(
|
j = juggler.configure(
|
||||||
url: 'https://git.ourworld.tf/projectmycelium/itenv'
|
url: 'https://git.threefold.info/projectmycelium/itenv'
|
||||||
username: username
|
username: username
|
||||||
password: password
|
password: password
|
||||||
reset: true
|
reset: true
|
||||||
|
|||||||
@@ -11,14 +11,14 @@ fn test_play_publisher() {
|
|||||||
s2 := "
|
s2 := "
|
||||||
|
|
||||||
!!publisher.new_collection
|
!!publisher.new_collection
|
||||||
url:'https://git.ourworld.tf/tfgrid/info_tfgrid/src/branch/main/collections'
|
url:'https://git.threefold.info/tfgrid/info_tfgrid/src/branch/main/collections'
|
||||||
reset: false
|
reset: false
|
||||||
pull: true
|
pull: true
|
||||||
|
|
||||||
|
|
||||||
!!book.define
|
!!book.define
|
||||||
name:'info_tfgrid'
|
name:'info_tfgrid'
|
||||||
summary_url:'https://git.ourworld.tf/tfgrid/info_tfgrid/src/branch/development/books/tech/SUMMARY.md'
|
summary_url:'https://git.threefold.info/tfgrid/info_tfgrid/src/branch/development/books/tech/SUMMARY.md'
|
||||||
title:'ThreeFold Technology'
|
title:'ThreeFold Technology'
|
||||||
collections: 'about,dashboard,farmers,library,partners_utilization,tech,p2p'
|
collections: 'about,dashboard,farmers,library,partners_utilization,tech,p2p'
|
||||||
|
|
||||||
|
|||||||
@@ -1,14 +1,14 @@
|
|||||||
security add-internet-password -s git.ourworld.tf -a despiegk -w mypassword
|
security add-internet-password -s git.threefold.info -a despiegk -w mypassword
|
||||||
|
|
||||||
-s: The server (e.g., git.ourworld.tf).
|
-s: The server (e.g., git.threefold.info).
|
||||||
-a: The account or username (e.g., despiegk).
|
-a: The account or username (e.g., despiegk).
|
||||||
-w: The password (e.g., mypassword).
|
-w: The password (e.g., mypassword).
|
||||||
|
|
||||||
|
|
||||||
security find-internet-password -s git.ourworld.tf -w
|
security find-internet-password -s git.threefold.info -w
|
||||||
|
|
||||||
|
|
||||||
security delete-internet-password -s git.ourworld.tf
|
security delete-internet-password -s git.threefold.info
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ tree.scan(path: './docs')!
|
|||||||
//git_url string
|
//git_url string
|
||||||
//git_reset bool
|
//git_reset bool
|
||||||
//git_pull bool
|
//git_pull bool
|
||||||
tree.scan(git_url: 'https://git.ourworld.tf/tfgrid/docs_tfgrid4/src/branch/main/collections')!
|
tree.scan(git_url: 'https://git.threefold.info/tfgrid/docs_tfgrid4/src/branch/main/collections')!
|
||||||
|
|
||||||
// 3. Export the processed content to a destination directory
|
// 3. Export the processed content to a destination directory
|
||||||
// Replace './output' with your desired output path
|
// Replace './output' with your desired output path
|
||||||
|
|||||||
@@ -310,17 +310,17 @@ fn test_matchhashmap() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn test_url() {
|
fn test_url() {
|
||||||
text := "url:'https://git.ourworld.tf/despiegk/cfg/src/branch/main/myit/hetzner.md'"
|
text := "url:'https://git.threefold.info/despiegk/cfg/src/branch/main/myit/hetzner.md'"
|
||||||
params := new(text)!
|
params := new(text)!
|
||||||
|
|
||||||
myurl := params.get('url')!
|
myurl := params.get('url')!
|
||||||
assert myurl == 'https://git.ourworld.tf/despiegk/cfg/src/branch/main/myit/hetzner.md'
|
assert myurl == 'https://git.threefold.info/despiegk/cfg/src/branch/main/myit/hetzner.md'
|
||||||
}
|
}
|
||||||
|
|
||||||
fn test_url2() {
|
fn test_url2() {
|
||||||
text := "url: 'https://git.ourworld.tf/despiegk/cfg/src/branch/main/myit/hetzner.md'"
|
text := "url: 'https://git.threefold.info/despiegk/cfg/src/branch/main/myit/hetzner.md'"
|
||||||
params := new(text)!
|
params := new(text)!
|
||||||
|
|
||||||
myurl := params.get('url')!
|
myurl := params.get('url')!
|
||||||
assert myurl == 'https://git.ourworld.tf/despiegk/cfg/src/branch/main/myit/hetzner.md'
|
assert myurl == 'https://git.threefold.info/despiegk/cfg/src/branch/main/myit/hetzner.md'
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ mut gs := gittools.new()!
|
|||||||
mydocs_path:=gs.get_path(
|
mydocs_path:=gs.get_path(
|
||||||
pull:true,
|
pull:true,
|
||||||
reset:false,
|
reset:false,
|
||||||
url:'https://git.ourworld.tf/tfgrid/info_docs_depin/src/branch/main/docs'
|
url:'https://git.threefold.info/tfgrid/info_docs_depin/src/branch/main/docs'
|
||||||
)!
|
)!
|
||||||
|
|
||||||
println(mydocs_path)
|
println(mydocs_path)
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ pub fn (repo GitRepo) patho() !pathlib.Path {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// gets the path of a given url within a repo
|
// gets the path of a given url within a repo
|
||||||
// ex: 'https://git.ourworld.tf/ourworld_holding/info_ourworld/src/branch/main/books/cocreation/SUMMARY.md'
|
// ex: 'https://git.threefold.info/ourworld_holding/info_ourworld/src/branch/main/books/cocreation/SUMMARY.md'
|
||||||
// returns <repo_path>/books/cocreation/SUMMARY.md
|
// returns <repo_path>/books/cocreation/SUMMARY.md
|
||||||
pub fn (mut repo GitRepo) get_path_of_url(url string) !string {
|
pub fn (mut repo GitRepo) get_path_of_url(url string) !string {
|
||||||
// Split the URL into components
|
// Split the URL into components
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ pub fn cmd_publisher(pre_func fn (Command) !) Command {
|
|||||||
|
|
||||||
example:
|
example:
|
||||||
|
|
||||||
hero publisher -u https://git.ourworld.tf/ourworld_holding/info_ourworld/src/branch/develop/heroscript
|
hero publisher -u https://git.threefold.info/ourworld_holding/info_ourworld/src/branch/develop/heroscript
|
||||||
|
|
||||||
If you do -gp it will pull newest book content from git and give error if there are local changes.
|
If you do -gp it will pull newest book content from git and give error if there are local changes.
|
||||||
If you do -gr it will pull newest book content from git and overwrite local changes (careful).
|
If you do -gr it will pull newest book content from git and overwrite local changes (careful).
|
||||||
|
|||||||
@@ -82,9 +82,9 @@ pub fn sshkeysinstall(args InstallArgs) ! {
|
|||||||
then
|
then
|
||||||
ssh-keyscan -t rsa github.com >> ~/.ssh/known_hosts
|
ssh-keyscan -t rsa github.com >> ~/.ssh/known_hosts
|
||||||
fi
|
fi
|
||||||
if ! grep git.ourworld.tf ~/.ssh/known_hosts > /dev/null
|
if ! grep git.threefold.info ~/.ssh/known_hosts > /dev/null
|
||||||
then
|
then
|
||||||
ssh-keyscan -t rsa git.ourworld.tf >> ~/.ssh/known_hosts
|
ssh-keyscan -t rsa git.threefold.info >> ~/.ssh/known_hosts
|
||||||
fi
|
fi
|
||||||
git config --global pull.rebase false
|
git config --global pull.rebase false
|
||||||
'
|
'
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ export DOCKER_HOST=unix:///Users/despiegk1/.local/share/containers/herocontainer
|
|||||||
#had to install docker to get some docker tools, but was not running it
|
#had to install docker to get some docker tools, but was not running it
|
||||||
brew install --cask docker
|
brew install --cask docker
|
||||||
cd /tmp
|
cd /tmp
|
||||||
git clone git@git.ourworld.tf:despiegk/test.git
|
git clone git@git.threefold.info:despiegk/test.git
|
||||||
cd test
|
cd test
|
||||||
actrunner exec
|
actrunner exec
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ fn main() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Read the rhaiwrapping.md file
|
// Read the rhaiwrapping.md file
|
||||||
rhai_wrapping_md := os.read_file('/Users/timurgordon/code/git.ourworld.tf/herocode/sal/aiprompts/rhaiwrapping.md') or {
|
rhai_wrapping_md := os.read_file('/Users/timurgordon/code/git.threefold.info/herocode/sal/aiprompts/rhaiwrapping.md') or {
|
||||||
println('Failed to read rhaiwrapping.md: ${err}')
|
println('Failed to read rhaiwrapping.md: ${err}')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@@ -140,7 +140,7 @@ fn main() {
|
|||||||
|
|
||||||
println('Task completed successfully')
|
println('Task completed successfully')
|
||||||
println('The wrapper files have been generated and compiled in the target directory.')
|
println('The wrapper files have been generated and compiled in the target directory.')
|
||||||
println('Check /Users/timurgordon/code/git.ourworld.tf/herocode/sal/src/rhai for the compiled output.')
|
println('Check /Users/timurgordon/code/git.threefold.info/herocode/sal/src/rhai for the compiled output.')
|
||||||
}
|
}
|
||||||
|
|
||||||
// Define the prompt functions
|
// Define the prompt functions
|
||||||
@@ -158,17 +158,17 @@ fn create_example(input string) string {
|
|||||||
|
|
||||||
// Define a Rhai wrapper generator function for Container functions
|
// Define a Rhai wrapper generator function for Container functions
|
||||||
fn create_rhai_wrappers(name string, source_code string, example_rhai string, wrapper_md string, errors_md string, crate_path string) string {
|
fn create_rhai_wrappers(name string, source_code string, example_rhai string, wrapper_md string, errors_md string, crate_path string) string {
|
||||||
guides := os.read_file('/Users/timurgordon/code/git.ourworld.tf/herocode/sal/aiprompts/rhaiwrapping_classicai.md') or {
|
guides := os.read_file('/Users/timurgordon/code/git.threefold.info/herocode/sal/aiprompts/rhaiwrapping_classicai.md') or {
|
||||||
panic('Failed to read guides')
|
panic('Failed to read guides')
|
||||||
}
|
}
|
||||||
engine := $tmpl('./prompts/engine.md')
|
engine := $tmpl('./prompts/engine.md')
|
||||||
vector_vs_array := os.read_file('/Users/timurgordon/code/git.ourworld.tf/herocode/sal/aiprompts/rhai_array_vs_vector.md') or {
|
vector_vs_array := os.read_file('/Users/timurgordon/code/git.threefold.info/herocode/sal/aiprompts/rhai_array_vs_vector.md') or {
|
||||||
panic('Failed to read guides')
|
panic('Failed to read guides')
|
||||||
}
|
}
|
||||||
rhai_integration_fixes := os.read_file('/Users/timurgordon/code/git.ourworld.tf/herocode/sal/aiprompts/rhai_integration_fixes.md') or {
|
rhai_integration_fixes := os.read_file('/Users/timurgordon/code/git.threefold.info/herocode/sal/aiprompts/rhai_integration_fixes.md') or {
|
||||||
panic('Failed to read guides')
|
panic('Failed to read guides')
|
||||||
}
|
}
|
||||||
rhai_syntax_guide := os.read_file('/Users/timurgordon/code/git.ourworld.tf/herocode/sal/aiprompts/rhai_syntax_guide.md') or {
|
rhai_syntax_guide := os.read_file('/Users/timurgordon/code/git.threefold.info/herocode/sal/aiprompts/rhai_syntax_guide.md') or {
|
||||||
panic('Failed to read guides')
|
panic('Failed to read guides')
|
||||||
}
|
}
|
||||||
generic_wrapper_rs := $tmpl('./templates/generic_wrapper.rs')
|
generic_wrapper_rs := $tmpl('./templates/generic_wrapper.rs')
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ fn main() {
|
|||||||
|
|
||||||
println('Task completed successfully')
|
println('Task completed successfully')
|
||||||
println('The wrapper files have been generated and compiled in the target directory.')
|
println('The wrapper files have been generated and compiled in the target directory.')
|
||||||
println('Check /Users/timurgordon/code/git.ourworld.tf/herocode/sal/src/rhai for the compiled output.')
|
println('Check /Users/timurgordon/code/git.threefold.info/herocode/sal/src/rhai for the compiled output.')
|
||||||
}
|
}
|
||||||
|
|
||||||
// Validates command line arguments and returns the source code path
|
// Validates command line arguments and returns the source code path
|
||||||
@@ -175,11 +175,11 @@ fn run_wrapper_generation_task(prompt_content string, gen RhaiGen) !string {
|
|||||||
// Define a Rhai wrapper generator function for Container functions
|
// Define a Rhai wrapper generator function for Container functions
|
||||||
fn create_rhai_wrappers(name string, source_code string, example_rhai string, wrapper_md string, errors_md string, crate_path string) string {
|
fn create_rhai_wrappers(name string, source_code string, example_rhai string, wrapper_md string, errors_md string, crate_path string) string {
|
||||||
// Load all required template and guide files
|
// Load all required template and guide files
|
||||||
guides := load_guide_file('/Users/timurgordon/code/git.ourworld.tf/herocode/sal/aiprompts/rhaiwrapping_classicai.md')
|
guides := load_guide_file('/Users/timurgordon/code/git.threefold.info/herocode/sal/aiprompts/rhaiwrapping_classicai.md')
|
||||||
engine := $tmpl('./prompts/engine.md')
|
engine := $tmpl('./prompts/engine.md')
|
||||||
vector_vs_array := load_guide_file('/Users/timurgordon/code/git.ourworld.tf/herocode/sal/aiprompts/rhai_array_vs_vector.md')
|
vector_vs_array := load_guide_file('/Users/timurgordon/code/git.threefold.info/herocode/sal/aiprompts/rhai_array_vs_vector.md')
|
||||||
rhai_integration_fixes := load_guide_file('/Users/timurgordon/code/git.ourworld.tf/herocode/sal/aiprompts/rhai_integration_fixes.md')
|
rhai_integration_fixes := load_guide_file('/Users/timurgordon/code/git.threefold.info/herocode/sal/aiprompts/rhai_integration_fixes.md')
|
||||||
rhai_syntax_guide := load_guide_file('/Users/timurgordon/code/git.ourworld.tf/herocode/sal/aiprompts/rhai_syntax_guide.md')
|
rhai_syntax_guide := load_guide_file('/Users/timurgordon/code/git.threefold.info/herocode/sal/aiprompts/rhai_syntax_guide.md')
|
||||||
generic_wrapper_rs := $tmpl('./templates/generic_wrapper.rs')
|
generic_wrapper_rs := $tmpl('./templates/generic_wrapper.rs')
|
||||||
|
|
||||||
// Build the prompt content
|
// Build the prompt content
|
||||||
|
|||||||
@@ -63,11 +63,11 @@ pub fn rhai_wrapper_generation_prompt(name string, source_code string) !string {
|
|||||||
errors_md := os.read_file('${current_dir}/prompts/errors.md') or { panic(err) }
|
errors_md := os.read_file('${current_dir}/prompts/errors.md') or { panic(err) }
|
||||||
|
|
||||||
// Load all required template and guide files
|
// Load all required template and guide files
|
||||||
guides := os.read_file('/Users/timurgordon/code/git.ourworld.tf/herocode/sal/aiprompts/rhaiwrapping_classicai.md')!
|
guides := os.read_file('/Users/timurgordon/code/git.threefold.info/herocode/sal/aiprompts/rhaiwrapping_classicai.md')!
|
||||||
engine := $tmpl('./prompts/engine.md')
|
engine := $tmpl('./prompts/engine.md')
|
||||||
vector_vs_array := os.read_file('/Users/timurgordon/code/git.ourworld.tf/herocode/sal/aiprompts/rhai_array_vs_vector.md')!
|
vector_vs_array := os.read_file('/Users/timurgordon/code/git.threefold.info/herocode/sal/aiprompts/rhai_array_vs_vector.md')!
|
||||||
rhai_integration_fixes := os.read_file('/Users/timurgordon/code/git.ourworld.tf/herocode/sal/aiprompts/rhai_integration_fixes.md')!
|
rhai_integration_fixes := os.read_file('/Users/timurgordon/code/git.threefold.info/herocode/sal/aiprompts/rhai_integration_fixes.md')!
|
||||||
rhai_syntax_guide := os.read_file('/Users/timurgordon/code/git.ourworld.tf/herocode/sal/aiprompts/rhai_syntax_guide.md')!
|
rhai_syntax_guide := os.read_file('/Users/timurgordon/code/git.threefold.info/herocode/sal/aiprompts/rhai_syntax_guide.md')!
|
||||||
generic_wrapper_rs := $tmpl('./templates/generic_wrapper.rs')
|
generic_wrapper_rs := $tmpl('./templates/generic_wrapper.rs')
|
||||||
|
|
||||||
prompt := $tmpl('./prompts/main.md')
|
prompt := $tmpl('./prompts/main.md')
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// File: /root/code/git.ourworld.tf/herocode/sal/src/virt/nerdctl/container_builder.rs
|
// File: /root/code/git.threefold.info/herocode/sal/src/virt/nerdctl/container_builder.rs
|
||||||
|
|
||||||
use std::collections::HashMap;
|
use std::collections::HashMap;
|
||||||
use crate::virt::nerdctl::{execute_nerdctl_command, NerdctlError};
|
use crate::virt::nerdctl::{execute_nerdctl_command, NerdctlError};
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ fn test_doctree_client() ! {
|
|||||||
mut tree := doctree.new(name: 'test')!
|
mut tree := doctree.new(name: 'test')!
|
||||||
|
|
||||||
tree.scan(
|
tree.scan(
|
||||||
git_url: 'https://git.ourworld.tf/tfgrid/docs_tfgrid4/src/branch/main/collections'
|
git_url: 'https://git.threefold.info/tfgrid/docs_tfgrid4/src/branch/main/collections'
|
||||||
git_pull: false
|
git_pull: false
|
||||||
)!
|
)!
|
||||||
|
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
!!docusaurus.ssh_connection name:'main' host:'info.ourworld.tf' port:'21' login:'root' passwd:'' key_path:'' key:''
|
!!docusaurus.ssh_connection name:'main' host:'info.ourworld.tf' port:'21' login:'root' passwd:'' key_path:'' key:''
|
||||||
|
|
||||||
!!docusaurus.import_source
|
!!docusaurus.import_source
|
||||||
url:'https://git.ourworld.tf/ourworld_holding/info_docs_owh/src/branch/main/docs'
|
url:'https://git.threefold.info/ourworld_holding/info_docs_owh/src/branch/main/docs'
|
||||||
path:''
|
path:''
|
||||||
dest:'' //if empty is root of docs
|
dest:'' //if empty is root of docs
|
||||||
replace:'NAME:MyName, URGENCY:red'
|
replace:'NAME:MyName, URGENCY:red'
|
||||||
|
|||||||
Reference in New Issue
Block a user