...
This commit is contained in:
@@ -16,4 +16,3 @@ println(model.sheet)
|
||||
model.sheet.pprint()!
|
||||
// model.sheet.export(path: '~/code/github/freeflowuniverse/starlight_template/src/content/test.csv')!
|
||||
// model.sheet
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
import freeflowuniverse.herolib.biz.bizmodel
|
||||
import os
|
||||
|
||||
heroscript:="
|
||||
heroscript := "
|
||||
|
||||
Next will define an OEM product in month 10, 1 Million EUR, ... cogs is a percent which is 20% at start but goes to 10% after 20 months.
|
||||
|
||||
@@ -21,8 +21,8 @@ This time we have the cogs defined in fixed manner, the default currency is USD
|
||||
cogs: '10:100000,15:1000,20:120000'
|
||||
"
|
||||
|
||||
bizmodel.play(heroscript:heroscript)!
|
||||
bizmodel.play(heroscript: heroscript)!
|
||||
|
||||
mut bm:=bizmodel.get("test")!
|
||||
mut bm := bizmodel.get('test')!
|
||||
|
||||
bm.sheet.pprint(nr_columns:30)!
|
||||
bm.sheet.pprint(nr_columns: 30)!
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
import freeflowuniverse.herolib.biz.bizmodel
|
||||
import os
|
||||
|
||||
heroscript:="
|
||||
heroscript := "
|
||||
|
||||
!!bizmodel.revenue_define bizname:'test' name:'nodes'
|
||||
descr:'Node Sales'
|
||||
@@ -16,8 +16,8 @@ heroscript:="
|
||||
//revenue_item_monthly_perc:'3%'
|
||||
"
|
||||
|
||||
bizmodel.play(heroscript:heroscript)!
|
||||
bizmodel.play(heroscript: heroscript)!
|
||||
|
||||
mut bm:=bizmodel.get("test")!
|
||||
mut bm := bizmodel.get('test')!
|
||||
|
||||
bm.sheet.pprint(nr_columns:30)!
|
||||
bm.sheet.pprint(nr_columns: 30)!
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
import freeflowuniverse.herolib.biz.bizmodel
|
||||
import os
|
||||
|
||||
heroscript:="
|
||||
heroscript := "
|
||||
|
||||
!!bizmodel.hr_params bizname:'test' avg_monthly_cost:'4000USD' avg_indexation:'5%'
|
||||
|
||||
@@ -36,8 +36,8 @@ heroscript:="
|
||||
|
||||
"
|
||||
|
||||
bizmodel.play(heroscript:heroscript)!
|
||||
bizmodel.play(heroscript: heroscript)!
|
||||
|
||||
mut bm:=bizmodel.get("test")!
|
||||
mut bm := bizmodel.get('test')!
|
||||
|
||||
bm.sheet.pprint(nr_columns:20)!
|
||||
bm.sheet.pprint(nr_columns: 20)!
|
||||
|
||||
@@ -1,35 +1,35 @@
|
||||
#!/usr/bin/env -S v -n -w -gc none -cg -cc tcc -d use_openssl -enable-globals run
|
||||
|
||||
fn extract_image_markdown(s string) !(string, string) {
|
||||
start := s.index('![') or { return error('Missing ![') }
|
||||
alt_start := start + 2
|
||||
alt_end := s.index_after(']', alt_start) or { return error('Missing ]') }
|
||||
if s.len <= alt_end + 1 || s[alt_end + 1] != `(` {
|
||||
return error('Missing opening ( after ]')
|
||||
}
|
||||
url_start := alt_end + 2
|
||||
url_end := s.index_after(')', url_start) or { return error('Missing closing )') }
|
||||
start := s.index('![') or { return error('Missing ![') }
|
||||
alt_start := start + 2
|
||||
alt_end := s.index_after(']', alt_start) or { return error('Missing ]') }
|
||||
if s.len <= alt_end + 1 || s[alt_end + 1] != `(` {
|
||||
return error('Missing opening ( after ]')
|
||||
}
|
||||
url_start := alt_end + 2
|
||||
url_end := s.index_after(')', url_start) or { return error('Missing closing )') }
|
||||
|
||||
alt := s[alt_start..alt_end]
|
||||
url := s[url_start..url_end]
|
||||
return alt, url
|
||||
alt := s[alt_start..alt_end]
|
||||
url := s[url_start..url_end]
|
||||
return alt, url
|
||||
}
|
||||
|
||||
fn main() {
|
||||
text := 'Here is an image:  and another '
|
||||
text := 'Here is an image:  and another '
|
||||
|
||||
mut i := 0
|
||||
for {
|
||||
if i >= text.len { break }
|
||||
if text[i..].contains('![') {
|
||||
snippet := text[i..]
|
||||
alt, url := extract_image_markdown(snippet) or {
|
||||
break
|
||||
}
|
||||
println('Alt: "$alt" | URL: "$url"')
|
||||
i += snippet.index_after(')', 0) or { break } + 1
|
||||
} else {
|
||||
break
|
||||
}
|
||||
}
|
||||
mut i := 0
|
||||
for {
|
||||
if i >= text.len {
|
||||
break
|
||||
}
|
||||
if text[i..].contains('![') {
|
||||
snippet := text[i..]
|
||||
alt, url := extract_image_markdown(snippet) or { break }
|
||||
println('Alt: "${alt}" | URL: "${url}"')
|
||||
i += snippet.index_after(')', 0) or { break } + 1
|
||||
} else {
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,7 +26,9 @@ pub fn getset(name string) !&BizModel {
|
||||
name: name
|
||||
}
|
||||
bizmodels[bizmodel.name] = &bizmodel
|
||||
bizmodel.departments["default"] = &Department{name:"default"}
|
||||
bizmodel.departments['default'] = &Department{
|
||||
name: 'default'
|
||||
}
|
||||
}
|
||||
return bizmodels[name] or { panic('bug') }
|
||||
}
|
||||
|
||||
@@ -35,11 +35,11 @@ pub:
|
||||
|
||||
pub struct Department {
|
||||
pub:
|
||||
name string
|
||||
description string
|
||||
page string
|
||||
title string
|
||||
order int
|
||||
name string
|
||||
description string
|
||||
page string
|
||||
title string
|
||||
order int
|
||||
avg_monthly_cost string = '6000USD'
|
||||
avg_indexation string = '2%'
|
||||
}
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
module bizmodel
|
||||
|
||||
import arrays
|
||||
import freeflowuniverse.herolib.core.playbook { PlayBook, Action }
|
||||
import freeflowuniverse.herolib.core.playbook { Action, PlayBook }
|
||||
import freeflowuniverse.herolib.ui.console
|
||||
|
||||
const action_priorities = {
|
||||
0: ['department_define', 'costcenter_define']
|
||||
1: ['revenue_define','funding_define','cost_define']
|
||||
1: ['revenue_define', 'funding_define', 'cost_define']
|
||||
2: ['employee_define']
|
||||
3: ['sheet_wiki', 'graph_bar_row', 'graph_pie_row', 'graph_line_row', 'row_overview']
|
||||
}
|
||||
@@ -24,6 +24,7 @@ pub fn play(args PlayArgs) ! {
|
||||
mut plbook := args.plbook or {
|
||||
playbook.new(text: args.heroscript, path: args.heroscript_path)!
|
||||
}
|
||||
|
||||
// group actions by which bizmodel they belong to
|
||||
actions_by_biz := arrays.group_by[string, &Action](plbook.actions_find(actor: 'bizmodel')!,
|
||||
fn (a &Action) string {
|
||||
@@ -40,13 +41,21 @@ pub fn play(args PlayArgs) ! {
|
||||
pub fn (mut m BizModel) play(mut plbook PlayBook) ! {
|
||||
mut actions := plbook.actions_find(actor: 'bizmodel')!
|
||||
|
||||
for action in actions.filter(it.name in action_priorities[0]) {m.act(*action)!}
|
||||
for action in actions.filter(it.name in action_priorities[1]) {m.act(*action)!}
|
||||
for action in actions.filter(it.name in action_priorities[0]) {
|
||||
m.act(*action)!
|
||||
}
|
||||
for action in actions.filter(it.name in action_priorities[1]) {
|
||||
m.act(*action)!
|
||||
}
|
||||
|
||||
m.cost_total()!
|
||||
m.revenue_total()!
|
||||
m.funding_total()!
|
||||
|
||||
for action in actions.filter(it.name in action_priorities[2]) {m.act(*action)!}
|
||||
for action in actions.filter(it.name in action_priorities[3]) {m.act(*action)!}
|
||||
for action in actions.filter(it.name in action_priorities[2]) {
|
||||
m.act(*action)!
|
||||
}
|
||||
for action in actions.filter(it.name in action_priorities[3]) {
|
||||
m.act(*action)!
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,27 +2,26 @@ module bizmodel
|
||||
|
||||
import freeflowuniverse.herolib.core.playbook { Action }
|
||||
|
||||
|
||||
// !!bizmodel.department_define bizname:'test'
|
||||
// !!bizmodel.department_define bizname:'test'
|
||||
// name:'engineering'
|
||||
// descr:'Software Development Department'
|
||||
// title:'Engineering Division'
|
||||
// avg_monthly_cost:'6000USD' avg_indexation:'5%'
|
||||
fn (mut m BizModel) department_define_action(action Action) !Action {
|
||||
bizname := action.params.get_default('bizname', '')!
|
||||
mut name := action.params.get('name') or {return error('department name is required')}
|
||||
mut name := action.params.get('name') or { return error('department name is required') }
|
||||
mut descr := action.params.get_default('descr', '')!
|
||||
if descr.len == 0 {
|
||||
descr = action.params.get_default('description', '')!
|
||||
}
|
||||
|
||||
department := Department{
|
||||
name: name
|
||||
description: descr
|
||||
title: action.params.get_default('title', '')!
|
||||
page: action.params.get_default('page', '')!
|
||||
avg_monthly_cost: action.params.get_default('avg_monthly_cost', "6000USD")!
|
||||
avg_indexation: action.params.get_default('avg_indexation', "2%")!
|
||||
name: name
|
||||
description: descr
|
||||
title: action.params.get_default('title', '')!
|
||||
page: action.params.get_default('page', '')!
|
||||
avg_monthly_cost: action.params.get_default('avg_monthly_cost', '6000USD')!
|
||||
avg_indexation: action.params.get_default('avg_indexation', '2%')!
|
||||
}
|
||||
m.departments[name] = &department
|
||||
return action
|
||||
|
||||
@@ -7,7 +7,7 @@ import freeflowuniverse.herolib.data.currency
|
||||
import math
|
||||
|
||||
// populate the params for hr
|
||||
// !!bizmodel.department_define bizname:'test'
|
||||
// !!bizmodel.department_define bizname:'test'
|
||||
// descr:'Junior Engineer'
|
||||
// nrpeople:'1:5,60:30'
|
||||
// cost:'4000USD'
|
||||
@@ -16,7 +16,9 @@ import math
|
||||
// cost_percent_revenue e.g. 4%, will make sure the cost will be at least 4% of revenue
|
||||
fn (mut m BizModel) employee_define_action(action Action) !Action {
|
||||
// bizname := action.params.get_default('bizname', '')!
|
||||
mut name := action.params.get('name') or { return error('employee name is required in ${action.name}, now \n${action}') }
|
||||
mut name := action.params.get('name') or {
|
||||
return error('employee name is required in ${action.name}, now \n${action}')
|
||||
}
|
||||
mut descr := action.params.get_default('descr', '')!
|
||||
if descr.len == 0 {
|
||||
descr = action.params.get('description')!
|
||||
@@ -34,7 +36,8 @@ fn (mut m BizModel) employee_define_action(action Action) !Action {
|
||||
|
||||
page := action.params.get_default('page', '')!
|
||||
|
||||
cost_percent_revenue := action.params.get_percentage_default('cost_percent_revenue','0%')!
|
||||
cost_percent_revenue := action.params.get_percentage_default('cost_percent_revenue',
|
||||
'0%')!
|
||||
nrpeople := action.params.get_default('nrpeople', '1')!
|
||||
cost_center := action.params.get_default('costcenter', '')!
|
||||
|
||||
@@ -64,15 +67,15 @@ fn (mut m BizModel) employee_define_action(action Action) !Action {
|
||||
aggregatetype: .avg
|
||||
)!
|
||||
costpeople_row = costpeople_row.action(action: .multiply, rows: [nrpeople_row])!
|
||||
|
||||
//lets make sure nr of people filled in properly as well as cost
|
||||
|
||||
// lets make sure nr of people filled in properly as well as cost
|
||||
if cost_percent_revenue > 0 {
|
||||
mut revtotal := m.sheet.row_get('revenue_total')!
|
||||
// println(revtotal)
|
||||
for x in 0 .. nrpeople_row.cells.len {
|
||||
mut curcost:= -costpeople_row.cells[x].val
|
||||
mut curpeople:= nrpeople_row.cells[x].val
|
||||
mut currev:= revtotal.cells[x].val
|
||||
mut curcost := -costpeople_row.cells[x].val
|
||||
mut curpeople := nrpeople_row.cells[x].val
|
||||
mut currev := revtotal.cells[x].val
|
||||
// println("currev: ${currev}, curcost: ${curcost}, curpeople: ${curpeople}, costpercent_revenue: ${cost_percent_revenue}")
|
||||
if currev * cost_percent_revenue > curcost {
|
||||
costpeople_row.cells[x].val = -currev * cost_percent_revenue
|
||||
|
||||
@@ -5,7 +5,6 @@ import freeflowuniverse.herolib.core.texttools
|
||||
|
||||
// see lib/biz/bizmodel/docs/revenue.md
|
||||
fn (mut m BizModel) revenue_action(action Action) !Action {
|
||||
|
||||
mut r := get_action_descr(action)!
|
||||
|
||||
mut product := Product{
|
||||
@@ -24,11 +23,11 @@ fn (mut m BizModel) revenue_action(action Action) !Action {
|
||||
tags: 'name:${r.name}'
|
||||
descr: 'nr of items sold/month for ${r.name}'
|
||||
aggregatetype: .avg
|
||||
extrapolate: true
|
||||
extrapolate: true
|
||||
)!
|
||||
|
||||
if nr_sold.max() > 0 {
|
||||
//don't process if nr sold
|
||||
// don't process if nr sold
|
||||
return action
|
||||
}
|
||||
|
||||
@@ -78,12 +77,12 @@ fn (mut m BizModel) revenue_action(action Action) !Action {
|
||||
}
|
||||
|
||||
mut margin := revenue.action(
|
||||
name: '${r.name}_margin'
|
||||
descr: 'Margin for ${r.name}'
|
||||
action: .substract
|
||||
rows: [cogs]
|
||||
tags: 'name:${r.name} margin'
|
||||
name: '${r.name}_margin'
|
||||
descr: 'Margin for ${r.name}'
|
||||
action: .substract
|
||||
rows: [cogs]
|
||||
tags: 'name:${r.name} margin'
|
||||
)!
|
||||
|
||||
return action
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,7 +5,6 @@ import freeflowuniverse.herolib.core.texttools
|
||||
|
||||
// see lib/biz/bizmodel/docs/revenue.md
|
||||
fn (mut m BizModel) revenue_item_action(action Action) !Action {
|
||||
|
||||
mut r := get_action_descr(action)!
|
||||
mut product := m.products[r.name]
|
||||
|
||||
@@ -15,12 +14,12 @@ fn (mut m BizModel) revenue_item_action(action Action) !Action {
|
||||
tags: 'name:${r.name}'
|
||||
descr: 'nr of items sold/month for ${r.name}'
|
||||
aggregatetype: .avg
|
||||
extrapolate: true
|
||||
extrapolate: true
|
||||
)!
|
||||
|
||||
if nr_sold.max() > 0 {
|
||||
product.has_items = true
|
||||
}else{
|
||||
} else {
|
||||
return action
|
||||
}
|
||||
|
||||
@@ -40,23 +39,21 @@ fn (mut m BizModel) revenue_item_action(action Action) !Action {
|
||||
extrapolate: true
|
||||
)!
|
||||
|
||||
|
||||
mut revenue_item_monthly_perc_temp := revenue_item_setup_param.action(
|
||||
name: '${r.name}_revenue_item_monthly_perc_temp'
|
||||
descr: 'Monthly sales as percentage from Setup Revenue for ${r.name}'
|
||||
action: .multiply
|
||||
val: action.params.get_float_default('revenue_item_monthly_perc', 0.0)!
|
||||
tags: 'name:${r.name}'
|
||||
)!
|
||||
name: '${r.name}_revenue_item_monthly_perc_temp'
|
||||
descr: 'Monthly sales as percentage from Setup Revenue for ${r.name}'
|
||||
action: .multiply
|
||||
val: action.params.get_float_default('revenue_item_monthly_perc', 0.0)!
|
||||
tags: 'name:${r.name}'
|
||||
)!
|
||||
|
||||
mut revenue_item_monthly := revenue_item_monthly_param.action(
|
||||
name: '${r.name}_revenue_item_monthly'
|
||||
descr: 'Item Revenue monthly for ${r.name}'
|
||||
action: .add
|
||||
rows: [revenue_item_monthly_perc_temp]
|
||||
tags: 'name:${r.name}'
|
||||
)!
|
||||
|
||||
name: '${r.name}_revenue_item_monthly'
|
||||
descr: 'Item Revenue monthly for ${r.name}'
|
||||
action: .add
|
||||
rows: [revenue_item_monthly_perc_temp]
|
||||
tags: 'name:${r.name}'
|
||||
)!
|
||||
|
||||
revenue_item_monthly_perc_temp.delete()
|
||||
|
||||
@@ -76,42 +73,40 @@ fn (mut m BizModel) revenue_item_action(action Action) !Action {
|
||||
extrapolate: true
|
||||
)!
|
||||
|
||||
|
||||
mut cogs_item_setup_rev_perc_temp := revenue_item_setup_param.action(
|
||||
name: '${r.name}_cogs_item_setup_rev_perc_temp'
|
||||
descr: 'Setup cogs as percentage from Setup for ${r.name}'
|
||||
action: .multiply
|
||||
val: action.params.get_float_default('cogs_item_setup_rev_perc', 0.0)!
|
||||
tags: 'name:${r.name}'
|
||||
)!
|
||||
name: '${r.name}_cogs_item_setup_rev_perc_temp'
|
||||
descr: 'Setup cogs as percentage from Setup for ${r.name}'
|
||||
action: .multiply
|
||||
val: action.params.get_float_default('cogs_item_setup_rev_perc', 0.0)!
|
||||
tags: 'name:${r.name}'
|
||||
)!
|
||||
|
||||
mut cogs_item_monthly_rev_perc_temp := revenue_item_monthly_param.action(
|
||||
name: '${r.name}_cogs_item_monthly_rev_perc_temp'
|
||||
descr: 'Monthly cogs as percentage from Monthly for ${r.name}'
|
||||
action: .multiply
|
||||
val: action.params.get_float_default('cogs_item_monthly_rev_perc', 0.0)!
|
||||
tags: 'name:${r.name}'
|
||||
)!
|
||||
name: '${r.name}_cogs_item_monthly_rev_perc_temp'
|
||||
descr: 'Monthly cogs as percentage from Monthly for ${r.name}'
|
||||
action: .multiply
|
||||
val: action.params.get_float_default('cogs_item_monthly_rev_perc', 0.0)!
|
||||
tags: 'name:${r.name}'
|
||||
)!
|
||||
|
||||
mut cogs_item_setup1 := cogs_item_setup_param.action(
|
||||
name: '${r.name}_cogs_item_setup1'
|
||||
descr: 'Item COGS setup for ${r.name}'
|
||||
action: .add
|
||||
rows: [cogs_item_setup_rev_perc_temp]
|
||||
tags: 'name:${r.name}'
|
||||
)!
|
||||
name: '${r.name}_cogs_item_setup1'
|
||||
descr: 'Item COGS setup for ${r.name}'
|
||||
action: .add
|
||||
rows: [cogs_item_setup_rev_perc_temp]
|
||||
tags: 'name:${r.name}'
|
||||
)!
|
||||
|
||||
mut cogs_item_monthly := cogs_item_monthly_param.action(
|
||||
name: '${r.name}_cogs_item_monthly'
|
||||
descr: 'Item COGS monthly for ${r.name}'
|
||||
action: .add
|
||||
rows: [cogs_item_monthly_rev_perc_temp]
|
||||
tags: 'name:${r.name}'
|
||||
)!
|
||||
|
||||
cogs_item_setup_rev_perc_temp.delete()
|
||||
cogs_item_monthly_rev_perc_temp.delete()
|
||||
name: '${r.name}_cogs_item_monthly'
|
||||
descr: 'Item COGS monthly for ${r.name}'
|
||||
action: .add
|
||||
rows: [cogs_item_monthly_rev_perc_temp]
|
||||
tags: 'name:${r.name}'
|
||||
)!
|
||||
|
||||
cogs_item_setup_rev_perc_temp.delete()
|
||||
cogs_item_monthly_rev_perc_temp.delete()
|
||||
|
||||
////////////////////////////////////////////////////////////////
|
||||
// CALCULATE THE TOTAL (multiply with nr sold)
|
||||
@@ -121,19 +116,18 @@ fn (mut m BizModel) revenue_item_action(action Action) !Action {
|
||||
descr: 'Setup sales for ${r.name} total'
|
||||
action: .multiply
|
||||
rows: [nr_sold]
|
||||
tags: 'name:${r.name} rev'
|
||||
tags: 'name:${r.name} rev'
|
||||
delaymonths: action.params.get_int_default('revenue_item_setup_delay', 0)!
|
||||
)!
|
||||
|
||||
|
||||
mut revenue_monthly_total := revenue_item_monthly.action(
|
||||
name: '${r.name}_revenue_monthly_total'
|
||||
descr: 'Monthly sales for ${r.name} total'
|
||||
action: .multiply
|
||||
rows: [nr_sold]
|
||||
tags: 'name:${r.name}'
|
||||
delaymonths: action.params.get_int_default('revenue_item_monthly_delay', 0)!
|
||||
)!
|
||||
tags: 'name:${r.name}'
|
||||
delaymonths: action.params.get_int_default('revenue_item_monthly_delay', 0)!
|
||||
)!
|
||||
|
||||
mut cogs_setup := cogs_item_setup1.action(
|
||||
name: '${r.name}_cogs_setup'
|
||||
@@ -144,7 +138,6 @@ fn (mut m BizModel) revenue_item_action(action Action) !Action {
|
||||
delaymonths: action.params.get_int_default('cogs_item_delay', 0)!
|
||||
)!
|
||||
|
||||
|
||||
mut cogs_monthly_total := cogs_item_monthly.action(
|
||||
name: '${r.name}_cogs_monthly_total'
|
||||
descr: 'Monthly COGS for ${r.name} total'
|
||||
@@ -156,12 +149,11 @@ fn (mut m BizModel) revenue_item_action(action Action) !Action {
|
||||
|
||||
// DEAL WITH RECURRING
|
||||
|
||||
|
||||
mut revenue_monthly_recurring := revenue_monthly_total.recurring(
|
||||
name: '${r.name}_revenue_monthly'
|
||||
descr: 'Revenue monthly recurring for ${r.name}'
|
||||
nrmonths: product.nr_months_recurring
|
||||
tags: 'name:${r.name} rev'
|
||||
tags: 'name:${r.name} rev'
|
||||
)!
|
||||
|
||||
revenue_monthly_total.delete()
|
||||
@@ -170,48 +162,44 @@ fn (mut m BizModel) revenue_item_action(action Action) !Action {
|
||||
name: '${r.name}_cogs_monthly'
|
||||
descr: 'COGS monthly recurring for ${r.name}'
|
||||
nrmonths: product.nr_months_recurring
|
||||
tags: 'name:${r.name} cogs'
|
||||
tags: 'name:${r.name} cogs'
|
||||
)!
|
||||
|
||||
cogs_monthly_total.delete()
|
||||
cogs_monthly_total.delete()
|
||||
|
||||
_ := nr_sold.recurring(
|
||||
name: '${r.name}_nr_active'
|
||||
descr: 'Nr products active because of recurring for ${r.name}'
|
||||
nrmonths: product.nr_months_recurring
|
||||
aggregatetype: .max
|
||||
delaymonths: action.params.get_int_default('revenue_item_monthly_delay', 0)!
|
||||
|
||||
delaymonths: action.params.get_int_default('revenue_item_monthly_delay', 0)!
|
||||
)!
|
||||
|
||||
//DEAL WITH MARGIN
|
||||
// DEAL WITH MARGIN
|
||||
|
||||
mut margin_setup := revenue_setup.action(
|
||||
name: '${r.name}_margin_setup'
|
||||
descr: 'Setup margin for ${r.name}'
|
||||
action: .substract
|
||||
rows: [cogs_setup]
|
||||
tags: 'name:${r.name}'
|
||||
name: '${r.name}_margin_setup'
|
||||
descr: 'Setup margin for ${r.name}'
|
||||
action: .substract
|
||||
rows: [cogs_setup]
|
||||
tags: 'name:${r.name}'
|
||||
)!
|
||||
|
||||
|
||||
mut margin_monthly := revenue_monthly_recurring.action(
|
||||
name: '${r.name}_margin_monthly'
|
||||
descr: 'Monthly margin for ${r.name}'
|
||||
action: .substract
|
||||
rows: [cogs_monthly_recurring]
|
||||
tags: 'name:${r.name}'
|
||||
name: '${r.name}_margin_monthly'
|
||||
descr: 'Monthly margin for ${r.name}'
|
||||
action: .substract
|
||||
rows: [cogs_monthly_recurring]
|
||||
tags: 'name:${r.name}'
|
||||
)!
|
||||
|
||||
mut margin := margin_setup.action(
|
||||
name: '${r.name}_margin'
|
||||
descr: 'Margin for ${r.name}'
|
||||
action: .add
|
||||
rows: [margin_monthly]
|
||||
tags: 'name:${r.name} margin'
|
||||
name: '${r.name}_margin'
|
||||
descr: 'Margin for ${r.name}'
|
||||
action: .add
|
||||
rows: [margin_monthly]
|
||||
tags: 'name:${r.name} margin'
|
||||
)!
|
||||
|
||||
|
||||
|
||||
return action
|
||||
}
|
||||
|
||||
@@ -1,16 +1,27 @@
|
||||
module bizmodel
|
||||
|
||||
import freeflowuniverse.herolib.core.playbook { Action }
|
||||
import freeflowuniverse.herolib.core.playbook
|
||||
|
||||
// revenue_total calculates and aggregates the total revenue and cost of goods sold (COGS) for the business model
|
||||
fn (mut sim BizModel) revenue_total() ! {
|
||||
mut sheet := sim.sheet
|
||||
|
||||
mut sheet:= sim.sheet
|
||||
|
||||
mut revenue_total := sheet.group2row(name:"revenue_total", include:['rev'], tags:"total", descr:'total revenue.')!
|
||||
mut cogs_total := sheet.group2row(name:"cogs_total", include:['cogs'], tags:"total", descr:'total cogs.')!
|
||||
mut margin_total := sheet.group2row(name:"margin_total", include:['margin'], tags:"total", descr:'total margin.')!
|
||||
|
||||
|
||||
mut revenue_total := sheet.group2row(
|
||||
name: 'revenue_total'
|
||||
include: ['rev']
|
||||
tags: 'total'
|
||||
descr: 'total revenue.'
|
||||
)!
|
||||
mut cogs_total := sheet.group2row(
|
||||
name: 'cogs_total'
|
||||
include: ['cogs']
|
||||
tags: 'total'
|
||||
descr: 'total cogs.'
|
||||
)!
|
||||
mut margin_total := sheet.group2row(
|
||||
name: 'margin_total'
|
||||
include: ['margin']
|
||||
tags: 'total'
|
||||
descr: 'total margin.'
|
||||
)!
|
||||
}
|
||||
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
|
||||
module bizmodel
|
||||
|
||||
import freeflowuniverse.herolib.core.texttools
|
||||
import freeflowuniverse.herolib.core.playbook { Action }
|
||||
|
||||
pub struct RowDescrFields{
|
||||
pub struct RowDescrFields {
|
||||
pub mut:
|
||||
name string
|
||||
title string
|
||||
@@ -12,11 +11,10 @@ pub mut:
|
||||
}
|
||||
|
||||
fn get_action_descr(action Action) !RowDescrFields {
|
||||
mut r := RowDescrFields{}
|
||||
|
||||
mut r:=RowDescrFields{}
|
||||
|
||||
r.name= action.params.get_default('name', '')!
|
||||
r.description= action.params.get_default('descr', '')!
|
||||
r.name = action.params.get_default('name', '')!
|
||||
r.description = action.params.get_default('descr', '')!
|
||||
if r.description.len == 0 {
|
||||
r.description = action.params.get_default('description', '')!
|
||||
}
|
||||
@@ -33,5 +31,4 @@ fn get_action_descr(action Action) !RowDescrFields {
|
||||
r.description = r.description.replace('_', ' ').replace('-', ' ')
|
||||
|
||||
return r
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -142,8 +142,6 @@ pub fn (mut r Row) action(args_ RowActionArgs) !&Row {
|
||||
return row_result
|
||||
}
|
||||
|
||||
|
||||
|
||||
pub fn (mut r Row) delay(monthdelay int) ! {
|
||||
mut todelay := []f64{}
|
||||
for x in 0 .. r.sheet.nrcol {
|
||||
|
||||
@@ -19,13 +19,14 @@ fn pad_right(s string, length int) string {
|
||||
@[params]
|
||||
pub struct PPrintArgs {
|
||||
pub mut:
|
||||
group_months int = 1 //e.g. if 2 then will group by 2 months
|
||||
nr_columns int = 0 //number of columns to show in the table, 0 is all
|
||||
description bool //show description in the table
|
||||
aggrtype bool = true //show aggregate type in the table
|
||||
tags bool = true //show tags in the table
|
||||
subgroup bool //show subgroup in the table
|
||||
group_months int = 1 // e.g. if 2 then will group by 2 months
|
||||
nr_columns int = 0 // number of columns to show in the table, 0 is all
|
||||
description bool // show description in the table
|
||||
aggrtype bool = true // show aggregate type in the table
|
||||
tags bool = true // show tags in the table
|
||||
subgroup bool // show subgroup in the table
|
||||
}
|
||||
|
||||
// calculate_column_widths calculates the maximum width for each column
|
||||
fn calculate_column_widths(rows [][]string) []int {
|
||||
if rows.len == 0 {
|
||||
@@ -119,7 +120,7 @@ pub fn (mut s Sheet) pprint(args PPrintArgs) ! {
|
||||
data_start_index++
|
||||
}
|
||||
|
||||
//check if row is empty
|
||||
// check if row is empty
|
||||
// println(row_data)
|
||||
for i := data_start_index; i < row_data.len; i++ {
|
||||
cell_val := row_data[i]
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
module builder
|
||||
|
||||
import freeflowuniverse.herolib.osal.core as osal
|
||||
import freeflowuniverse.herolib.osal.core as osal.rsync
|
||||
import freeflowuniverse.herolib.osal.core.rsync
|
||||
// import freeflowuniverse.herolib.core.pathlib
|
||||
import os
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ module builder
|
||||
import os
|
||||
import rand
|
||||
import freeflowuniverse.herolib.osal.core as osal
|
||||
import freeflowuniverse.herolib.osal.core as osal.rsync
|
||||
import freeflowuniverse.herolib.osal.core.rsync
|
||||
import freeflowuniverse.herolib.core.pathlib
|
||||
import freeflowuniverse.herolib.data.ipaddress
|
||||
import freeflowuniverse.herolib.ui.console
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
module builder
|
||||
|
||||
import freeflowuniverse.herolib.osal.core as osal.screen
|
||||
import freeflowuniverse.herolib.osal.core.screen
|
||||
import freeflowuniverse.herolib.data.ipaddress
|
||||
import freeflowuniverse.herolib.ui.console
|
||||
|
||||
|
||||
@@ -5,9 +5,7 @@ import freeflowuniverse.herolib.core
|
||||
import freeflowuniverse.herolib.installers.lang.rust
|
||||
import freeflowuniverse.herolib.ui.console
|
||||
import freeflowuniverse.herolib.core.texttools
|
||||
import freeflowuniverse.herolib.osal.core as osal.screen
|
||||
import freeflowuniverse.herolib.ui
|
||||
import freeflowuniverse.herolib.osal.core as osal.startupmanager
|
||||
import os
|
||||
import time
|
||||
import json
|
||||
|
||||
@@ -6,7 +6,7 @@ Rclone is this incredible swiss army knive to deal with S3 storage servers.
|
||||
## Example
|
||||
|
||||
```golang
|
||||
import freeflowuniverse.herolib.osal.core as osal.rclone
|
||||
import freeflowuniverse.herolib.osal.core.rclone
|
||||
|
||||
fn main() {
|
||||
do() or { panic(err) }
|
||||
|
||||
@@ -17,7 +17,7 @@ RCloneClient must be installed on your system. Visit https://rclone.org/install/
|
||||
## Usage
|
||||
|
||||
```v
|
||||
import freeflowuniverse.herolib.osal.core as osal.rclone
|
||||
import freeflowuniverse.herolib.osal.core.rclone
|
||||
|
||||
fn main() {
|
||||
// Create a new RCloneClient instance
|
||||
|
||||
@@ -9,8 +9,8 @@ import freeflowuniverse.herolib.installers.ulist
|
||||
import freeflowuniverse.herolib.installers.base
|
||||
|
||||
@if model.startupmanager
|
||||
import freeflowuniverse.herolib.osal.core as osal.systemd
|
||||
import freeflowuniverse.herolib.osal.core as osal.zinit
|
||||
import freeflowuniverse.herolib.osal.core.systemd
|
||||
import freeflowuniverse.herolib.osal.core.zinit
|
||||
@end
|
||||
|
||||
@if model.build
|
||||
|
||||
@@ -10,8 +10,8 @@ import freeflowuniverse.herolib.data.encoderhero
|
||||
@end
|
||||
|
||||
@if model.cat == .installer
|
||||
import freeflowuniverse.herolib.osal.core as osal.startupmanager
|
||||
import freeflowuniverse.herolib.osal.core as osal.zinit
|
||||
import freeflowuniverse.herolib.osal.core.startupmanager
|
||||
import freeflowuniverse.herolib.osal.core.zinit
|
||||
import time
|
||||
@end
|
||||
|
||||
|
||||
@@ -6,8 +6,8 @@ import freeflowuniverse.herolib.core.texttools
|
||||
import freeflowuniverse.herolib.core.pathlib
|
||||
|
||||
@if args.startupmanager
|
||||
import freeflowuniverse.herolib.osal.core as osal.systemd
|
||||
import freeflowuniverse.herolib.osal.core as osal.zinit
|
||||
import freeflowuniverse.herolib.osal.core.systemd
|
||||
import freeflowuniverse.herolib.osal.core.zinit
|
||||
@end
|
||||
import freeflowuniverse.herolib.installers.ulist
|
||||
|
||||
|
||||
@@ -7,8 +7,8 @@ import freeflowuniverse.herolib.core.playbook
|
||||
import freeflowuniverse.herolib.ui.console
|
||||
|
||||
@if args.cat == .installer
|
||||
import freeflowuniverse.herolib.osal.core as osal.startupmanager
|
||||
import freeflowuniverse.herolib.osal.core as osal.zinit
|
||||
import freeflowuniverse.herolib.osal.core.startupmanager
|
||||
import freeflowuniverse.herolib.osal.core.zinit
|
||||
@if args.startupmanager
|
||||
import time
|
||||
@end
|
||||
|
||||
@@ -9,8 +9,8 @@ import freeflowuniverse.herolib.installers.ulist
|
||||
import freeflowuniverse.herolib.installers.base
|
||||
|
||||
@if model.startupmanager
|
||||
import freeflowuniverse.herolib.osal.core as osal.systemd
|
||||
import freeflowuniverse.herolib.osal.core as osal.zinit
|
||||
import freeflowuniverse.herolib.osal.core.systemd
|
||||
import freeflowuniverse.herolib.osal.core.zinit
|
||||
@end
|
||||
|
||||
@if model.build
|
||||
|
||||
@@ -10,8 +10,8 @@ import freeflowuniverse.herolib.data.encoderhero
|
||||
@end
|
||||
|
||||
@if model.cat == .installer
|
||||
import freeflowuniverse.herolib.osal.core as osal.startupmanager
|
||||
import freeflowuniverse.herolib.osal.core as osal.zinit
|
||||
import freeflowuniverse.herolib.osal.core.startupmanager
|
||||
import freeflowuniverse.herolib.osal.core.zinit
|
||||
import time
|
||||
@end
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
module herocmds
|
||||
|
||||
import freeflowuniverse.herolib.osal.core as osal.sshagent
|
||||
import freeflowuniverse.herolib.osal.core.sshagent
|
||||
import freeflowuniverse.herolib.ui.console
|
||||
import freeflowuniverse.herolib.ui
|
||||
import cli { Command, Flag }
|
||||
|
||||
@@ -102,7 +102,6 @@ pub fn (mut plbook PlayBook) exists(args FindArgs) bool {
|
||||
return res.len > 0
|
||||
}
|
||||
|
||||
|
||||
pub fn (mut plbook PlayBook) find_one(args FindArgs) !&Action {
|
||||
mut res := plbook.find(args)!
|
||||
if res.len == 0 {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
module playcmds
|
||||
|
||||
import freeflowuniverse.herolib.osal.core as osal.sshagent
|
||||
import freeflowuniverse.herolib.osal.core.sshagent
|
||||
import freeflowuniverse.herolib.core.playbook
|
||||
|
||||
pub fn play_ssh(mut plbook playbook.PlayBook) ! {
|
||||
|
||||
@@ -11,7 +11,7 @@ pub fn play_actions(mut plbook playbook.PlayBook) ! {
|
||||
console.print_green('play actions (simulators)')
|
||||
farmingsimulator.play(mut plbook)!
|
||||
gridsimulator.play(mut plbook)!
|
||||
bizmodel.play(plbook:*plbook)!
|
||||
bizmodel.play(plbook: *plbook)!
|
||||
}
|
||||
|
||||
pub fn play_macro(action playbook.Action) !string {
|
||||
|
||||
@@ -7,4 +7,4 @@ pub const max_value_size = 1024 * 1024 // 1MB
|
||||
// hash_data calculates the blake160 hash of the given data and returns it as a hex string.
|
||||
pub fn hash_data(data []u8) string {
|
||||
return blake2b.sum160(data).hex()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -62,4 +62,4 @@ pub fn (mut t Tree) print_pages() {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,7 +36,6 @@ pub fn play(args_ PlayArgs) ! {
|
||||
doctree.scan(path: path, git_url: git_url, git_reset: git_reset, git_pull: git_pull)!
|
||||
|
||||
tree_set(doctree)
|
||||
|
||||
}
|
||||
|
||||
export_actions := plbook.find(filter: 'doctree.export')!
|
||||
@@ -69,6 +68,4 @@ pub fn play(args_ PlayArgs) ! {
|
||||
// println(tree_list())
|
||||
// println(tree_get("main")!)
|
||||
// panic("sd")
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -79,7 +79,6 @@ pub fn tree_list() []string {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// tree_set stores tree in global map
|
||||
pub fn tree_set(tree Tree) {
|
||||
lock doctrees {
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
module tools
|
||||
|
||||
|
||||
pub fn min_header(text string, minlevel int) string {
|
||||
mut nrhash := 100
|
||||
mut out := []string{}
|
||||
|
||||
@@ -4,83 +4,83 @@ import os
|
||||
import freeflowuniverse.herolib.ui.console
|
||||
|
||||
fn test_markdown_min_header_basic() {
|
||||
txt := "
|
||||
txt := '
|
||||
# Header 1
|
||||
## Header 2
|
||||
### Header 3
|
||||
"
|
||||
expected := "
|
||||
'
|
||||
expected := '
|
||||
## Header 1
|
||||
### Header 2
|
||||
#### Header 3
|
||||
"
|
||||
'
|
||||
result := min_header(txt, 2)
|
||||
assert result == expected
|
||||
}
|
||||
|
||||
fn test_markdown_min_header_no_change() {
|
||||
txt := "
|
||||
txt := '
|
||||
## Header 2
|
||||
### Header 3
|
||||
"
|
||||
expected := "
|
||||
'
|
||||
expected := '
|
||||
## Header 2
|
||||
### Header 3
|
||||
"
|
||||
'
|
||||
result := min_header(txt, 2)
|
||||
assert result == expected
|
||||
}
|
||||
|
||||
fn test_markdown_min_header_multiple_levels() {
|
||||
txt := "
|
||||
txt := '
|
||||
# Title
|
||||
Some txt here.
|
||||
## Subtitle
|
||||
More txt.
|
||||
### Sub-subtitle
|
||||
"
|
||||
expected := "
|
||||
'
|
||||
expected := '
|
||||
### Title
|
||||
Some txt here.
|
||||
#### Subtitle
|
||||
More txt.
|
||||
##### Sub-subtitle
|
||||
"
|
||||
'
|
||||
result := min_header(txt, 3)
|
||||
assert result == expected
|
||||
}
|
||||
|
||||
fn test_markdown_min_header_no_headers() {
|
||||
txt := "
|
||||
txt := '
|
||||
This is some plain txt.
|
||||
No headers here.
|
||||
"
|
||||
expected := "
|
||||
'
|
||||
expected := '
|
||||
This is some plain txt.
|
||||
No headers here.
|
||||
"
|
||||
'
|
||||
result := min_header(txt, 1)
|
||||
assert result == expected
|
||||
}
|
||||
|
||||
fn test_markdown_min_header_empty_input() {
|
||||
txt := ""
|
||||
expected := ""
|
||||
txt := ''
|
||||
expected := ''
|
||||
result := min_header(txt, 1)
|
||||
assert result == expected
|
||||
}
|
||||
|
||||
fn test_markdown_min_header_with_txt_before_header() {
|
||||
txt := "
|
||||
txt := '
|
||||
Some intro txt
|
||||
# Header 1
|
||||
## Header 2
|
||||
"
|
||||
expected := "
|
||||
'
|
||||
expected := '
|
||||
Some intro txt
|
||||
## Header 1
|
||||
### Header 2
|
||||
"
|
||||
'
|
||||
result := min_header(txt, 2)
|
||||
assert result == expected
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ pub fn extract_title(page string) string {
|
||||
}
|
||||
}
|
||||
}
|
||||
return ""
|
||||
return ''
|
||||
}
|
||||
|
||||
// set_titles renumbers markdown titles in a page string up to a specified maximum level.
|
||||
@@ -73,7 +73,7 @@ pub fn set_titles(page string, maxnr int) string {
|
||||
current_numbers[i] = 0
|
||||
}
|
||||
|
||||
mut new_prefix := ""
|
||||
mut new_prefix := ''
|
||||
if autonumber {
|
||||
for i := 0; i < numbering_hash_count; i++ {
|
||||
if i > 0 && current_numbers[i] == 0 && current_numbers[i - 1] > 0 {
|
||||
@@ -103,22 +103,21 @@ pub fn set_titles(page string, maxnr int) string {
|
||||
original_title_text = original_title_text[skip_chars..].trim_space()
|
||||
|
||||
// Construct the new line
|
||||
mut new_line := ""
|
||||
for _ in 0..display_hash_count {
|
||||
mut new_line := ''
|
||||
for _ in 0 .. display_hash_count {
|
||||
new_line += '#'
|
||||
}
|
||||
|
||||
|
||||
if autonumber {
|
||||
new_line += " ${new_prefix} ${original_title_text}"
|
||||
new_line += ' ${new_prefix} ${original_title_text}'
|
||||
} else {
|
||||
new_line += " ${original_title_text}"
|
||||
new_line += ' ${original_title_text}'
|
||||
}
|
||||
result_lines << new_line
|
||||
}else {
|
||||
} else {
|
||||
result_lines << line
|
||||
}
|
||||
}
|
||||
|
||||
return result_lines.join_lines() + '\n'
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,44 +1,43 @@
|
||||
module tools
|
||||
|
||||
|
||||
fn test_extract_title() {
|
||||
// Test case 1: Single H1 title
|
||||
page1 := "# My Awesome Document"
|
||||
assert extract_title(page1) == "My Awesome Document"
|
||||
page1 := '# My Awesome Document'
|
||||
assert extract_title(page1) == 'My Awesome Document'
|
||||
|
||||
// Test case 2: Multiple titles, H1 first
|
||||
page2 := "
|
||||
page2 := '
|
||||
# Main Title
|
||||
Some text here.
|
||||
## Subtitle 1
|
||||
More text.
|
||||
### Sub-subtitle 1.1
|
||||
"
|
||||
assert extract_title(page2) == "Main Title"
|
||||
'
|
||||
assert extract_title(page2) == 'Main Title'
|
||||
|
||||
// Test case 3: No titles
|
||||
page3 := "
|
||||
page3 := '
|
||||
This is a plain document.
|
||||
No markdown titles here.
|
||||
"
|
||||
assert extract_title(page3) == ""
|
||||
'
|
||||
assert extract_title(page3) == ''
|
||||
|
||||
// Test case 4: Title with leading/trailing spaces
|
||||
page4 := " # Another Title "
|
||||
assert extract_title(page4) == "Another Title"
|
||||
page4 := ' # Another Title '
|
||||
assert extract_title(page4) == 'Another Title'
|
||||
|
||||
// Test case 5: Title with only hashes and spaces
|
||||
page5 := "### "
|
||||
assert extract_title(page5) == ""
|
||||
page5 := '### '
|
||||
assert extract_title(page5) == ''
|
||||
|
||||
// Test case 6: Title with content immediately after hashes
|
||||
page6 := "##TitleWithoutSpace"
|
||||
assert extract_title(page6) == "TitleWithoutSpace"
|
||||
page6 := '##TitleWithoutSpace'
|
||||
assert extract_title(page6) == 'TitleWithoutSpace'
|
||||
}
|
||||
|
||||
fn test_set_titles() {
|
||||
// Test case 1: Default maxnr (3)
|
||||
page1 := "
|
||||
page1 := '
|
||||
# First Section
|
||||
Some content.
|
||||
## Subsection A
|
||||
@@ -48,8 +47,8 @@ Even more content.
|
||||
## Subsection B
|
||||
### Sub-subsection B.1
|
||||
#### Sub-subsection B.1.1 (should not be numbered)
|
||||
"
|
||||
expected1 := "
|
||||
'
|
||||
expected1 := '
|
||||
# 1. First Section
|
||||
Some content.
|
||||
## 1.1. Subsection A
|
||||
@@ -59,35 +58,35 @@ Even more content.
|
||||
## 1.2. Subsection B
|
||||
### 1.2.1. Sub-subsection B.1
|
||||
#### Sub-subsection B.1.1 (should not be numbered)
|
||||
"
|
||||
'
|
||||
assert set_titles(page1, 3) == expected1
|
||||
|
||||
// Test case 2: maxnr = 2
|
||||
page2 := "
|
||||
page2 := '
|
||||
# Top Level
|
||||
## Second Level
|
||||
### Third Level (should not be numbered)
|
||||
"
|
||||
expected2 := "
|
||||
'
|
||||
expected2 := '
|
||||
# 1. Top Level
|
||||
## 1.1. Second Level
|
||||
### Third Level (should not be numbered)
|
||||
"
|
||||
'
|
||||
assert set_titles(page2, 2) == expected2
|
||||
|
||||
// Test case 3: No titles
|
||||
page3 := "
|
||||
page3 := '
|
||||
Plain text document.
|
||||
No titles to renumber.
|
||||
"
|
||||
expected3 := "
|
||||
'
|
||||
expected3 := '
|
||||
Plain text document.
|
||||
No titles to renumber.
|
||||
"
|
||||
'
|
||||
assert set_titles(page3, 3) == expected3
|
||||
|
||||
// Test case 4: Mixed content and reset of numbering
|
||||
page4 := "
|
||||
page4 := '
|
||||
# Chapter One
|
||||
Text.
|
||||
## Section 1.1
|
||||
@@ -98,8 +97,8 @@ Text.
|
||||
Text.
|
||||
## Section 2.1
|
||||
Text.
|
||||
"
|
||||
expected4 := "
|
||||
'
|
||||
expected4 := '
|
||||
# 1. Chapter One
|
||||
Text.
|
||||
## 1.1. Section 1.1
|
||||
@@ -110,55 +109,55 @@ Text.
|
||||
Text.
|
||||
## 2.1. Section 2.1
|
||||
Text.
|
||||
"
|
||||
'
|
||||
assert set_titles(page4, 3) == expected4
|
||||
|
||||
// Test case 5: Titles with existing numbers (should be overwritten)
|
||||
page5 := "
|
||||
page5 := '
|
||||
# 5. Old Chapter
|
||||
## 1.2. Old Section
|
||||
"
|
||||
expected5 := "
|
||||
'
|
||||
expected5 := '
|
||||
# 1. Old Chapter
|
||||
## 1.1. Old Section
|
||||
"
|
||||
'
|
||||
assert set_titles(page5, 3) == expected5
|
||||
|
||||
// Test case 6: First heading is H2, should be treated as H1
|
||||
page6 := "
|
||||
page6 := '
|
||||
## Core Architectural Principles
|
||||
Some text.
|
||||
### Sub-principle 1
|
||||
### Sub-principle 2
|
||||
## Core Architectural Principles 2
|
||||
#### Sub-principle 44
|
||||
"
|
||||
expected6 := "
|
||||
'
|
||||
expected6 := '
|
||||
# 1. Core Architectural Principles
|
||||
Some text.
|
||||
## 1.1. Sub-principle 1
|
||||
## 1.2. Sub-principle 2
|
||||
# 2. Core Architectural Principles 2
|
||||
### 2.1.1. Sub-principle 44
|
||||
"
|
||||
'
|
||||
assert set_titles(page6, 3) == expected6
|
||||
|
||||
// Test case 7: maxnr = 0, no numbering but still shift headings
|
||||
page7 := "
|
||||
page7 := '
|
||||
## Core Architectural Principles
|
||||
Some text.
|
||||
### Sub-principle 1
|
||||
### Sub-principle 2
|
||||
## Core Architectural Principles 2
|
||||
#### Sub-principle 44
|
||||
"
|
||||
expected7 := "
|
||||
'
|
||||
expected7 := '
|
||||
# Core Architectural Principles
|
||||
Some text.
|
||||
## Sub-principle 1
|
||||
## Sub-principle 2
|
||||
# Core Architectural Principles 2
|
||||
### Sub-principle 44
|
||||
"
|
||||
'
|
||||
assert set_titles(page7, 0) == expected7
|
||||
}
|
||||
}
|
||||
|
||||
@@ -51,12 +51,12 @@ pub fn (params &Params) get_int(key string) !int {
|
||||
|
||||
pub fn (params &Params) get_float(key string) !f64 {
|
||||
mut valuestr := params.get(key)!
|
||||
if valuestr.contains("%"){
|
||||
if valuestr.contains('%') {
|
||||
valuestr = valuestr.replace('%', '')
|
||||
mut vs:=strconv.atof64(valuestr) or {
|
||||
mut vs := strconv.atof64(valuestr) or {
|
||||
return error('Parameter ${key} = ${valuestr} is not a valid 64-bit float')
|
||||
}
|
||||
vs=vs/100
|
||||
vs = vs / 100
|
||||
return vs
|
||||
}
|
||||
return strconv.atof64(valuestr) or {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
module gittools
|
||||
|
||||
import freeflowuniverse.herolib.osal.core as osal.sshagent
|
||||
import freeflowuniverse.herolib.osal.core.sshagent
|
||||
import freeflowuniverse.herolib.core.pathlib
|
||||
import freeflowuniverse.herolib.ui.console
|
||||
import freeflowuniverse.herolib.develop.vscode
|
||||
|
||||
@@ -3,7 +3,7 @@ module base
|
||||
import freeflowuniverse.herolib.osal.core as osal
|
||||
import freeflowuniverse.herolib.core.pathlib
|
||||
import freeflowuniverse.herolib.ui.console
|
||||
import freeflowuniverse.herolib.osal.core as osal.startupmanager
|
||||
import freeflowuniverse.herolib.osal.core.startupmanager
|
||||
import freeflowuniverse.herolib.core
|
||||
import time
|
||||
import os
|
||||
|
||||
@@ -4,8 +4,8 @@ import freeflowuniverse.herolib.osal.core as osal
|
||||
import freeflowuniverse.herolib.ui.console
|
||||
import freeflowuniverse.herolib.core.texttools
|
||||
import freeflowuniverse.herolib.core.pathlib
|
||||
import freeflowuniverse.herolib.osal.core as osal.systemd
|
||||
import freeflowuniverse.herolib.osal.core as osal.zinit
|
||||
import freeflowuniverse.herolib.osal.core.systemd
|
||||
import freeflowuniverse.herolib.osal.core.zinit
|
||||
import freeflowuniverse.herolib.installers.ulist
|
||||
import freeflowuniverse.herolib.installers.lang.golang
|
||||
import freeflowuniverse.herolib.installers.lang.rust
|
||||
|
||||
@@ -3,8 +3,8 @@ module cometbft
|
||||
import freeflowuniverse.herolib.core.base
|
||||
import freeflowuniverse.herolib.core.playbook
|
||||
import freeflowuniverse.herolib.ui.console
|
||||
import freeflowuniverse.herolib.osal.core as osal.startupmanager
|
||||
import freeflowuniverse.herolib.osal.core as osal.zinit
|
||||
import freeflowuniverse.herolib.osal.core.startupmanager
|
||||
import freeflowuniverse.herolib.osal.core.zinit
|
||||
import time
|
||||
|
||||
__global (
|
||||
|
||||
@@ -2,7 +2,7 @@ module meilisearch_installer
|
||||
|
||||
import freeflowuniverse.herolib.osal.core as osal
|
||||
import freeflowuniverse.herolib.ui.console
|
||||
import freeflowuniverse.herolib.osal.core as osal.zinit
|
||||
import freeflowuniverse.herolib.osal.core.zinit
|
||||
import freeflowuniverse.herolib.installers.ulist
|
||||
import freeflowuniverse.herolib.core.httpconnection
|
||||
import freeflowuniverse.herolib.core.texttools
|
||||
|
||||
@@ -3,8 +3,8 @@ module meilisearch_installer
|
||||
import freeflowuniverse.herolib.core.base
|
||||
import freeflowuniverse.herolib.core.playbook
|
||||
import freeflowuniverse.herolib.ui.console
|
||||
import freeflowuniverse.herolib.osal.core as osal.startupmanager
|
||||
import freeflowuniverse.herolib.osal.core as osal.zinit
|
||||
import freeflowuniverse.herolib.osal.core.startupmanager
|
||||
import freeflowuniverse.herolib.osal.core.zinit
|
||||
import time
|
||||
|
||||
__global (
|
||||
|
||||
@@ -3,7 +3,7 @@ module postgresql
|
||||
import freeflowuniverse.herolib.osal.core as osal
|
||||
import freeflowuniverse.herolib.ui.console
|
||||
import freeflowuniverse.herolib.installers.virt.podman as podman_installer
|
||||
import freeflowuniverse.herolib.osal.core as osal.zinit
|
||||
import freeflowuniverse.herolib.osal.core.zinit
|
||||
import freeflowuniverse.herolib.installers.ulist
|
||||
import os
|
||||
|
||||
|
||||
@@ -3,8 +3,8 @@ module postgresql
|
||||
import freeflowuniverse.herolib.core.base
|
||||
import freeflowuniverse.herolib.core.playbook
|
||||
import freeflowuniverse.herolib.ui.console
|
||||
import freeflowuniverse.herolib.osal.core as osal.startupmanager
|
||||
import freeflowuniverse.herolib.osal.core as osal.zinit
|
||||
import freeflowuniverse.herolib.osal.core.startupmanager
|
||||
import freeflowuniverse.herolib.osal.core.zinit
|
||||
import time
|
||||
|
||||
__global (
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
module qdrant_installer
|
||||
|
||||
import freeflowuniverse.herolib.ui.console
|
||||
import freeflowuniverse.herolib.osal.core as osal.zinit
|
||||
import freeflowuniverse.herolib.osal.core.zinit
|
||||
import freeflowuniverse.herolib.installers.ulist
|
||||
import os
|
||||
|
||||
|
||||
@@ -3,8 +3,8 @@ module qdrant_installer
|
||||
import freeflowuniverse.herolib.core.base
|
||||
import freeflowuniverse.herolib.core.playbook
|
||||
import freeflowuniverse.herolib.ui.console
|
||||
import freeflowuniverse.herolib.osal.core as osal.startupmanager
|
||||
import freeflowuniverse.herolib.osal.core as osal.zinit
|
||||
import freeflowuniverse.herolib.osal.core.startupmanager
|
||||
import freeflowuniverse.herolib.osal.core.zinit
|
||||
import time
|
||||
|
||||
__global (
|
||||
|
||||
@@ -3,7 +3,7 @@ module zerodb
|
||||
import freeflowuniverse.herolib.osal.core as osal
|
||||
import freeflowuniverse.herolib.ui.console
|
||||
import freeflowuniverse.herolib.core
|
||||
import freeflowuniverse.herolib.osal.core as osal.zinit
|
||||
import freeflowuniverse.herolib.osal.core.zinit
|
||||
import freeflowuniverse.herolib.installers.ulist
|
||||
import freeflowuniverse.herolib.develop.gittools
|
||||
import freeflowuniverse.herolib.installers.base
|
||||
|
||||
@@ -3,8 +3,8 @@ module zerodb
|
||||
import freeflowuniverse.herolib.core.base
|
||||
import freeflowuniverse.herolib.core.playbook
|
||||
import freeflowuniverse.herolib.ui.console
|
||||
import freeflowuniverse.herolib.osal.core as osal.startupmanager
|
||||
import freeflowuniverse.herolib.osal.core as osal.zinit
|
||||
import freeflowuniverse.herolib.osal.core.startupmanager
|
||||
import freeflowuniverse.herolib.osal.core.zinit
|
||||
import time
|
||||
|
||||
__global (
|
||||
|
||||
@@ -4,8 +4,8 @@ import freeflowuniverse.herolib.osal.core as osal
|
||||
import freeflowuniverse.herolib.ui.console
|
||||
import freeflowuniverse.herolib.core.texttools
|
||||
import freeflowuniverse.herolib.core.pathlib
|
||||
import freeflowuniverse.herolib.osal.core as osal.systemd
|
||||
import freeflowuniverse.herolib.osal.core as osal.zinit
|
||||
import freeflowuniverse.herolib.osal.core.systemd
|
||||
import freeflowuniverse.herolib.osal.core.zinit
|
||||
import freeflowuniverse.herolib.installers.ulist
|
||||
import freeflowuniverse.herolib.installers.lang.golang
|
||||
import freeflowuniverse.herolib.installers.lang.rust
|
||||
|
||||
@@ -2,8 +2,8 @@ module zerofs
|
||||
|
||||
import freeflowuniverse.herolib.core.playbook
|
||||
import freeflowuniverse.herolib.ui.console
|
||||
import freeflowuniverse.herolib.osal.core as osal.startupmanager
|
||||
import freeflowuniverse.herolib.osal.core as osal.zinit
|
||||
import freeflowuniverse.herolib.osal.core.startupmanager
|
||||
import freeflowuniverse.herolib.osal.core.zinit
|
||||
import time
|
||||
|
||||
__global (
|
||||
|
||||
@@ -6,7 +6,7 @@ import freeflowuniverse.herolib.core.texttools
|
||||
import freeflowuniverse.herolib.core.pathlib
|
||||
import freeflowuniverse.herolib.core
|
||||
import freeflowuniverse.herolib.develop.gittools
|
||||
import freeflowuniverse.herolib.osal.core as osal.zinit
|
||||
import freeflowuniverse.herolib.osal.core.zinit
|
||||
import freeflowuniverse.herolib.installers.ulist
|
||||
import freeflowuniverse.herolib.core.httpconnection
|
||||
import freeflowuniverse.herolib.installers.lang.golang
|
||||
|
||||
@@ -3,8 +3,8 @@ module coredns
|
||||
import freeflowuniverse.herolib.core.base
|
||||
import freeflowuniverse.herolib.core.playbook
|
||||
import freeflowuniverse.herolib.ui.console
|
||||
import freeflowuniverse.herolib.osal.core as osal.startupmanager
|
||||
import freeflowuniverse.herolib.osal.core as osal.zinit
|
||||
import freeflowuniverse.herolib.osal.core.startupmanager
|
||||
import freeflowuniverse.herolib.osal.core.zinit
|
||||
import time
|
||||
|
||||
__global (
|
||||
|
||||
@@ -4,8 +4,8 @@ import freeflowuniverse.herolib.osal.core as osal
|
||||
import freeflowuniverse.herolib.ui.console
|
||||
import freeflowuniverse.herolib.core.texttools
|
||||
import freeflowuniverse.herolib.core.pathlib
|
||||
import freeflowuniverse.herolib.osal.core as osal.systemd
|
||||
import freeflowuniverse.herolib.osal.core as osal.zinit
|
||||
import freeflowuniverse.herolib.osal.core.systemd
|
||||
import freeflowuniverse.herolib.osal.core.zinit
|
||||
import freeflowuniverse.herolib.installers.ulist
|
||||
import freeflowuniverse.herolib.installers.lang.golang
|
||||
import freeflowuniverse.herolib.installers.lang.rust
|
||||
|
||||
@@ -3,8 +3,8 @@ module dify
|
||||
import freeflowuniverse.herolib.core.base
|
||||
import freeflowuniverse.herolib.core.playbook
|
||||
import freeflowuniverse.herolib.ui.console
|
||||
import freeflowuniverse.herolib.osal.core as osal.startupmanager
|
||||
import freeflowuniverse.herolib.osal.core as osal.zinit
|
||||
import freeflowuniverse.herolib.osal.core.startupmanager
|
||||
import freeflowuniverse.herolib.osal.core.zinit
|
||||
import time
|
||||
|
||||
__global (
|
||||
|
||||
@@ -5,7 +5,7 @@ import freeflowuniverse.herolib.core
|
||||
import freeflowuniverse.herolib.core.texttools
|
||||
import freeflowuniverse.herolib.ui.console
|
||||
import freeflowuniverse.herolib.installers.ulist
|
||||
import freeflowuniverse.herolib.osal.core as osal.zinit
|
||||
import freeflowuniverse.herolib.osal.core.zinit
|
||||
import os
|
||||
|
||||
fn installed() !bool {
|
||||
|
||||
@@ -3,8 +3,8 @@ module gitea
|
||||
import freeflowuniverse.herolib.core.base
|
||||
import freeflowuniverse.herolib.core.playbook
|
||||
import freeflowuniverse.herolib.ui.console
|
||||
import freeflowuniverse.herolib.osal.core as osal.startupmanager
|
||||
import freeflowuniverse.herolib.osal.core as osal.zinit
|
||||
import freeflowuniverse.herolib.osal.core.startupmanager
|
||||
import freeflowuniverse.herolib.osal.core.zinit
|
||||
import time
|
||||
|
||||
__global (
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
module livekit
|
||||
|
||||
import freeflowuniverse.herolib.osal.core as osal
|
||||
import freeflowuniverse.herolib.osal.core as osal.zinit
|
||||
import freeflowuniverse.herolib.osal.core.zinit
|
||||
import freeflowuniverse.herolib.ui.console
|
||||
import freeflowuniverse.herolib.core.texttools
|
||||
import freeflowuniverse.herolib.installers.ulist
|
||||
|
||||
@@ -3,8 +3,8 @@ module livekit
|
||||
import freeflowuniverse.herolib.core.base
|
||||
import freeflowuniverse.herolib.core.playbook
|
||||
import freeflowuniverse.herolib.ui.console
|
||||
import freeflowuniverse.herolib.osal.core as osal.startupmanager
|
||||
import freeflowuniverse.herolib.osal.core as osal.zinit
|
||||
import freeflowuniverse.herolib.osal.core.startupmanager
|
||||
import freeflowuniverse.herolib.osal.core.zinit
|
||||
import time
|
||||
|
||||
__global (
|
||||
|
||||
@@ -2,8 +2,8 @@ module screen
|
||||
|
||||
import freeflowuniverse.herolib.core.playbook
|
||||
import freeflowuniverse.herolib.ui.console
|
||||
import freeflowuniverse.herolib.osal.core as osal.startupmanager
|
||||
import freeflowuniverse.herolib.osal.core as osal.zinit
|
||||
import freeflowuniverse.herolib.osal.core.startupmanager
|
||||
import freeflowuniverse.herolib.osal.core.zinit
|
||||
|
||||
__global (
|
||||
screen_global map[string]&Screen
|
||||
|
||||
@@ -5,8 +5,8 @@ import freeflowuniverse.herolib.ui.console
|
||||
import freeflowuniverse.herolib.core.texttools
|
||||
import freeflowuniverse.herolib.develop.gittools
|
||||
import freeflowuniverse.herolib.core
|
||||
import freeflowuniverse.herolib.osal.core as osal.systemd
|
||||
import freeflowuniverse.herolib.osal.core as osal.zinit as zinit_module
|
||||
import freeflowuniverse.herolib.osal.core.systemd
|
||||
import freeflowuniverse.herolib.osal.core.zinit as zinit_module
|
||||
import freeflowuniverse.herolib.installers.ulist
|
||||
import os
|
||||
|
||||
|
||||
@@ -2,8 +2,8 @@ module zinit_installer
|
||||
|
||||
import freeflowuniverse.herolib.core.playbook
|
||||
import freeflowuniverse.herolib.ui.console
|
||||
import freeflowuniverse.herolib.osal.core as osal.startupmanager
|
||||
import freeflowuniverse.herolib.osal.core as osal.zinit
|
||||
import freeflowuniverse.herolib.osal.core.startupmanager
|
||||
import freeflowuniverse.herolib.osal.core.zinit
|
||||
import time
|
||||
|
||||
__global (
|
||||
|
||||
@@ -2,8 +2,8 @@ module golang
|
||||
|
||||
import freeflowuniverse.herolib.core.playbook
|
||||
import freeflowuniverse.herolib.ui.console
|
||||
import freeflowuniverse.herolib.osal.core as osal.startupmanager
|
||||
import freeflowuniverse.herolib.osal.core as osal.zinit
|
||||
import freeflowuniverse.herolib.osal.core.startupmanager
|
||||
import freeflowuniverse.herolib.osal.core.zinit
|
||||
|
||||
__global (
|
||||
golang_global map[string]&GolangInstaller
|
||||
|
||||
@@ -2,8 +2,8 @@ module nodejs
|
||||
|
||||
import freeflowuniverse.herolib.core.playbook
|
||||
import freeflowuniverse.herolib.ui.console
|
||||
import freeflowuniverse.herolib.osal.core as osal.startupmanager
|
||||
import freeflowuniverse.herolib.osal.core as osal.zinit
|
||||
import freeflowuniverse.herolib.osal.core.startupmanager
|
||||
import freeflowuniverse.herolib.osal.core.zinit
|
||||
|
||||
__global (
|
||||
nodejs_global map[string]&NodeJS
|
||||
|
||||
@@ -2,8 +2,8 @@ module python
|
||||
|
||||
import freeflowuniverse.herolib.core.playbook
|
||||
import freeflowuniverse.herolib.ui.console
|
||||
import freeflowuniverse.herolib.osal.core as osal.startupmanager
|
||||
import freeflowuniverse.herolib.osal.core as osal.zinit
|
||||
import freeflowuniverse.herolib.osal.core.startupmanager
|
||||
import freeflowuniverse.herolib.osal.core.zinit
|
||||
|
||||
__global (
|
||||
python_global map[string]&Python
|
||||
|
||||
@@ -2,8 +2,8 @@ module rust
|
||||
|
||||
import freeflowuniverse.herolib.core.playbook
|
||||
import freeflowuniverse.herolib.ui.console
|
||||
import freeflowuniverse.herolib.osal.core as osal.startupmanager
|
||||
import freeflowuniverse.herolib.osal.core as osal.zinit
|
||||
import freeflowuniverse.herolib.osal.core.startupmanager
|
||||
import freeflowuniverse.herolib.osal.core.zinit
|
||||
|
||||
__global (
|
||||
rust_global map[string]&RustInstaller
|
||||
|
||||
@@ -8,7 +8,7 @@ import freeflowuniverse.herolib.core.pathlib
|
||||
import freeflowuniverse.herolib.installers.infra.zinit_installer
|
||||
import freeflowuniverse.herolib.clients.mycelium
|
||||
import freeflowuniverse.herolib.develop.gittools
|
||||
import freeflowuniverse.herolib.osal.core as osal.zinit
|
||||
import freeflowuniverse.herolib.osal.core.zinit
|
||||
import freeflowuniverse.herolib.installers.ulist
|
||||
import freeflowuniverse.herolib.installers.lang.rust
|
||||
import os
|
||||
|
||||
@@ -3,8 +3,8 @@ module mycelium_installer
|
||||
import freeflowuniverse.herolib.core.base
|
||||
import freeflowuniverse.herolib.core.playbook
|
||||
import freeflowuniverse.herolib.ui.console
|
||||
import freeflowuniverse.herolib.osal.core as osal.startupmanager
|
||||
import freeflowuniverse.herolib.osal.core as osal.zinit
|
||||
import freeflowuniverse.herolib.osal.core.startupmanager
|
||||
import freeflowuniverse.herolib.osal.core.zinit
|
||||
import time
|
||||
|
||||
__global (
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
module mycelium_installer
|
||||
|
||||
import freeflowuniverse.herolib.data.encoderhero
|
||||
import freeflowuniverse.herolib.osal.core as osal.tun
|
||||
import freeflowuniverse.herolib.osal.core.tun
|
||||
|
||||
pub const version = '0.6.1'
|
||||
const singleton = true
|
||||
|
||||
@@ -2,8 +2,8 @@ module wireguard_installer
|
||||
|
||||
import freeflowuniverse.herolib.core.playbook
|
||||
import freeflowuniverse.herolib.ui.console
|
||||
import freeflowuniverse.herolib.osal.core as osal.startupmanager
|
||||
import freeflowuniverse.herolib.osal.core as osal.zinit
|
||||
import freeflowuniverse.herolib.osal.core.startupmanager
|
||||
import freeflowuniverse.herolib.osal.core.zinit
|
||||
|
||||
__global (
|
||||
wireguard_installer_global map[string]&WireGuard
|
||||
|
||||
@@ -3,7 +3,7 @@ module yggdrasil
|
||||
import freeflowuniverse.herolib.osal.core as osal
|
||||
import freeflowuniverse.herolib.installers.lang.golang
|
||||
import freeflowuniverse.herolib.ui.console
|
||||
import freeflowuniverse.herolib.osal.core as osal.screen
|
||||
import freeflowuniverse.herolib.osal.core.screen
|
||||
import freeflowuniverse.herolib.ui
|
||||
import freeflowuniverse.herolib.develop.gittools
|
||||
import os
|
||||
|
||||
@@ -4,8 +4,8 @@ import freeflowuniverse.herolib.osal.core as osal
|
||||
import freeflowuniverse.herolib.ui.console
|
||||
import freeflowuniverse.herolib.core.texttools
|
||||
import freeflowuniverse.herolib.core.pathlib
|
||||
import freeflowuniverse.herolib.osal.core as osal.systemd
|
||||
import freeflowuniverse.herolib.osal.core as osal.zinit
|
||||
import freeflowuniverse.herolib.osal.core.systemd
|
||||
import freeflowuniverse.herolib.osal.core.zinit
|
||||
import freeflowuniverse.herolib.installers.ulist
|
||||
import freeflowuniverse.herolib.installers.lang.golang
|
||||
import freeflowuniverse.herolib.installers.lang.rust
|
||||
|
||||
@@ -2,8 +2,8 @@ module yggdrasil
|
||||
|
||||
import freeflowuniverse.herolib.core.playbook
|
||||
import freeflowuniverse.herolib.ui.console
|
||||
import freeflowuniverse.herolib.osal.core as osal.startupmanager
|
||||
import freeflowuniverse.herolib.osal.core as osal.zinit
|
||||
import freeflowuniverse.herolib.osal.core.startupmanager
|
||||
import freeflowuniverse.herolib.osal.core.zinit
|
||||
import time
|
||||
|
||||
__global (
|
||||
|
||||
@@ -2,7 +2,7 @@ module actrunner
|
||||
|
||||
import freeflowuniverse.herolib.ui.console
|
||||
import freeflowuniverse.herolib.core.texttools
|
||||
import freeflowuniverse.herolib.osal.core as osal.zinit
|
||||
import freeflowuniverse.herolib.osal.core.zinit
|
||||
import freeflowuniverse.herolib.installers.ulist
|
||||
import freeflowuniverse.herolib.osal.core as osal
|
||||
import freeflowuniverse.herolib.core
|
||||
|
||||
@@ -2,8 +2,8 @@ module actrunner
|
||||
|
||||
import freeflowuniverse.herolib.core.playbook
|
||||
import freeflowuniverse.herolib.ui.console
|
||||
import freeflowuniverse.herolib.osal.core as osal.startupmanager
|
||||
import freeflowuniverse.herolib.osal.core as osal.zinit
|
||||
import freeflowuniverse.herolib.osal.core.startupmanager
|
||||
import freeflowuniverse.herolib.osal.core.zinit
|
||||
import time
|
||||
|
||||
__global (
|
||||
|
||||
@@ -2,8 +2,8 @@ module b2
|
||||
|
||||
import freeflowuniverse.herolib.core.playbook
|
||||
import freeflowuniverse.herolib.ui.console
|
||||
import freeflowuniverse.herolib.osal.core as osal.startupmanager
|
||||
import freeflowuniverse.herolib.osal.core as osal.zinit
|
||||
import freeflowuniverse.herolib.osal.core.startupmanager
|
||||
import freeflowuniverse.herolib.osal.core.zinit
|
||||
|
||||
__global (
|
||||
b2_global map[string]&BackBase
|
||||
|
||||
@@ -7,7 +7,7 @@ import freeflowuniverse.herolib.core
|
||||
import freeflowuniverse.herolib.core.httpconnection
|
||||
import freeflowuniverse.herolib.installers.ulist
|
||||
// import freeflowuniverse.herolib.develop.gittools
|
||||
import freeflowuniverse.herolib.osal.core as osal.zinit
|
||||
import freeflowuniverse.herolib.osal.core.zinit
|
||||
import os
|
||||
|
||||
fn startupcmd() ![]zinit.ZProcessNewArgs {
|
||||
|
||||
@@ -3,8 +3,8 @@ module daguserver
|
||||
import freeflowuniverse.herolib.core.base
|
||||
import freeflowuniverse.herolib.core.playbook
|
||||
import freeflowuniverse.herolib.ui.console
|
||||
import freeflowuniverse.herolib.osal.core as osal.startupmanager
|
||||
import freeflowuniverse.herolib.osal.core as osal.zinit
|
||||
import freeflowuniverse.herolib.osal.core.startupmanager
|
||||
import freeflowuniverse.herolib.osal.core.zinit
|
||||
import time
|
||||
|
||||
__global (
|
||||
|
||||
@@ -4,8 +4,8 @@ import freeflowuniverse.herolib.osal.core as osal
|
||||
import freeflowuniverse.herolib.ui.console
|
||||
import freeflowuniverse.herolib.core.texttools
|
||||
import freeflowuniverse.herolib.core.pathlib
|
||||
import freeflowuniverse.herolib.osal.core as osal.systemd
|
||||
import freeflowuniverse.herolib.osal.core as osal.zinit
|
||||
import freeflowuniverse.herolib.osal.core.systemd
|
||||
import freeflowuniverse.herolib.osal.core.zinit
|
||||
import freeflowuniverse.herolib.installers.ulist
|
||||
import freeflowuniverse.herolib.installers.lang.golang
|
||||
import freeflowuniverse.herolib.installers.lang.rust
|
||||
|
||||
@@ -2,8 +2,8 @@ module fungistor
|
||||
|
||||
import freeflowuniverse.herolib.core.playbook
|
||||
import freeflowuniverse.herolib.ui.console
|
||||
import freeflowuniverse.herolib.osal.core as osal.startupmanager
|
||||
import freeflowuniverse.herolib.osal.core as osal.zinit
|
||||
import freeflowuniverse.herolib.osal.core.startupmanager
|
||||
import freeflowuniverse.herolib.osal.core.zinit
|
||||
import time
|
||||
|
||||
__global (
|
||||
|
||||
@@ -4,7 +4,7 @@ import freeflowuniverse.herolib.osal.core as osal
|
||||
import freeflowuniverse.herolib.ui.console
|
||||
import freeflowuniverse.herolib.core.texttools
|
||||
import freeflowuniverse.herolib.core
|
||||
import freeflowuniverse.herolib.osal.core as osal.zinit
|
||||
import freeflowuniverse.herolib.osal.core.zinit
|
||||
import freeflowuniverse.herolib.installers.ulist
|
||||
import freeflowuniverse.herolib.core.httpconnection
|
||||
import os
|
||||
|
||||
@@ -3,8 +3,8 @@ module garage_s3
|
||||
import freeflowuniverse.herolib.core.base
|
||||
import freeflowuniverse.herolib.core.playbook
|
||||
import freeflowuniverse.herolib.ui.console
|
||||
import freeflowuniverse.herolib.osal.core as osal.startupmanager
|
||||
import freeflowuniverse.herolib.osal.core as osal.zinit
|
||||
import freeflowuniverse.herolib.osal.core.startupmanager
|
||||
import freeflowuniverse.herolib.osal.core.zinit
|
||||
import time
|
||||
|
||||
__global (
|
||||
|
||||
@@ -6,7 +6,7 @@ import freeflowuniverse.herolib.ui.console
|
||||
import freeflowuniverse.herolib.core.texttools
|
||||
import freeflowuniverse.herolib.core.pathlib
|
||||
import freeflowuniverse.herolib.core.httpconnection
|
||||
import freeflowuniverse.herolib.osal.core as osal.startupmanager
|
||||
import freeflowuniverse.herolib.osal.core.startupmanager
|
||||
import os
|
||||
import time
|
||||
|
||||
|
||||
@@ -4,8 +4,8 @@ import freeflowuniverse.herolib.osal.core as osal
|
||||
import freeflowuniverse.herolib.ui.console
|
||||
import freeflowuniverse.herolib.core.texttools
|
||||
import freeflowuniverse.herolib.core.pathlib
|
||||
import freeflowuniverse.herolib.osal.core as osal.systemd
|
||||
import freeflowuniverse.herolib.osal.core as osal.zinit
|
||||
import freeflowuniverse.herolib.osal.core.systemd
|
||||
import freeflowuniverse.herolib.osal.core.zinit
|
||||
import freeflowuniverse.herolib.installers.ulist
|
||||
import freeflowuniverse.herolib.installers.lang.golang
|
||||
import freeflowuniverse.herolib.installers.lang.rust
|
||||
|
||||
@@ -2,8 +2,8 @@ module grafana
|
||||
|
||||
import freeflowuniverse.herolib.core.playbook
|
||||
import freeflowuniverse.herolib.ui.console
|
||||
import freeflowuniverse.herolib.osal.core as osal.startupmanager
|
||||
import freeflowuniverse.herolib.osal.core as osal.zinit
|
||||
import freeflowuniverse.herolib.osal.core.startupmanager
|
||||
import freeflowuniverse.herolib.osal.core.zinit
|
||||
import time
|
||||
|
||||
__global (
|
||||
|
||||
@@ -6,7 +6,7 @@ import freeflowuniverse.herolib.ui.console
|
||||
import freeflowuniverse.herolib.core.texttools
|
||||
import freeflowuniverse.herolib.core.pathlib
|
||||
import freeflowuniverse.herolib.core.httpconnection
|
||||
import freeflowuniverse.herolib.osal.core as osal.startupmanager
|
||||
import freeflowuniverse.herolib.osal.core.startupmanager
|
||||
import os
|
||||
import time
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ import freeflowuniverse.herolib.ui.console
|
||||
import freeflowuniverse.herolib.core.texttools
|
||||
import freeflowuniverse.herolib.core.pathlib
|
||||
import freeflowuniverse.herolib.core.httpconnection
|
||||
import freeflowuniverse.herolib.osal.core as osal.startupmanager
|
||||
import freeflowuniverse.herolib.osal.core.startupmanager
|
||||
import os
|
||||
import time
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ import freeflowuniverse.herolib.ui.console
|
||||
import freeflowuniverse.herolib.core.texttools
|
||||
import freeflowuniverse.herolib.core.pathlib
|
||||
import freeflowuniverse.herolib.core.httpconnection
|
||||
import freeflowuniverse.herolib.osal.core as osal.startupmanager
|
||||
import freeflowuniverse.herolib.osal.core.startupmanager
|
||||
import os
|
||||
import time
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ import freeflowuniverse.herolib.ui.console
|
||||
import freeflowuniverse.herolib.core.texttools
|
||||
import freeflowuniverse.herolib.core.pathlib
|
||||
import freeflowuniverse.herolib.core.httpconnection
|
||||
import freeflowuniverse.herolib.osal.core as osal.startupmanager
|
||||
import freeflowuniverse.herolib.osal.core.startupmanager
|
||||
import os
|
||||
import time
|
||||
|
||||
|
||||
@@ -4,8 +4,8 @@ import freeflowuniverse.herolib.osal.core as osal
|
||||
import freeflowuniverse.herolib.ui.console
|
||||
import freeflowuniverse.herolib.core.texttools
|
||||
import freeflowuniverse.herolib.core.pathlib
|
||||
import freeflowuniverse.herolib.osal.core as osal.systemd
|
||||
import freeflowuniverse.herolib.osal.core as osal.zinit
|
||||
import freeflowuniverse.herolib.osal.core.systemd
|
||||
import freeflowuniverse.herolib.osal.core.zinit
|
||||
import freeflowuniverse.herolib.installers.ulist
|
||||
import freeflowuniverse.herolib.installers.lang.golang
|
||||
import freeflowuniverse.herolib.installers.lang.rust
|
||||
|
||||
@@ -2,8 +2,8 @@ module prometheus
|
||||
|
||||
import freeflowuniverse.herolib.core.playbook
|
||||
import freeflowuniverse.herolib.ui.console
|
||||
import freeflowuniverse.herolib.osal.core as osal.startupmanager
|
||||
import freeflowuniverse.herolib.osal.core as osal.zinit
|
||||
import freeflowuniverse.herolib.osal.core.startupmanager
|
||||
import freeflowuniverse.herolib.osal.core.zinit
|
||||
import time
|
||||
|
||||
__global (
|
||||
|
||||
@@ -5,7 +5,7 @@ import freeflowuniverse.herolib.ui.console
|
||||
import freeflowuniverse.herolib.core.texttools
|
||||
import freeflowuniverse.herolib.core.pathlib
|
||||
import freeflowuniverse.herolib.core.httpconnection
|
||||
import freeflowuniverse.herolib.osal.core as osal.startupmanager
|
||||
import freeflowuniverse.herolib.osal.core.startupmanager
|
||||
import os
|
||||
import time
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ import freeflowuniverse.herolib.ui.console
|
||||
import freeflowuniverse.herolib.core.texttools
|
||||
import freeflowuniverse.herolib.core.pathlib
|
||||
import freeflowuniverse.herolib.core.httpconnection
|
||||
import freeflowuniverse.herolib.osal.core as osal.startupmanager
|
||||
import freeflowuniverse.herolib.osal.core.startupmanager
|
||||
import os
|
||||
import time
|
||||
|
||||
|
||||
@@ -3,8 +3,8 @@ module rclone
|
||||
import freeflowuniverse.herolib.core.base
|
||||
import freeflowuniverse.herolib.core.playbook
|
||||
import freeflowuniverse.herolib.ui.console
|
||||
import freeflowuniverse.herolib.osal.core as osal.startupmanager
|
||||
import freeflowuniverse.herolib.osal.core as osal.zinit
|
||||
import freeflowuniverse.herolib.osal.core.startupmanager
|
||||
import freeflowuniverse.herolib.osal.core.zinit
|
||||
|
||||
__global (
|
||||
rclone_global map[string]&RClone
|
||||
|
||||
@@ -4,8 +4,8 @@ import freeflowuniverse.herolib.osal.core as osal
|
||||
import freeflowuniverse.herolib.ui.console
|
||||
import freeflowuniverse.herolib.core.texttools
|
||||
import freeflowuniverse.herolib.core.pathlib
|
||||
import freeflowuniverse.herolib.osal.core as osal.systemd
|
||||
import freeflowuniverse.herolib.osal.core as osal.zinit
|
||||
import freeflowuniverse.herolib.osal.core.systemd
|
||||
import freeflowuniverse.herolib.osal.core.zinit
|
||||
import freeflowuniverse.herolib.installers.ulist
|
||||
import freeflowuniverse.herolib.installers.lang.golang
|
||||
import freeflowuniverse.herolib.installers.lang.rust
|
||||
|
||||
@@ -2,8 +2,8 @@ module restic
|
||||
|
||||
import freeflowuniverse.herolib.core.playbook
|
||||
import freeflowuniverse.herolib.ui.console
|
||||
import freeflowuniverse.herolib.osal.core as osal.startupmanager
|
||||
import freeflowuniverse.herolib.osal.core as osal.zinit
|
||||
import freeflowuniverse.herolib.osal.core.startupmanager
|
||||
import freeflowuniverse.herolib.osal.core.zinit
|
||||
import time
|
||||
|
||||
__global (
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user