Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

publish machine-readable metadata #3

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions .github/workflows/build-and-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@ on:
schedule:
# every day at 2:40
- cron: '40 2 * * *'
# todo: remove
push:
branches:
- 'publish'

jobs:
# todo: DRY with build.yml
Expand All @@ -21,7 +17,7 @@ jobs:
run: ./ci/install-qsv.sh

- run: ./build.sh
- name: store gtfs-flex.zip as artifact
- name: build feed & store as artifact
uses: actions/upload-artifact@v3
with:
name: gtfs-flex
Expand All @@ -37,8 +33,7 @@ jobs:
env:
MC_IMAGE:
steps:
# todo
- name: restore gtfs-flex.zip
- name: restore built feed
uses: actions/download-artifact@v3
with:
name: gtfs-flex
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ Thumbs.db
/gtfs

/gtfs-flex.zip
/index.html
7 changes: 7 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -109,3 +109,10 @@ ls -lh gtfs-flex.zip
# GTFSVTOR doesn't support GTFS-Flex v2.
# todo
# docker run -it --rm -v $PWD:/gtfs mfdz/gtfsvtor -o /gtfs/validation-results.html /gtfs


echo_heading 'generating index.html'
dataset_version="$(date "+%Y-%m-%d")"
cat index.template.html \
| sed "s/{{dataset_version}}/$dataset_version/" \
>index.html
41 changes: 41 additions & 0 deletions index.html → index.template.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,47 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>experimenteller GTFS-Flex-Feed des VBB</title>
<!-- todo: add spatialCoverage.geo: {@type: GeoShape, box: …} -->
<!-- todo: spatialCoverage: add metadata like ISO code, Wikidata ID -->
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "Dataset",
"name": "experimenteller GTFS-Flex-Feed des VBB",
"description": "GTFS-Flex-Datensatz für den Verkehrsverbund Berlin-Brandenburg.",
"keywords": [
"GTFS",
"GTFS-Flex",
"demand responsive",
"transit",
"mobility"
],
"creator": {
"@type": "Organization",
"name": "DigitalAgentur Brandenburg GmbH",
"url": "https://www.digital-agentur.de"
},
"publisher": {
"@type": "Organization",
"name": "DigitalAgentur Brandenburg GmbH",
"url": "https://www.digital-agentur.de"
},
"license": "https://creativecommons.org/publicdomain/zero/1.0/",
"spatialCoverage": {
"@type": "Place",
"name": "Brandenburg"
},
"version": "{{dataset_version}}",
"distribution": [
{
"@type": "DataDownload",
"name": "GTFS-Flex",
"contentUrl": "gtfs-flex.zip",
"encodingFormat": "application/zip"
}
]
}
</script>
<style type="text/css">
body {
margin: 1rem;
Expand Down
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

## Obtaining the feed

If you want to use this feed, download it from the [latest release](https://github.com/bbnavi/gtfs-flex/releases/latest).
If you want to use this feed, download it [from bbnavi's open data portal](https://opendata.bbnavi.de/vbb-gtfs-flex/index.html).


## Building the feed
Expand Down