[ dbx ][ mobile ][ todo ][ common ][ Info ]
A place to start software projects. Mostly shell based, but heck, some python likely.
This idea originated with the manufacture table I started yesterday (6/9/15).
From my moleskin notebook today
I'm giving myself the hour to formulate the data structure for a shell function to support the data flow diagram:
name () { command args files
[ | command ... [ ... ]
> output ] ; }
input file ... | --> ( process ) --> | output file ...
^
|
( args ) . . . +
data structure := { table : name + { field } 1,m } 1,N
Since a function may invoke a list of piped commands, each with it's own arguments, some (many) of which are files.
A function is a list of commands
name files arguments
This is the principaal data-flow table:
name commands
name function arguments inputs outputs
For starters, the /rdb list format looks like a good start
file function
field name
field commands
file command
field name
field files
field arguments
file fragment
field name
field function
field arguments
field inputs # defaults to stdin
field outputs # defaults to stdout
Let's start with a simple function
function invest_rdb
{
set -- $(y_m_d $1)
trace_call $*
rdb_hdr $(invest_csv);
lastFid tocancsv $1 | grep -iv 'name/number' | cawk 'NF > 12' | tr , '\t'
}
#+BEGIN_SRC
type fragment
name investhdr
inpt NULL
func rdb_hdr
args $(invest_csv)
type fragment
name lastFidA
inpt $(lastFid)
func tocansv
args $(y_m_d $1)
type fragment
name grepname
args -iv 'name/number'
func grep
type fragment
name fGT12
func cawk
args 'NF > 12'
type fragment
name csv2tab
func tr
args , '\t'
type function
name position
func column
args account symbol quantity
inpt invest_collect.rdb
outp position.rdb
type function
name tocancsv
func sed
args -f tocancsv.sed
inpt EITHER
type fragment
name
func
args
type fragment
name
func
args
type fragment
name
func
args