Skip to content

Commit

Permalink
first code for issue #3
Browse files Browse the repository at this point in the history
  • Loading branch information
osm-ToniE committed Nov 10, 2020
1 parent 1878d74 commit 8fdc4dd
Show file tree
Hide file tree
Showing 115 changed files with 1,103 additions and 37 deletions.
5 changes: 5 additions & 0 deletions AU/SA/Adelaide-Metro/cleanup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash

#
# delete temporary files
#
7 changes: 7 additions & 0 deletions AU/SA/Adelaide-Metro/get-feed-name.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

#
# print name of GTFS feed
#

echo "AU-SA-Adelaide-Metro"
20 changes: 20 additions & 0 deletions AU/SA/Adelaide-Metro/get-release-date.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/bash

#
# retrieve release date of latest GTFS feed in form "YYYY-MM-DD"
#

RELEASE_URL=$(./get-release-url.sh)

LAST_MODIFIED=$(curl -sI $RELEASE_URL | fgrep -i 'last-modified:' | sed -e 's/^last-modified:\s*//i')

if [ -n "$LAST_MODIFIED" ]
then
result=$(date -d "$LAST_MODIFIED" '+%Y-%m-%d')
if [ "$(echo $result | grep -c '^20[0-9][0-9]-[01][0-9]-[0123][0-9]$')" == 1 ]
then
RELEASE_DATE=$result
fi
fi

echo $RELEASE_DATE
7 changes: 7 additions & 0 deletions AU/SA/Adelaide-Metro/get-release-url.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

#
# get URL to download latest GTFS feed
#

echo "https://gtfs.adelaidemetro.com.au/v1/static/latest/google_transit.zip"
5 changes: 5 additions & 0 deletions BR/MG/BHTrans-Convencional/cleanup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash

#
# delete temporary files
#
7 changes: 7 additions & 0 deletions BR/MG/BHTrans-Convencional/get-feed-name.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

#
# print name of GTFS feed
#

echo "BR-MG-BHTrans-Conventional"
20 changes: 20 additions & 0 deletions BR/MG/BHTrans-Convencional/get-release-date.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/bash

#
# retrieve release date of latest GTFS feed in form "YYYY-MM-DD"
#

RELEASE_URL=$(./get-release-url.sh)

LAST_MODIFIED=$(curl -sI $RELEASE_URL | fgrep -i 'last-modified:' | sed -e 's/^last-modified:\s*//i')

if [ -n "$LAST_MODIFIED" ]
then
result=$(date -d "$LAST_MODIFIED" '+%Y-%m-%d')
if [ "$(echo $result | grep -c '^20[0-9][0-9]-[01][0-9]-[0123][0-9]$')" == 1 ]
then
RELEASE_DATE=$result
fi
fi

echo $RELEASE_DATE
7 changes: 7 additions & 0 deletions BR/MG/BHTrans-Convencional/get-release-url.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

#
# get URL to download latest GTFS feed
#

echo "https://ckan.pbh.gov.br/dataset/77764a7e-63fc-4111-ace3-fb7d3037953a/resource/f0fa78dc-74c3-49fa-8971-c310a76a07fa/download/gtfsfiles.zip"
5 changes: 5 additions & 0 deletions BR/MG/BHTrans-Suplementar/cleanup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash

#
# delete temporary files
#
7 changes: 7 additions & 0 deletions BR/MG/BHTrans-Suplementar/get-feed-name.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

#
# print name of GTFS feed
#

echo "BR-MG-BHTrans-Suplementar"
20 changes: 20 additions & 0 deletions BR/MG/BHTrans-Suplementar/get-release-date.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/bash

#
# retrieve release date of latest GTFS feed in form "YYYY-MM-DD"
#

RELEASE_URL=$(./get-release-url.sh)

LAST_MODIFIED=$(curl -sI $RELEASE_URL | fgrep -i 'last-modified:' | sed -e 's/^last-modified:\s*//i')

if [ -n "$LAST_MODIFIED" ]
then
result=$(date -d "$LAST_MODIFIED" '+%Y-%m-%d')
if [ "$(echo $result | grep -c '^20[0-9][0-9]-[01][0-9]-[0123][0-9]$')" == 1 ]
then
RELEASE_DATE=$result
fi
fi

