📚Update your duolingo progress to your github README profile.
Duolingo username: Caoticarol
Last Streak: 263
Language | Experience |
---|---|
Japanese | |
German | |
Spanish |
- A README.md file.
- Duolingo Account.
- Set up a GitHub Secret called
DUOLINGO_USERNAME
with your Duolingo username. - Add a
<!-- duolingo -->
tag in your README.md file, with three blank lines below it. The Duolingo progress will be placed here.
To use this release, add a duolingo-to-markdown.yml
workflow file to the .github/workflows
folder in your repository with the following code:
name: duolingo-to-markdown
on:
schedule:
- cron: '1 1 * * *'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: repo checkout
uses: actions/checkout@v4
with:
persist-credentials: false
- name: python setup
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: python packages installation
run: |
python -m pip install --upgrade pip
pip install -r requests beautifulsoup
- name: duolingo to markdown with fstrings
env:
DUOLINGO_USERNAME: ${{ secrets.DUOLINGO_USERNAME }}
DUOLINGO_LANGUAGE_LENGTH: 3 # Optional. Defaults to 2. Language you want to show (are sort of higher experience to lower).
run: python .github/scripts/duolingo-to-markdown.py
- name: commit changes
continue-on-error: true
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add -A
git commit -m "Updated duolingo-to-markdown daily progress" -a
- name: push changes
continue-on-error: true
uses: ad-m/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}\
branch: main
The cron job is scheduled to run once a day, but you can do it weekly changing - cron: '1 1 * * *'
. You can manually run the workflow to test the code, going to the Actions tab in your repository.
This is a copy with slighty modifications from the original work here.