Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

All Plugin Functions

All the functions available on this instance of nadi, are listed here.

Env Functions

PluginFunctionHelp
ATTRSfloat_divFloat Division (same as / operator)
ATTRSfloat_multFloat Multiplication (same as * operator)
ATTRSgetget the choosen attribute from Array or AttrMap
ATTRSis_nonecheck for none value
ATTRSkeyskeys of the attribute map
ATTRSnoneNone function that returns None
ATTRSparse_attrParse attribute from string
ATTRSparse_attrmapParse attribute map from string
ATTRSstrmapmap values from the attribute based on the given table
ATTRSvaluesvalues of the attribute map
COMMANDcommandRuns a command in terminal and returns attribute map
COMMANDset_shell_envSet environment variable in the shell
COMMANDshell_envGet environment variable from the shell
COREappendappend a value to an array
COREarraymake an array from the arguments
COREassert_eqAssert the two values are equal
COREassert_neqAssert the two values are not equal
COREassertAssert the condition is true
COREattrmapmake an attrmap from the arguments
COREconcatConcat the strings
COREcount_strGet a count of unique string values
COREcountCount the number of true values in the array
COREdayday from date/datetime
COREdrop_nanappend a value to an array
COREflattenflatten the given list of arrays into a single one
COREfloatmake a float from value
COREhourhour from time/datetime
COREinsertInsert a key and value to a attrmap
COREintmake an int from the value
COREisinfcheck if a float is +/- infinity
COREisnacheck if a float is nan
COREjsonformat the attribute as a json string
CORElenlength of an array or hashmap
COREmax_numMinimum of the variables
COREmaxMaximum of the variables
COREmin_numMinimum of the variables
COREminMinimum of the variables
COREminuteminute from time/datetime
COREmonthmonth from date/datetime
COREnanosecondnanosecond from time/datetime
COREnowget the current date time
COREprodProduct of the variables
CORErangeGenerate integer array, end is not included
COREsecondsecond from time/datetime
COREstr_quoteConvert string to double quoted form
COREstrmake a string from value
COREsumSum of the variables
COREtimediffget the current date time
COREto_attrmapmake an attrmap from a list of (k, v)
COREtodayget the current date
COREtype_nameType name of the arguments
COREunique_strGet a list of unique string values
COREuniqueGet a list of unique attribute values (only primitives)
COREyearyear from date/datetime
COREzipmake an array combining the arrays from arguments
DEBUGclipEcho the ----8<---- line for clipping syntax
DEBUGdebugPrint the args and kwargs on this function
DEBUGechoEcho the string to stdout or stderr
DEBUGsleepsleep for given number of milliseconds
FILESexistsChecks if the given path exists
FILESfrom_fileReads the file contents as string
FILESlineChecks if the given path exists
FILESto_fileWrites the string to the file
LOGICallcheck if all of the bool are true
LOGICandBoolean and
LOGICanycheck if any of the bool are true
LOGICeqEquality than check
LOGICgtGreater than check
LOGICifelseSimple if else condition
LOGICltLess than check
LOGICnotboolean not
LOGICorboolean or
MATHexpExponential
MATHlogLogarithm of a value, natural if base not given
MATHpowfFloat power
MATHpowiInteger power
MATHsqrtSquare Root
OPTIMUMuniform_crossing_overCrossing over of linear genes from two parent given uniform probability
RANDOMrandom_boolRandom bool given uniform probability
REGEXstr_countCount the number of matches of given pattern in the string
REGEXstr_filterFilter from the string list with only the values matching pattern
REGEXstr_find_allFind all the matches of the given pattern in the value
REGEXstr_findFind the given pattern in the value
REGEXstr_joinJoin the list of strings with the given string
REGEXstr_matchCheck if the given pattern matches the value or not
REGEXstr_replaceReplace the occurances of the given match
REGEXstr_splitSplit the string with the given pattern
RENDERrenderRender the template based on the node attributes
TStimeseriesbuild timeseries from timeline and series
TSts_timelineGet timeline of the timeseries as Series of strings
VISUALSimage
VISUALSsvg_open_multi
VISUALSsvg_open
VISUALSsvg_settingsGenerate the margins for the SVGs
csvcount_dataCount the number of data in a column from a CSV file
csvcount_usgs_yearsCount the number of data in a column from a CSV file
csvschemaList the columns in a CSV file
dsslist_catalogList the catalog of the dss file
dssload_series
dsssave_series
gisfeatures_countShow the fields in the GIS file layer as a list
gisfieldsShow the fields in the GIS file layer as a list
gislayersShow the layers of the GIS file as a list
gislineShow the layers of the GIS file as a list
gisvaluesReturns the values from a feature in a GIS file from its index
typstcompileconvert the typst content into pdf/svg/png
typstsvg2pdfconvert the svg content into pdf or png (or svg)

