From 13f5a6c7784d8a68ec80e969d8be6c2e83e6a326 Mon Sep 17 00:00:00 2001 From: "R. S. Doiel" Date: Wed, 30 Oct 2024 08:47:18 -0700 Subject: [PATCH] prep. for v0.0.10 release --- CITATION.cff | 2 +- about.md | 4 +- clear_all_reports.bash | 4 ++ codemeta.json | 4 +- cold_admin.1.md | 4 +- deno.json | 5 +- directory_sync.1.md | 4 +- htdocs/about.html | 2 +- htdocs/about.md | 4 +- installer.ps1 | 2 +- installer.sh | 2 +- pagefind/fragment/en-US_a374ee4.pf_fragment | Bin 0 -> 2615 bytes pagefind/index/en-US_bfd7ebf.pf_index | Bin 0 -> 19909 bytes pagefind/pagefind-entry.json | 2 +- pagefind/pagefind.en-US_93c527e8577f4.pf_meta | Bin 0 -> 194 bytes people.ts | 6 +-- people_rpt.sql | 38 +++++++++++++++ report_design_choices.html | 3 ++ reports.1.md | 4 +- reports.yaml-example | 11 ----- run_people_csv.bash | 46 +++++++++++++++++- version.ts | 6 +-- 22 files changed, 116 insertions(+), 37 deletions(-) create mode 100755 clear_all_reports.bash create mode 100644 pagefind/fragment/en-US_a374ee4.pf_fragment create mode 100644 pagefind/index/en-US_bfd7ebf.pf_index create mode 100644 pagefind/pagefind.en-US_93c527e8577f4.pf_meta create mode 100644 people_rpt.sql delete mode 100644 reports.yaml-example diff --git a/CITATION.cff b/CITATION.cff index 9f9cc69..1e95236 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -26,6 +26,6 @@ maintainers: orcid: "" repository-code: "https://github.com/caltechlibrary/cold" -version: 0.0.9 +version: 0.0.10 license-url: "https://caltechlibrary.github.io/cold/LICENSE" keywords: [ "metadata", "objects", "controlled vocabulary" ] diff --git a/about.md b/about.md index bb573f2..763b784 100644 --- a/about.md +++ b/about.md @@ -14,7 +14,7 @@ authors: orcid: "https://orcid.org/0000-0003-0900-6903" repository-code: "https://github.com/caltechlibrary/cold" -version: 0.0.9 +version: 0.0.10 license-url: "https://caltechlibrary.github.io/cold/LICENSE" keywords: [ "metadata", "objects", "controlled vocabulary" ] @@ -23,7 +23,7 @@ keywords: [ "metadata", "objects", "controlled vocabulary" ] About this software =================== -## cold 0.0.9 +## cold 0.0.10 ### Authors diff --git a/clear_all_reports.bash b/clear_all_reports.bash new file mode 100755 index 0000000..57f8cd1 --- /dev/null +++ b/clear_all_reports.bash @@ -0,0 +1,4 @@ +#!/bin/bash + +sqlite3 reports.ds/collection.db 'delete from reports'; +rm htdocs/rpt/*.csv diff --git a/codemeta.json b/codemeta.json index b640e3c..dc5f494 100644 --- a/codemeta.json +++ b/codemeta.json @@ -9,9 +9,9 @@ "copyrightYear": 2024, "isAccessibleForFree": true, "dateCreated": "2023-12-12", - "dateModified": "2024-10-15", + "dateModified": "2024-10-30", "releaseNotes": "cold is a work in progress, subject to change and not recommended for production.", - "version": "0.0.9", + "version": "0.0.10", "developmentStatus": "wip", "author": [ { diff --git a/cold_admin.1.md b/cold_admin.1.md index 7777bd8..0bf2435 100644 --- a/cold_admin.1.md +++ b/cold_admin.1.md @@ -1,6 +1,6 @@ -%cold(1) user manual | 0.0.9 2024-10-29 c6fa389 +%cold(1) user manual | 0.0.10 2024-10-30 702a881 % R. S.Doiel -% 2024-10-29 c6fa389 +% 2024-10-30 702a881 # NAME diff --git a/deno.json b/deno.json index aef6f53..052d7a6 100644 --- a/deno.json +++ b/deno.json @@ -3,7 +3,8 @@ "setup": "dataset init people.ds 'sqlite://collection.db' ; dataset init groups.ds 'sqlite://collection.db' ; dataset init funders.ds 'sqlite://collection.db' ; dataset init issn.ds 'sqlite://collection.db'; dataset init doi_prefix.ds 'sqlite://collection.db' ; dataset init subjects.ds 'sqlite://collection.db' ; dataset init test.ds 'sqlite://collection.db' ; dataset init reports.ds 'sqlite://collection.db'", "cold_api": "datasetd cold_api.yaml", "cold_api_debug": "datasetd --debug cold_api.yaml", - "cold": "deno run --allow-import --allow-read --allow-net --watch cold_admin.ts --htdocs=./htdocs", + "cold": "deno run --watch --allow-import --allow-read --allow-net --watch cold_admin.ts --htdocs=./htdocs", + "cold_reports": "deno run --watch --allow-all reports.ts", "reset_data": "dsquery groups.ds 'delete from groups' ; dsquery people.ds 'delete from people' ; dsquery funders.ds 'delete from funders' ; dsquery issn.ds 'delete from issn'", "load_data": "deno task import_groups_csv ; deno task import_people_csv ; deno task import_issn_journal_publisher_csv", "reload_data": "deno task reset_data ; deno task load_data", @@ -18,7 +19,7 @@ "import_people_csv": "deno run --allow-import --allow-read --allow-net ds_importer.ts people.ds people.csv", "import_groups_csv": "deno run --allow-import --allow-read --allow-net ds_importer.ts groups.ds groups.csv", "set_include_in_feeds": "deno run --allow-read --allow-net set_include_in_feeds.ts people.ds people_in_feeds.csv", - "import_issn_journal_publisher_csv": "deno run --allow-read --allow-net ds_importer.ts issn.ds issn_journal_publisher.csv", + "import_issn_journal_publisher_csv": "deno run --allow-import --allow-read --allow-net ds_importer.ts issn.ds issn_journal_publisher.csv", "esm:add": "deno run -A https://esm.sh/v135 add", "esm:update": "deno run -A https://esm.sh/v135 update", "esm:remove": "deno run -A https://esm.sh/v135 remove" diff --git a/directory_sync.1.md b/directory_sync.1.md index 23a18c7..4182393 100644 --- a/directory_sync.1.md +++ b/directory_sync.1.md @@ -1,6 +1,6 @@ -%directory_sync(1) user manual | 0.0.9 2024-10-29 c6fa389 +%directory_sync(1) user manual | 0.0.10 2024-10-30 702a881 % R. S.Doiel -% 2024-10-29 c6fa389 +% 2024-10-30 702a881 # NAME diff --git a/htdocs/about.html b/htdocs/about.html index ca879f6..e359059 100644 --- a/htdocs/about.html +++ b/htdocs/about.html @@ -19,7 +19,7 @@