echo $RELEASE_DATE
7 changes: 7 additions & 0 deletions BR/MG/BHTrans-Suplementar/get-release-url.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

#
# get URL to download latest GTFS feed
#

echo "https://ckan.pbh.gov.br/dataset/af0c47bb-5a82-4ae1-874f-e45dea1397ff/resource/b2a9341e-4471-45cc-a8c0-11be805590bc/download/gtfsfiles.zip"
5 changes: 5 additions & 0 deletions DE/BW/DING/cleanup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash

#
# delete temporary files
#
7 changes: 7 additions & 0 deletions DE/BW/DING/get-feed-name.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

#
# print name of GTFS feed
#

echo "DE-BW-DING"
20 changes: 20 additions & 0 deletions DE/BW/DING/get-release-date.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/bash

#
# retrieve release date of latest GTFS feed in form "YYYY-MM-DD"
#

RELEASE_URL=$(./get-release-url.sh)

LAST_MODIFIED=$(curl -sI $RELEASE_URL | fgrep -i 'last-modified:' | sed -e 's/^last-modified:\s*//i')

if [ -n "$LAST_MODIFIED" ]
then
result=$(date -d "$LAST_MODIFIED" '+%Y-%m-%d')
if [ "$(echo $result | grep -c '^20[0-9][0-9]-[01][0-9]-[0123][0-9]$')" == 1 ]
then
RELEASE_DATE=$result
fi
fi

echo $RELEASE_DATE
7 changes: 7 additions & 0 deletions DE/BW/DING/get-release-url.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

#
# get URL to download latest GTFS feed
#

echo "https://www.nvbw.de/fileadmin/user_upload/service/open_data/fahrplandaten_mit_liniennetz/ding.zip"
5 changes: 5 additions & 0 deletions DE/BW/Filsland/cleanup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash

#
# delete temporary files
#
7 changes: 7 additions & 0 deletions DE/BW/Filsland/get-feed-name.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

#
# print name of GTFS feed
#

echo "DE-BW-Filsland"
20 changes: 20 additions & 0 deletions DE/BW/Filsland/get-release-date.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/bash

#
# retrieve release date of latest GTFS feed in form "YYYY-MM-DD"
#

RELEASE_URL=$(./get-release-url.sh)

LAST_MODIFIED=$(curl -sI $RELEASE_URL | fgrep -i 'last-modified:' | sed -e 's/^last-modified:\s*//i')

if [ -n "$LAST_MODIFIED" ]
then
result=$(date -d "$LAST_MODIFIED" '+%Y-%m-%d')
if [ "$(echo $result | grep -c '^20[0-9][0-9]-[01][0-9]-[0123][0-9]$')" == 1 ]
then
RELEASE_DATE=$result
fi
fi

echo $RELEASE_DATE
7 changes: 7 additions & 0 deletions DE/BW/Filsland/get-release-url.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

#
# get URL to download latest GTFS feed
#

echo "https://www.nvbw.de/fileadmin/user_upload/service/open_data/fahrplandaten_mit_liniennetz/filsland.zip"
5 changes: 5 additions & 0 deletions DE/BW/HNV/cleanup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash

#
# delete temporary files
#
7 changes: 7 additions & 0 deletions DE/BW/HNV/get-feed-name.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

#
# print name of GTFS feed
#

echo "DE-BW-HNV"
20 changes: 20 additions & 0 deletions DE/BW/HNV/get-release-date.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/bash

#
# retrieve release date of latest GTFS feed in form "YYYY-MM-DD"
#

RELEASE_URL=$(./get-release-url.sh)

LAST_MODIFIED=$(curl -sI $RELEASE_URL | fgrep -i 'last-modified:' | sed -e 's/^last-modified:\s*//i')

if [ -n "$LAST_MODIFIED" ]
then
result=$(date -d "$LAST_MODIFIED" '+%Y-%m-%d')
if [ "$(echo $result | grep -c '^20[0-9][0-9]-[01][0-9]-[0123][0-9]$')" == 1 ]
then
RELEASE_DATE=$result
fi
fi

echo $RELEASE_DATE
7 changes: 7 additions & 0 deletions DE/BW/HNV/get-release-url.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

#
# get URL to download latest GTFS feed
#