Node Functions

PluginFunctionHelp
ATTRSdel_attrsDelete attributes from the given node
ATTRSfirst_attrReturn the first Attribute that exists
ATTRSget_attrRetrive attribute
ATTRSget_attrsRetrive multiple attributes
ATTRShas_attrCheck if the attribute is present
ATTRSload_attrsLoads attrs from file for all nodes based on the given template
ATTRSload_toml_renderSet node attributes by loading a toml from rendered template
ATTRSprint_all_attrsPrint all attrs in a node
ATTRSprint_attrsPrint the given node attributes if present
ATTRSset_attrs_ifelseif else condition with multiple attributes
ATTRSset_attrs_renderSet node attributes based on string templates
ATTRSset_attrsSet node attributes
COMMANDcommandRun the given template as a shell command.
COMMANDrunRun the node as if it’s a command if inputs are changed
CONNmove_asideMove the node to the side so that its inputs go to the output
COREhas_outputNode has an output or not
COREinputs_attrGet attributes of the input nodes
COREinputs_countCount the number of input nodes in the node
COREinputs_mapGet attributes of the input nodes in map format
COREoutput_attrGet attributes of the output node
FILESexistsChecks if the given path exists when rendering the template
RENDERrenderRender the template based on the node attributes
SERIESset_seriesset the following series to the node
SERIESsr_countNumber of series in the node
SERIESsr_deleteDelete the series with the given name
SERIESsr_dtypeType name of the series
SERIESsr_fillFill the series with a value
SERIESsr_getget nth member of a series
SERIESsr_lenLength of the series
SERIESsr_listList all series in the node
SERIESsr_maxGet maximum value of the series
SERIESsr_meanMean of a series values
SERIESsr_minGet minimum value of the series
SERIESsr_sortSort an series
SERIESsr_sumSum of the series values
SERIESsr_to_arrayMake an array from the series if it’s complete
TSts_completeConvert the timeseries to complete if it doesn’t have gaps
TSts_countNumber of timeseries in the node
TSts_deleteDelete the timeseries with the given name
TSts_dtypeType name of the timeseries
TSts_lenLength of the timeseries
TSts_listList all timeseries in the node
TSts_printPrint the given timeseries values in csv format
VISUALSget_xy
VISUALSset_xy
csvcolumnread a single column from a CSV file
csvnode_nameExample Node function for the plugin

Network Functions

PluginFunctionHelp
ATTRSnodemapGenerate attribute map for the given attribute for the nodes
ATTRSset_attrs_renderSet network attributes based on string templates
ATTRSset_attrsSet network attributes
ATTRSset_node_attrsSet node attributes in a network using a attrmap or array
COMMANDcommandRun the given template as a shell command.
COMMANDparallelRun the given template as a shell command for each nodes in the network in parallel.
CONNload_edgesLoad the given edges as a network
CONNload_fileLoad the given file into the network
CONNload_strLoad network from the given string
CONNsave_fileSave the network into the given file
CONNsubset_fromTake a subset of network by taking the given node as a new outlet
CONNsubset_largestTake a subset of network by only including the largest blob of connected nodes
CONNsubsetTake a subset of network by only including the selected nodes
COREcountCount the number of nodes in the network
COREnet_leavesGet the name of the leaf nodes
COREnet_rootsGet the name of the outlet nodes
COREnode_attrGet the attr of the provided node
COREnode_mapGet a attrmap with node name and attributes
GVIZload_positionsLoad Node positions from the graphviz file
GVIZsave_gvSave the network as a graphviz file
RENDERrender_nodesRender each node of the network and combine to same variable
RENDERrender_templateRender a File template for the nodes in the whole network
RENDERrenderRender from network attributes
TABLEsave_csvSave CSV
TABLEtable_to_markdownRender the Table as a rendered markdown
TSseries_csvWrite the given nodes to csv with given attributes and series
TSts_print_csvSave timeseries from all nodes into a single csv file
VISUALSflatten
VISUALSset_nodesize_attrsSet the node size of the nodes based on the attribute value
VISUALSsvg_saveExports the network as a svg
VISUALSsvg_ts_blocks
caironetworkCreate a SVG file with the given network structure
cairotableCreate a SVG file with the given network structure
csvload_seriesLoad series values to nodes
csvload_timeseriesLoad timeseries values to nodes
gisload_attrsLoad node attributes from a GIS file
gisload_networkLoad network from a GIS file
gissave_connectionsSave GIS file of the connections
gissave_nodesSave GIS file of the nodes
typsttableGenerate Typst code for given Table