diff options
author | elioat <elioat@tilde.institute> | 2022-12-10 14:31:15 -0500 |
---|---|---|
committer | elioat <elioat@tilde.institute> | 2022-12-10 14:31:15 -0500 |
commit | 92690f0f9341f41c6a077b622eb9637dc7a55ee4 (patch) | |
tree | 324ab780bad2dbf8c30be96d3cd65cab6299a22d /src | |
parent | 0ec27e5e710f043a881495ba5c9c8233d484b4ae (diff) | |
download | december-2022-92690f0f9341f41c6a077b622eb9637dc7a55ee4.tar.gz |
lil bit of clean up
Diffstat (limited to 'src')
-rw-r--r-- | src/catalogue.lil | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/catalogue.lil b/src/catalogue.lil index e305f57..b3eb8ba 100644 --- a/src/catalogue.lil +++ b/src/catalogue.lil @@ -1,3 +1,5 @@ +csv_db:"test.csv" + on load_db db do data:read[db] out:readcsv[data "sss"] @@ -13,10 +15,11 @@ on entry d t do date_fmt_string:"date +%Y-%m-%d | tr -d '\n'" wget_fmt_string:"wget -qO- " , d.url , " | grep -o \"<title>[^<]*\" | sed -e 's/<[^>]*>//g' | tr -d '\n'" t:insert title:(shell[wget_fmt_string].out) reference:(d.url) created_date:(shell[date_fmt_string].out) into t + # TODO protect against wget fails end # read in a csv, and store in memory as a table -catalogue:load_db["test.csv"] +catalogue:load_db[csv_db] # add a row to the table stored in memory row.url:"https://tenforward.social" @@ -24,4 +27,4 @@ row:table row catalogue:entry[row catalogue] # write the updated data to csv -save_db[catalogue "test.csv"] +save_db[catalogue csv_db] |