|
1 |
| -# todoist-readme |
2 |
| -Updates README with Todoist Stats of a user |
| 1 | +<p align="center"> |
| 2 | + <img width="400" src="assets/todoist-stats.png"> |
| 3 | + <h3 align="center">🚧 Todoist Stats</h3> |
| 4 | + <p align="center">⚡️📌 Update your Todoist Stats ✅ </p> |
| 5 | +</p> |
| 6 | + |
| 7 | +--- |
| 8 | + |
| 9 | +## Setup |
| 10 | + |
| 11 | +### Prep work |
| 12 | + |
| 13 | +1. You'll need a Todoist API Token. You can get that from [here](https://beta.todoist.com/prefs/integrations) |
| 14 | + - if you're new to Todoist, then you can refer [here](#new-to-todoist). |
| 15 | +2. You need to save the Todoist API Token in the repository secrets. You can find that in the Settings of your Repository. Be sure to save those as the following. |
| 16 | + - `TODOIST_API_KEY = <your todoist API token>` |
| 17 | +3. You need to update the README file(README.md) with 2 comments. You can refer [here](#update-your-readme) for updating it. |
| 18 | + |
| 19 | +## Update your README |
| 20 | + |
| 21 | +Add a comment to your `README.md` like this: |
| 22 | + |
| 23 | +```markdown |
| 24 | +# Todoist Stats |
| 25 | +<!-- TODO-IST:START --> |
| 26 | +<!-- TODO-IST:END --> |
| 27 | +``` |
| 28 | + |
| 29 | +These lines will be our entry-points for the todoist stats. |
| 30 | + |
| 31 | +## New to Todoist |
| 32 | + |
| 33 | +Todoist gives you the confidence that everything’s organized and accounted for, so you can make progress on the things that are important to you. |
| 34 | + |
| 35 | +- Create a Todoist account from [here](https://todoist.com/users/showregister) |
| 36 | +- Get your Todoist API Key from your [here](https://beta.todoist.com/prefs/integrations) |
| 37 | + |
| 38 | +### Repository Workflow For Non-Premium Users |
| 39 | + |
| 40 | +Please follow the steps below: |
| 41 | + |
| 42 | +1. Go to your `<username>/<username>/actions`, hit `New workflow`, `set up a workflow yourself`, delete all the default content github made for you. |
| 43 | +2. Copy the following code and paste it to your new workflow you created at step 1: |
| 44 | + ```yml |
| 45 | + name: Todoist Readme |
| 46 | + |
| 47 | + on: |
| 48 | + workflow_dispatch: |
| 49 | + schedule: |
| 50 | + # Runs every minute |
| 51 | + - cron: '* * * * *' |
| 52 | + |
| 53 | + jobs: |
| 54 | + update-readme: |
| 55 | + name: Update todoist stats |
| 56 | + runs-on: ubuntu-latest |
| 57 | + steps: |
| 58 | + - uses: actions/checkout@v2 |
| 59 | + - uses: abhisheknaiidu/todoist-readme@master |
| 60 | + with: |
| 61 | + TODOIST_API_KEY: ${{ secrets.TODOIST_API_KEY }} |
| 62 | + ``` |
| 63 | +3. Go to your repo secrets by hitting `Settings => Secrets` tab in your profile repo. You can also enter the url https://github.com/USERNAME/USERNAME/settings/secrets . Please replace the `USERNAME` with your own username. |
| 64 | +4. Create a new `Secret`. `Name`: `TODOIST_API_KEY`, `Value`: Paste the Todoist API Token here. If you don't know what is the token, please go to [here](https://beta.todoist.com/prefs/integrations) to find your API Key there. |
| 65 | +5. Add a comment to your `README.md` like this: |
| 66 | + |
| 67 | +```markdown |
| 68 | +# Todoist Stats |
| 69 | +<!-- TODO-IST:START --> |
| 70 | +<!-- TODO-IST:END --> |
| 71 | +``` |
| 72 | +6. Go to Workflows menu (mentioned in step 1), click `Todoist Readme`, and click `Run workflow`. |
| 73 | +7. Go to your profile page. you will be able to see it. |
| 74 | + |
| 75 | + |
| 76 | +### Repository Workflow For Premium Users |
| 77 | + |
| 78 | +Please follow the steps below: |
| 79 | + |
| 80 | +1. Go to your `<username>/<username>/actions`, hit `New workflow`, `set up a workflow yourself`, delete all the default content github made for you. |
| 81 | +2. Copy the following code and paste it to your new workflow you created at step 1: |
| 82 | + ```yml |
| 83 | + name: Todoist Readme |
| 84 | +
|
| 85 | + on: |
| 86 | + workflow_dispatch: |
| 87 | + schedule: |
| 88 | + # Runs every minute |
| 89 | + - cron: '* * * * *' |
| 90 | +
|
| 91 | + jobs: |
| 92 | + update-readme: |
| 93 | + name: Update todoist stats |
| 94 | + runs-on: ubuntu-latest |
| 95 | + steps: |
| 96 | + - uses: actions/checkout@v2 |
| 97 | + - uses: abhisheknaiidu/todoist-readme@master |
| 98 | + with: |
| 99 | + TODOIST_API_KEY: ${{ secrets.TODOIST_API_KEY }} |
| 100 | + PREMIUM: true |
| 101 | + ``` |
| 102 | +3. Remaining Steps will be same as Non-Premium Users. |
| 103 | + |
| 104 | +## License |
| 105 | + |
| 106 | +[](https://creativecommons.org/publicdomain/zero/1.0/) |
| 107 | + |
| 108 | +To the extent possible under law, [Abhishek Naidu](https://abhisheknaidu.tech/) has waived all copyright and related or neighboring rights to this work. |
| 109 | + |
| 110 | + |
| 111 | +_Inspired by [yg/todoist-box](https://github.com/yg/todoist-box)_ |
| 112 | +_Inspired by [gautamkrishnar/blog-post-workflow](https://github.com/gautamkrishnar/blog-post-workflow)_ |
0 commit comments