<commit_before><commit_msg>Adding wrapping example<commit_after>// Example showing how you can wrap shell tasks in "static" tasks (with proper struct fields)

package main

import (
	"fmt"
	sci "github.com/samuell/scipipe"
)

func main() {
	fmt.Println("Starting ....")
	f := NewFooer()
	go f.Run()
	<-f.OutFoo
	fmt.Println("Done!")
}

// Components

type Fooer struct {
	InnerProc *sci.ShellProcess
	OutFoo    chan *sci.FileTarget
}

func NewFooer() *Fooer {
	innerFoo := sci.Shell("echo foo > {o:foo}")
	innerFoo.SetPathGenString("foo", "foo.txt")
	return &Fooer{
		InnerProc: innerFoo,
		OutFoo:    innerFoo.OutPorts["foo"],
	}
}

func (p *Fooer) Run() {
	p.InnerProc.Run()
}
{'fraction_non_alphanumeric': 0.15634218289085547, 'fraction_numerical': 0.0, 'mean_word_length': 4.105263157894737, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4978721', 'n_tokens_mistral': 281, 'n_tokens_neox': 256, 'n_words': 62}