echo "https://www.nvbw.de/fileadmin/user_upload/service/open_data/fahrplandaten_mit_liniennetz/hnv.zip"
5 changes: 5 additions & 0 deletions DE/BW/KV.SHA/cleanup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash

#
# delete temporary files
#
7 changes: 7 additions & 0 deletions DE/BW/KV.SHA/get-feed-name.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

#
# print name of GTFS feed
#

echo "DE-BW-KV.SHA"
20 changes: 20 additions & 0 deletions DE/BW/KV.SHA/get-release-date.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/bash

#
# retrieve release date of latest GTFS feed in form "YYYY-MM-DD"
#

RELEASE_URL=$(./get-release-url.sh)

LAST_MODIFIED=$(curl -sI $RELEASE_URL | fgrep -i 'last-modified:' | sed -e 's/^last-modified:\s*//i')

if [ -n "$LAST_MODIFIED" ]
then
result=$(date -d "$LAST_MODIFIED" '+%Y-%m-%d')
if [ "$(echo $result | grep -c '^20[0-9][0-9]-[01][0-9]-[0123][0-9]$')" == 1 ]
then
RELEASE_DATE=$result
fi
fi

echo $RELEASE_DATE
7 changes: 7 additions & 0 deletions DE/BW/KV.SHA/get-release-url.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

#
# get URL to download latest GTFS feed
#

echo "https://www.nvbw.de/fileadmin/user_upload/service/open_data/fahrplandaten_mit_liniennetz/kvsh.zip"
5 changes: 5 additions & 0 deletions DE/BW/OstalbMobil/cleanup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash

#
# delete temporary files
#
7 changes: 7 additions & 0 deletions DE/BW/OstalbMobil/get-feed-name.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

#
# print name of GTFS feed
#

echo "DE-BW-OstalbModil"
20 changes: 20 additions & 0 deletions DE/BW/OstalbMobil/get-release-date.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/bash

#
# retrieve release date of latest GTFS feed in form "YYYY-MM-DD"
#

RELEASE_URL=$(./get-release-url.sh)

LAST_MODIFIED=$(curl -sI $RELEASE_URL | fgrep -i 'last-modified:' | sed -e 's/^last-modified:\s*//i')

if [ -n "$LAST_MODIFIED" ]
then
result=$(date -d "$LAST_MODIFIED" '+%Y-%m-%d')
if [ "$(echo $result | grep -c '^20[0-9][0-9]-[01][0-9]-[0123][0-9]$')" == 1 ]
then
RELEASE_DATE=$result
fi
fi

echo $RELEASE_DATE
7 changes: 7 additions & 0 deletions DE/BW/OstalbMobil/get-release-url.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

#
# get URL to download latest GTFS feed
#

echo "https://www.nvbw.de/fileadmin/user_upload/service/open_data/fahrplandaten_mit_liniennetz/oam.zip"
5 changes: 5 additions & 0 deletions DE/BW/RAB/cleanup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash

#
# delete temporary files
#
7 changes: 7 additions & 0 deletions DE/BW/RAB/get-feed-name.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

#
# print name of GTFS feed
#

echo "DE-BW-RAB"
20 changes: 20 additions & 0 deletions DE/BW/RAB/get-release-date.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/bash

#
# retrieve release date of latest GTFS feed in form "YYYY-MM-DD"
#

RELEASE_URL=$(./get-release-url.sh)

LAST_MODIFIED=$(curl -sI $RELEASE_URL | fgrep -i 'last-modified:' | sed -e 's/^last-modified:\s*//i')

if [ -n "$LAST_MODIFIED" ]
then
result=$(date -d "$LAST_MODIFIED" '+%Y-%m-%d')
if [ "$(echo $result | grep -c '^20[0-9][0-9]-[01][0-9]-[0123][0-9]$')" == 1 ]
then
RELEASE_DATE=$result
fi
fi

echo $RELEASE_DATE
7 changes: 7 additions & 0 deletions DE/BW/RAB/get-release-url.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

#
# get URL to download latest GTFS feed
#

echo "https://www.nvbw.de/fileadmin/user_upload/service/open_data/fahrplandaten_mit_liniennetz/rab.zip"
5 changes: 5 additions & 0 deletions DE/BW/RBS/cleanup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash

#
# delete temporary files
#
Loading

0 comments on commit 8fdc4dd

Please sign in to comment.