Skip to content

Commit

Permalink
feat: fields.json (#197)
Browse files Browse the repository at this point in the history
* feat: fields.json

historical imagery fields merged into stac fields.json

* fix: linting

* ci: workflow to build fields.json

* ci: builds on push if you edit custom-fields.json

* fix: uses specific stac fields.json url

* fix: range to value

* fix: ci and range value

* ci: Update fields.json

* fix: format file

* fix: typo

* fix: cleaner way of formatting json

* fix: don't push to master branch

* fix: delete original fields.json

* fix: doesn't update fields if script errors

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
  • Loading branch information
3 people authored Dec 8, 2021
1 parent 5017d6c commit 29c742f
Show file tree
Hide file tree
Showing 4 changed files with 1,018 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/fields.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Build Fields
on:
push:
branches-ignore:
- master
paths:
- fields/custom-fields.json

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: build fields
run: |
FIELDS=$(node ./fields/import-fields-json.js)
if [ -n "${FIELDS}" ]; then
node ./fields/import-fields-json.js > ./fields/fields.json
fi
FILES=$(git ls-files -m)
if [[ $FILES == *"fields/fields.json"* ]]; then
git config --global user.name "github-actions[bot]"
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add ./fields/fields.json
git commit -m "ci: Update fields.json"
git push
fi
50 changes: 50 additions & 0 deletions fields/custom-fields.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
{
"extensions": {
"aerial-photo": "Aerial Photo",
"camera": "Camera",
"film": "Film",
"historical-imagery": "Historical Imagery",
"scannning": "Scanning"
},
"metadata": {
"film:id": {
"summary": "v"
},
"film:negative_sequence": {
"summary": "r"
},
"film:physical_condition": {
"summary": "v"
},
"film:physical_size": {
"summary": "v"
},
"aerial-photo:run": {
"summary": "v"
},
"aerial-photo:sequence_number": {
"summary": "r"
},
"aerial-photo:altitude": {
"summary": "r"
},
"aerial-photo:scale": {
"summary": "r"
},
"aerial-photo:anomalies": {
"summary": "v"
},
"camera:sequence_number": {
"summary": "r"
},
"camera:nominal_focal_length": {
"summary": "r"
},
"scan:is_original": {
"summary": "v"
},
"scan:scanned": {
"summary": "r"
}
}
}
Loading

0 comments on commit 29c742f

Please sign in to comment.