diff options
author | elioat <elioat@tilde.institute> | 2022-12-10 20:18:07 -0500 |
---|---|---|
committer | elioat <elioat@tilde.institute> | 2022-12-10 20:18:07 -0500 |
commit | e8cc8cd7db6d887d744e45347d1e6da9dc32e3c6 (patch) | |
tree | d58d0ff59d8385d11cb1c9fdd66d77bdd322584e /src/catalogue.lil | |
parent | 26b18032b1d2cef857972a657c767382865116d7 (diff) | |
download | december-2022-e8cc8cd7db6d887d744e45347d1e6da9dc32e3c6.tar.gz |
teeny tiny cli user interface
Diffstat (limited to 'src/catalogue.lil')
-rw-r--r-- | src/catalogue.lil | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/src/catalogue.lil b/src/catalogue.lil index b3eb8ba..f30dc3c 100644 --- a/src/catalogue.lil +++ b/src/catalogue.lil @@ -18,13 +18,18 @@ on entry d t do # TODO protect against wget fails end -# read in a csv, and store in memory as a table -catalogue:load_db[csv_db] +if args[2] do + url:args[2] + # read in a csv, and store in memory as a table + catalogue:load_db[csv_db] -# add a row to the table stored in memory -row.url:"https://tenforward.social" -row:table row -catalogue:entry[row catalogue] + # add a row to the table stored in memory + row.url:url + row:table row + catalogue:entry[row catalogue] -# write the updated data to csv -save_db[catalogue csv_db] + # write the updated data to csv + save_db[catalogue csv_db] +else + print["\n please pass a url as an argument\n"] +end \ No newline at end of file |