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
Showing
2 changed files
with
40 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,35 @@ | ||
version: 2 | ||
jobs: | ||
fetch_and_commit: | ||
docker: | ||
- image: circleci/python:3.6.4 | ||
steps: | ||
- checkout | ||
- run: | ||
command: | | ||
cp Street_Tree_List.csv Street_Tree_List-old.csv | ||
curl -o Street_Tree_List.csv "https://data.sfgov.org/api/views/tkzw-k3nq/rows.csv?accessType=DOWNLOAD" | ||
git add Street_Tree_List.csv | ||
git config --global user.email "treebot@example.com" | ||
git config --global user.name "Treebot" | ||
sudo pip install csv-diff | ||
csv-diff Street_Tree_List-old.csv Street_Tree_List.csv --key=TreeID > message.txt | ||
git commit -F message.txt && \ | ||
git push -q https://${GITHUB_PERSONAL_TOKEN}@github.com/simonw/sf-tree-history.git master \ | ||
|| true | ||
workflows: | ||
version: 2 | ||
build: | ||
jobs: | ||
- fetch_and_commit | ||
nightly: | ||
triggers: | ||
- schedule: | ||
cron: "0 0 * * *" | ||
filters: | ||
branches: | ||
only: | ||
- master | ||
jobs: | ||
- fetch_and_commit |
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,5 @@ | ||
# sf-tree-history | ||
|
||
Tracking the history of trees in San Francisco. | ||
|
||
This repository [uses CircleCI](https://circleci.com/gh/simonw/sf-tree-history) to retrieve the [official CSV file of trees in San Francisco](https://data.sfgov.org/City-Infrastructure/Street-Tree-List/tkzw-k3nq) once a day and track any changes to it over time using the git commit history. |