diff options
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 |