From 4d2992ad2ede10ed6e64096e716b6c35913a9f65 Mon Sep 17 00:00:00 2001 From: linusha Date: Fri, 16 Aug 2024 13:58:28 +0200 Subject: [PATCH] Add documentation and action --- .github/workflows/export.yml | 39 ++++++++++++++++++++++++++++++++++++ README.md | 14 +++++++++++-- 2 files changed, 51 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/export.yml diff --git a/.github/workflows/export.yml b/.github/workflows/export.yml new file mode 100644 index 0000000..84c21c6 --- /dev/null +++ b/.github/workflows/export.yml @@ -0,0 +1,39 @@ +name: Publish Current Export +on: + workflow_dispatch: + schedule: + - cron: '0 3 * * 1' + +jobs: + export: + runs-on: ubuntu-latest + steps: + - name: Store Current Date + id: date + run: echo "DATE=$(date +'%Y-%m-%d')" >> "$GITHUB_OUTPUT" + - name: Checkout Data Repository + uses: actions/checkout@v4 + - name: Configure `git` + run: | + git config user.name htv-bot + git config user.email mail@howtheyvote.eu + - name: Create new Commit and tag it + env: + DATE: ${{ steps.date.outputs.DATE }} + run: | + git commit --allow-empty -m "Export from $DATE" + git push + git tag "$DATE" + git push origin tag "$DATE" + - name: Download current export + env: + DATE: ${{ steps.date.outputs.DATE }} + run: | + wget https://howtheyvote.eu/files/export/export.zip + unzip -o -d export export.zip + - name: Release + uses: softprops/action-gh-release@v2 + with: + tag_name: ${{ steps.date.outputs.DATE }} + files: export.zip + body_path: ./export/README.md diff --git a/README.md b/README.md index 19e2bed..8d7bee0 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,12 @@ -# data -Weekly updated data on roll-call-votes in the European Parliament, as collected by https://howtheyvote.eu/. +# HowTheyVote.eu Database + +HowTheyVote.eu collects data about European Parliament roll-call votes and related data such as biographical information about MEPs and political groups. We provide a full export of the database in CSV format. + +**[Read more about HowTheyVote.eu and the license for our data →](https://howtheyvote.eu/about)** + +To download the current database click [here](https://github.com/HowTheyVote/data/releases/latest). + +There, you will find the documentation for each data export. At the bottom of each export, you can download all files as a single `export.zip` file.. + +![image](https://github.com/user-attachments/assets/0424e4f3-1415-4717-b50d-464b7410a460) +