Skip to content

Commit

Permalink
chore: update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
rfoel committed May 20, 2023
1 parent eba726c commit fdaff48
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 9 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/streak-keeper.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ on:
schedule:
- cron: '0 9 * * *'

env:
DUOLINGO_JWT: ${{ secrets.DUOLINGO_JWT }}

jobs:
study:
runs-on: ubuntu-latest
Expand All @@ -19,4 +16,5 @@ jobs:

- run: node index.js
env:
DUOLINGO_JWT: ${{ secrets.DUOLINGO_JWT }}
LESSONS: 1
4 changes: 1 addition & 3 deletions .github/workflows/study.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@ on:
required: false
type: number

env:
DUOLINGO_JWT: ${{ secrets.DUOLINGO_JWT }}

jobs:
study:
runs-on: ubuntu-latest
Expand All @@ -24,4 +21,5 @@ jobs:

- run: node index.js
env:
DUOLINGO_JWT: ${{ secrets.DUOLINGO_JWT }}
LESSONS: ${{ inputs.lessons }}
21 changes: 18 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,28 @@

Streak keeper and XP farm for Duolingo. Never get demoted again!

## Streak Keeper
## Usage

To make it work, you need to make get an authorization token from the [Duoliongo](duolingo.com) web app. Simply run the following script in the browser's console while logged in:

```js
document.cookie
.split(';')
.find(cookie => cookie.includes('jwt_token'))
.split('=')[1]
```

Then copy the token given and set a (repository secret)[https://docs.github.com/actions/learn-github-actions/variables] with the name `DUOLINGO_JWT` in your GitHub Actions settings.

## Workflows

### 🔥 Streak Keeper

This project uses GitHub Actions scheduled workflow to keep your streak alive. The workflow can be viewed [here](.github/workflows/streak-keeper.yml).

## Study
### 📚 Study

This repository can also "study" lessons for you. This will give you XP so you won't get demoted never again! This workflow uses [workflow_dispatch](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#workflow_dispatch) to trigger the study session. You can choose the number of lessons to be done. The workflow can be viewed [here](.github/workflows/study.yml).
This repository can also "study" lessons for you. This will give you XP so you won't get demoted never again! This workflow uses [workflow_dispatch](https://docs.github.com/actions/using-workflows/events-that-trigger-workflows#workflow_dispatch) to trigger the study session. You can choose the number of lessons to be done. The workflow can be viewed [here](.github/workflows/study.yml).

## Caveats

Expand Down

0 comments on commit fdaff48

Please sign in to comment.