About this software

-

cold 0.0.9

+

cold 0.0.10

Authors

+

Reports are programs or scripts (e.g. Bash, Python) that write their +results to standard output, the runner reads that and takes care of +saving the results and contacting the email addresses.

I’ve prototyped the report runner in TypeScript but am not happy with it. I am deciding if I should write this in Go or give Python a try.

I’m thinking reports could be simple script written in any langauge diff --git a/reports.1.md b/reports.1.md index 146a2f0..5cdf097 100644 --- a/reports.1.md +++ b/reports.1.md @@ -1,6 +1,6 @@ -%directory_sync(1) user manual | 0.0.9 2024-10-29 c6fa389 +%directory_sync(1) user manual | 0.0.10 2024-10-30 702a881 % R. S.Doiel -% 2024-10-29 c6fa389 +% 2024-10-30 702a881 # NAME diff --git a/reports.yaml-example b/reports.yaml-example deleted file mode 100644 index 7c8618d..0000000 --- a/reports.yaml-example +++ /dev/null @@ -1,11 +0,0 @@ -reports: - run_people_csv: - cmd: ./run_people_csv.bash - name: people.csv - append_datestamp: false - content_type: text/csv - run_groups_csv: - cmd: ./run_groups_csv.bash - name: groups.csv - append_datestamp: false - content_type: text/csv diff --git a/run_people_csv.bash b/run_people_csv.bash index eb4b3e9..88f655c 100755 --- a/run_people_csv.bash +++ b/run_people_csv.bash @@ -1,4 +1,48 @@ #!/bin/bash # -dsquery -csv "family_name,given_name,cl_people_id,thesis_id,advisor_id,authors_id,archivesspace_id,directory_id,viaf_id,lcnaf,isni,wikidata,snac,orcid,image,educated_at,caltech,jpl,faculty,alumn,status,directory_person_type,title,bio,division,authors_count,thesis_count,data_count,advisor_count,editor_count,updated,include_in_feeds" people.ds "select json_object( 'family_name', src->'family_name', 'given_name', src->'given_name', 'cl_people_id', ifnull(src->'clpid', ''), 'thesis_id', ifnull(src->'thesis_id', ''), 'advisor_id', ifnull(src->'advisor_id', ''), 'authors_id', ifnull(src->'authors_id', ''), 'archivesspace_id', ifnull(src->'archivesspace_id', ''), 'directory_id', ifnull(src->'directory_user_id', ''), 'viaf_id', src->'viaf', 'lcnaf', src->'lcnaf', 'isni', src->'isni', 'wikidata', src->'wikidata', 'snac', src->'snac', 'orcid', src->'orcid', 'image', '', 'educated_at', ifnull(src->'educated_at', ''), 'caltech', ifnull(src->'caltech', ''), 'jpl', ifnull(src->'jpl', ''), 'faculty', ifnull(src->'faculty', ''), 'staff', ifnull(src->'staff', ''), 'alumn', ifnull(src->'alumn', ''), 'status', ifnull(src->'status', ''), 'directory_person_type', ifnull(src->'directory_person_type', ''), 'title', ifnull(src->'title', ''), 'bio', ifnull(src->'bio', ''), 'division', ifnull(src->'division', ''), 'authors_count', '', 'thesis_count', '', 'data_count', '', 'advisor_count', '', 'editor_count', '', 'updated', src->'updated', 'include_in_feeds', ifnull(src->'include_in_feeds', '')) as src from people order by src->'family_name', src->'given_name'" +### cat <people_rpt.sql +### select json_object( +### 'family_name', src->'family_name', +### 'given_name', src->'given_name', +### 'cl_people_id', ifnull(src->'clpid', ''), +### 'thesis_id', ifnull(src->'thesis_id', ''), +### 'advisor_id', ifnull(src->'advisors_id', ''), +### 'authors_id', ifnull(src->'authors_id', ''), +### 'archivesspace_id', ifnull(src->'archivesspace_id', ''), +### 'directory_id', ifnull(src->'directory_user_id', ''), +### 'viaf_id', src->'viaf', +### 'lcnaf', src->'lcnaf', +### 'isni', src->'isni', +### 'wikidata', src->'wikidata', +### 'snac', src->'snac', +### 'orcid', src->'orcid', +### 'image', '', +### 'educated_at', ifnull(src->'educated_at', ''), +### 'caltech', ifnull(src->'caltech', ''), +### 'jpl', ifnull(src->'jpl', ''), +### 'faculty', ifnull(src->'faculty', ''), +### 'staff', ifnull(src->'staff', ''), +### 'alumn', ifnull(src->'alumn', ''), +### 'status', ifnull(src->'status', ''), +### 'directory_person_type', +### ifnull(src->'directory_person_type', ''), +### 'title', ifnull(src->'title', ''), +### 'bio', ifnull(src->'bio', ''), +### 'division', ifnull(src->'division', ''), +### 'authors_count', '', +### 'thesis_count', '', +### 'data_count', '', +### 'advisor_count', '', +### 'editor_count', '', +### 'updated', src->'updated', +### 'include_in_feeds', ifnull(src->'include_in_feeds', '')) as src +### from people +### order by src->'family_name', src->'given_name'"; +### +### SQL + +dsquery \ + -csv "family_name,given_name,cl_people_id,thesis_id,advisor_id,authors_id,archivesspace_id,directory_id,viaf_id,lcnaf,isni,wikidata,snac,orcid,image,educated_at,caltech,jpl,faculty,alumn,status,directory_person_type,title,bio,division,authors_count,thesis_count,data_count,advisor_count,editor_count,updated,include_in_feeds" \ + -sql people_rpt.sql \ + people.ds diff --git a/version.ts b/version.ts index d755cb8..6f77f02 100644 --- a/version.ts +++ b/version.ts @@ -6,13 +6,13 @@ export const appInfo: {[k: string]: string} = { appName: "cold", // Version number of release - version: "0.0.9", + version: "0.0.10", // ReleaseDate, the date version.ts was generated - releaseDate: "2024-10-29", + releaseDate: "2024-10-30", // ReleaseHash, the Git hash when version.go was generated - releaseHash: "c6fa389", + releaseHash: "702a881", // licenseText holds a copy of the application license text. licenseText: `