Skip to content

core.playcmds #

how to use the playcmds

simplified

import incubaid.herolib.core.playcmds

playcmds.run(
 heroscript:''
 heroscript_path:''
    reset: false
 //plbook          ?PlayBook
)!

with more control

#!/usr/bin/env -S v -n -w -gc none  -cg -cc tcc -d use_openssl -enable-globals run

import incubaid.herolib.develop.gittools
import incubaid.herolib.web.site
import incubaid.herolib.core.playcmds

url := "https://git.ourworld.tf/tfgrid/docs_tfgrid4/src/branch/main/ebooks/tech"

mysitepath := gittools.path(
   // git_pull: true
    // git_reset: true
    git_url: url
    git_root: '/tmp/code'
)!

playcmds.run(heroscript_path:mysitepath.path)!

mut mysite:=site.get(name:"tfgrid_tech")!
println(mysite)


fn play #

fn play(args_ PlayArgs) !

fn play_osal_core #

fn play_osal_core(mut plbook PlayBook) !

fn play_ssh #

fn play_ssh(mut plbook PlayBook) !

fn run #

fn run(args_ PlayArgs) !

fn run_all #

fn run_all(args_ PlayArgs) !

struct PlayArgs #

@[params]
struct PlayArgs {
pub mut:
	heroscript      string
	heroscript_path string
	plbook          ?PlayBook
	reset           bool
	emptycheck      bool = true
}

run – entry point for all HeroScript play‑commands