diff options
author | elioat <elioat@tilde.institute> | 2022-12-11 12:20:18 -0500 |
---|---|---|
committer | elioat <elioat@tilde.institute> | 2022-12-11 12:20:18 -0500 |
commit | ccedeed796645607d7fe118acf4c9a7cad54a804 (patch) | |
tree | 1466d0c7e1265a153af4fc4f98b879fd3daef897 | |
parent | dee96444e1c611e7152f914a3f540d5f4d366097 (diff) | |
download | december-2022-ccedeed796645607d7fe118acf4c9a7cad54a804.tar.gz |
hmmmmmmmm
-rw-r--r-- | src/catalogue.lil | 7 | ||||
-rw-r--r-- | test.csv | 9 |
2 files changed, 15 insertions, 1 deletions
diff --git a/src/catalogue.lil b/src/catalogue.lil index 4c719e2..3ca4b8f 100644 --- a/src/catalogue.lil +++ b/src/catalogue.lil @@ -14,8 +14,13 @@ on entry d t do # where d is a table representing a new row to be added to t, an existing table 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'" + wget_res:shell[wget_fmt_string].exit + # if wget_res.exit = -1 do + # exit["\n wget failed\n"] + # else + # t:insert title:(wget_res.out) reference:(d.url) created_date:(shell[date_fmt_string].out) into t + # end 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 if args[2] do diff --git a/test.csv b/test.csv new file mode 100644 index 0000000..f919205 --- /dev/null +++ b/test.csv @@ -0,0 +1,9 @@ +c0,c1,c2,title,reference,created_date +0,0,0,0,0,0 +0,0,0,0,0,0 +0,0,0,0,0,0 +0,0,0,0,0,0 +0,0,0,0,0,0 +0,0,0,0,0,0 +0,0,0,0,0,0 +0,0,0,,https://fhudjakhfjkdshfjshjfs.com,2022-12-11 \ No newline at end of file |