[READ-ONLY] Mirror of https://github.com/probablykasper/readme-template-action. Integrate GitHub API data in your README.md
0

Configure Feed

Select the types of activity you want to include in your feed.

Fix error when no {{ TEMPLATE }} is present

Kasper (Apr 6, 2021, 9:01 PM +0200) d2cedbf9 b54391c5

+46 -46
+20 -20
EXAMPLE_OUTPUT.md
··· 3 3 4 4 ## latest vidl release (custom) 5 5 6 - [vidl 3.5.0](https://github.com/probablykasper/vidl/releases/tag/3.5.0) (22 days ago) 6 + [vidl v3.6.2](https://github.com/probablykasper/vidl/releases/tag/v3.6.2) (2 days ago) 7 7 8 8 ## Specific repos (custom) 9 9 10 10 | ⭐️Stars | 🗓Created | 📦Repo | 📚Description | 11 11 | --------- | -------- | ----------- | -------------- | 12 - | 1 | 2017 October 4th | [probablykasper/vidl](https://github.com/probablykasper/vidl) | Python script for downloading video/audio | 13 - | 75706 | 2014 August 19th | [golang/go](https://github.com/golang/go) | The Go programming language | 14 - | 0 | 2020 August 16th | [probablykasper/embler](https://github.com/probablykasper/embler) | Turn binaries into applications | 12 + | 2 | 2017 October 4th | [probablykasper/vidl](https://github.com/probablykasper/vidl) | Python script for downloading video/audio | 13 + | 84174 | 2014 August 19th | [golang/go](https://github.com/golang/go) | The Go programming language | 14 + | 1 | 2020 August 16th | [probablykasper/embler](https://github.com/probablykasper/embler) | Turn binaries into applications | 15 15 16 16 ## 2 most starred repos list (custom) 17 17 18 - ⭐️ 10 [probablykasper/chester-syntax](https://github.com/probablykasper/chester-syntax): A pretty Atom syntax theme based on Lonely Planet colours 18 + ⭐️ 25 [probablykasper/cpc](https://github.com/probablykasper/cpc): Text calculator with support for units and conversion 19 19 20 - ⭐️ 4 [probablykasper/homebrew-tap](https://github.com/probablykasper/homebrew-tap): My Homebrew casks and formulas 20 + ⭐️ 10 [probablykasper/chester-syntax](https://github.com/probablykasper/chester-syntax): A pretty Atom syntax theme based on Lonely Planet colours 21 21 22 22 23 23 ## Me ··· 30 30 - **COMPANY**: null 31 31 - **LOCATION**: Norway 32 32 - **TWITTER_USERNAME**: probablykasper 33 - - **AVATAR_URL**: https://avatars0.githubusercontent.com/u/11315492?u=c501da00e9b817ffc78faab6c630f236ac2738cf&v=4 34 - - **WEBSITE_URL**: https://kasper.space/ 33 + - **AVATAR_URL**: https://avatars.githubusercontent.com/u/11315492?u=c501da00e9b817ffc78faab6c630f236ac2738cf&v=4 34 + - **WEBSITE_URL**: https://kasper.space 35 35 - **SIGNUP_TIMESTAMP**: 2015-03-04T14:48:35Z 36 36 - **SIGNUP_DATE**: March 4th 2015 37 37 - **SIGNUP_DATE2**: 2015-03-04 38 38 - **SIGNUP_YEAR**: 2015 39 - - **SIGNUP_AGO**: 5 years ago 40 - - **TOTAL_REPOS_SIZE_KB**: 707467 41 - - **TOTAL_REPOS_SIZE_MB**: 707.5 42 - - **TOTAL_REPOS_SIZE_GB**: 0.71 43 - - **TOTAL_REPOSITORIES**: 47 39 + - **SIGNUP_AGO**: 6 years ago 40 + - **TOTAL_REPOS_SIZE_KB**: 1347086 41 + - **TOTAL_REPOS_SIZE_MB**: 1347.1 42 + - **TOTAL_REPOS_SIZE_GB**: 1.35 43 + - **TOTAL_REPOSITORIES**: 64 44 44 45 45 ## 3 most starred repos 46 46 47 47 | ⭐️Stars | 📦Repo | 📚Description | 48 48 | --------- | ----------- | -------------- | 49 + | 25 | [probablykasper/cpc](https://github.com/probablykasper/cpc) | Text calculator with support for units and conversion | 49 50 | 10 | [probablykasper/chester-syntax](https://github.com/probablykasper/chester-syntax) | A pretty Atom syntax theme based on Lonely Planet colours | 50 51 | 4 | [probablykasper/homebrew-tap](https://github.com/probablykasper/homebrew-tap) | My Homebrew casks and formulas | 51 - | 2 | [probablykasper/cryp](https://github.com/probablykasper/cryp) | Cryptocurrency portfolio tracker | 52 52 53 53 ## 3 newest repos list 54 54 55 55 | ⭐️Stars | 📦Repo | 📚Description | 56 56 | --------- | ----------- | -------------- | 57 - | 0 | [probablykasper/readme-template-action-test](https://github.com/probablykasper/readme-template-action-test) | test repo for readme-template-action | 58 - | 0 | [probablykasper/readme-template-action](https://github.com/probablykasper/readme-template-action) | Fills in variables (with loop support) from a TEMPLATE.md into a README.md | 59 - | 0 | [probablykasper/embler](https://github.com/probablykasper/embler) | Turn binaries into applications | 57 + | 0 | [probablykasper/svelte-typescript-possibly-null-bug](https://github.com/probablykasper/svelte-typescript-possibly-null-bug) | null | 58 + | 0 | [probablykasper/rust-id3](https://github.com/probablykasper/rust-id3) | A rust library for reading and writing ID3 metadata | 59 + | 0 | [probablykasper/mp4-rust](https://github.com/probablykasper/mp4-rust) | :movie_camera: MP4 reader and writer library in Rust! 🦀 | 60 60 61 61 ## 3 recently pushed repos 62 62 63 63 | ⭐️Stars | 📦Repo | 📚Description | 64 64 | --------- | ----------- | -------------- | 65 - | 0 | [probablykasper/readme-template-action-test](https://github.com/probablykasper/readme-template-action-test) | test repo for readme-template-action | 66 - | 0 | [probablykasper/readme-template-action](https://github.com/probablykasper/readme-template-action) | Fills in variables (with loop support) from a TEMPLATE.md into a README.md | 67 - | 0 | [probablykasper/cpc](https://github.com/probablykasper/cpc) | Text calculator with support for units and conversion | 65 + | 0 | [probablykasper/v4.kasper.space](https://github.com/probablykasper/v4.kasper.space) | Personal website | 66 + | 3 | [probablykasper/redlux](https://github.com/probablykasper/redlux) | AAC decoder for MPEG-4 and AAC files, with rodio support | 67 + | 0 | [probablykasper/probablykasper](https://github.com/probablykasper/probablykasper) | null |
+24 -21
README.md
··· 80 80 81 81 | Variable | Example | 82 82 | ------------------------ | ------- | 83 - | {{ USERNAME}} | probablykasper 84 - | {{ NAME}} | Kasper 85 - | {{ EMAIL}} | email@example.com 86 - | {{ USER_ID}} | MDQ6VXNlcjExMzE1NDky 87 - | {{ BIO}} | Fullstack developer from Norway 88 - | {{ COMPANY}} | Microscopicsoft 89 - | {{ LOCATION}} | Norway 90 - | {{ TWITTER_USERNAME}} | probablykasper 91 - | {{ AVATAR_URL}} | https://avatars0.githubusercontent.com/u/11315492?u=c501da00e9b817ffc78faab6c630f236ac2738cf&v=4 92 - | {{ WEBSITE_URL}} | https://kasper.space/ 93 - | {{ SIGNUP_TIMESTAMP}} | 2015-03-04T14:48:35Z 94 - | {{ SIGNUP_DATE}} | March 4th 2015 95 - | {{ SIGNUP_DATE2}} | 2015-03-04 96 - | {{ SIGNUP_YEAR}} | 2015 97 - | {{ SIGNUP_AGO}} | 5 years ago 98 - | {{ TOTAL_REPOS_SIZE_KB}} | 707453 99 - | {{ TOTAL_REPOS_SIZE_MB}} | 707.5 100 - | {{ TOTAL_REPOS_SIZE_GB}} | 0.71 101 - | {{ TOTAL_REPOSITORIES}} | 46 83 + | {{ USERNAME }} | probablykasper 84 + | {{ NAME }} | Kasper 85 + | {{ EMAIL }} | email@example.com 86 + | {{ USER_ID }} | MDQ6VXNlcjExMzE1NDky 87 + | {{ BIO }} | Fullstack developer from Norway 88 + | {{ COMPANY }} | Microscopicsoft 89 + | {{ LOCATION }} | Norway 90 + | {{ TWITTER_USERNAME }} | probablykasper 91 + | {{ AVATAR_URL }} | https://avatars0.githubusercontent.com/u/11315492?u=c501da00e9b817ffc78faab6c630f236ac2738cf&v=4 92 + | {{ WEBSITE_URL }} | https://kasper.space/ 93 + | {{ SIGNUP_TIMESTAMP }} | 2015-03-04T14:48:35Z 94 + | {{ SIGNUP_DATE }} | March 4th 2015 95 + | {{ SIGNUP_DATE2 }} | 2015-03-04 96 + | {{ SIGNUP_YEAR }} | 2015 97 + | {{ SIGNUP_AGO }} | 5 years ago 98 + | {{ TOTAL_REPOS_SIZE_KB }} | 707453 99 + | {{ TOTAL_REPOS_SIZE_MB }} | 707.5 100 + | {{ TOTAL_REPOS_SIZE_GB }} | 0.71 101 + | {{ TOTAL_REPOSITORIES }} | 46 102 102 103 103 ### Variables you can put inside `repo` loops 104 104 ··· 260 260 261 261 ## Dev instructions 262 262 263 - ### Test offline 264 - 265 263 First, to get started: 266 264 267 265 1. Install [Node.js](https://nodejs.org/) ··· 280 278 ```sh 281 279 npm run test 282 280 ``` 281 + 282 + Build: 283 + ```sh 284 + npm run build 285 + ```
+1 -4
dist/index.js
··· 10941 10941 10942 10942 function getCustomTemplate(str) { 10943 10943 const parsed = parseBlock(str, '// {{ TEMPLATE: }}', '// {{ :TEMPLATE }}') 10944 - if (!parsed) return {} 10944 + if (!parsed) return { customTemplate: {}, outputStr: str } 10945 10945 parsed.beforeBlock = deleteLastLine(parsed.beforeBlock) 10946 10946 parsed.afterBlock = deleteFirstLine(parsed.afterBlock) 10947 10947 ··· 10994 10994 const user = await queries.getUser() 10995 10995 console.log(' - Injecting') 10996 10996 outputStr = inject(outputStr, user) 10997 - if (user.USERNAME === 'github-actions[bot]') { 10998 - console.log('Warning: The username is "github-actions[bot]". You may have forgotten to add your github token secret') 10999 - } 11000 10997 11001 10998 if (!customTemplate['3_MOST_STARRED_REPOS']) { 11002 10999 customTemplate['3_MOST_STARRED_REPOS'] = {
+1 -1
src/main.js
··· 31 31 32 32 function getCustomTemplate(str) { 33 33 const parsed = parseBlock(str, '// {{ TEMPLATE: }}', '// {{ :TEMPLATE }}') 34 - if (!parsed) return {} 34 + if (!parsed) return { customTemplate: {}, outputStr: str } 35 35 parsed.beforeBlock = deleteLastLine(parsed.beforeBlock) 36 36 parsed.afterBlock = deleteFirstLine(parsed.afterBlock) 37 37