-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
R. S. Doiel
committed
Oct 30, 2024
1 parent
c6fa389
commit 702a881
Showing
15 changed files
with
208 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,3 +19,4 @@ logs/* | |
groups_rpt.sql | ||
*_final.csv | ||
in_feeds.csv | ||
htdocs/rpt/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
select json_object( | ||
'key', src->'clgid', | ||
'name', src->'name', | ||
'alternative', replace(replace(replace(replace(json_quote(src->'alternative'), '","', '; '), '["', ''), '"]', ''), '[]', ''), | ||
'email', src->'email', | ||
'date', src->'date', | ||
'description', src->'description', | ||
'start', src->'start_date', | ||
'approx_start', src->'is_approx_start', | ||
'activity', src->'activity', | ||
'end', src->'end_date', | ||
'appox_end', src->'is_approx_end', | ||
'website', src->'website', | ||
'pi', src->'pi', | ||
'parent', src->'parent', | ||
'prefix', src->'prefix', | ||
'grid', src->'grid', | ||
'isni', src->'isni', | ||
'ringold', src->'ringold', | ||
'viaf', src->'viaf', | ||
'ror', src->'ror', | ||
'updated', src->'updated', | ||
'Scope', src->'Scope' | ||
) | ||
from groups | ||
order by src->'name' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
|
||
This is a temporary place for report output during development. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
reports: | ||
run_people_csv: | ||
cmd: ./run_people_csv.bash | ||
basename: people | ||
append_datestamp: false | ||
content_type: text/csv | ||
run_groups_csv: | ||
cmd: ./run_groups_csv.bash | ||
basename: groups | ||
append_datestamp: false | ||
content_type: text/csv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,11 @@ | ||
reports: | ||
run_people_csv: ./run_people_csv.bash | ||
run_groups_csv: ./run_groups_csv.bash | ||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,61 @@ | ||
#!/bin/bash | ||
# | ||
|
||
# FIXME: this report needs to SSH to the data processing system and then run the rpt_groups_csv.bash script. | ||
# { | ||
# "Scope": "", | ||
# "activity": "active", | ||
# "alternative": [ | ||
# "RSI" | ||
# ], | ||
# "clgid": "Resnick-Sustainability-Institute", | ||
# "date": "10/23/18", | ||
# "description": "", | ||
# "email": "joy@caltech.edu", | ||
# "end_date": "", | ||
# "grid": "", | ||
# "include_in_feeds": true, | ||
# "is_approx_end": false, | ||
# "is_approx_start": false, | ||
# "isni": "", | ||
# "name": "Resnick Sustainability Institute", | ||
# "parent": "Jonas Peters", | ||
# "pi": "", | ||
# "prefix": "", | ||
# "ringold": "", | ||
# "ror": "", | ||
# "start_date": "", | ||
# "updated": "3/26/20", | ||
# "viaf": "", | ||
# "website": "https://resnick.caltech.edu/" | ||
# } | ||
|
||
# Mockup report being run | ||
sleep 5; | ||
echo "files://dataset.library.caltech.edu/Sites/feeds_v1.6/groups.csv" | ||
### cat <<SQL>groups_rpt.sql | ||
### select json_object( | ||
### 'key', src->'clgid', | ||
### 'name', src->'name', | ||
### 'alternative', replace(replace(replace(replace(json_quote(src->'alternative'), '","', '; '), '["', ''), '"]', ''), '[]', ''), | ||
### 'email', src->'email', | ||
### 'date', src->'date', | ||
### 'description', src->'description', | ||
### 'start', src->'start_date', | ||
### 'approx_start', src->'is_approx_start', | ||
### 'activity', src->'activity', | ||
### 'end', src->'end_date', | ||
### 'appox_end', src->'is_approx_end', | ||
### 'website', src->'website', | ||
### 'pi', src->'pi', | ||
### 'parent', src->'parent', | ||
### 'prefix', src->'prefix', | ||
### 'grid', src->'grid', | ||
### 'isni', src->'isni', | ||
### 'ringold', src->'ringold', | ||
### 'viaf', src->'viaf', | ||
### 'ror', src->'ror', | ||
### 'updated', src->'updated', | ||
### 'Scope', src->'Scope' | ||
### ) | ||
### from groups | ||
### order by src->'name' | ||
### SQL | ||
### | ||
dsquery -csv "key,name,alternative,email,date,description,start,approx_start,activity,end,approx_end,website,pi,parent,prefix,grid,isni,ringold,viaf,ror,updated,Scope" -sql groups_rpt.sql groups.ds |
Oops, something went wrong.