https://github.com/md-command-line/readmegenerator
(command-line/website) that analyzes your repo code percentage and adds nice sections such as the correct install instructions to your Readme in a safe manner.
https://github.com/md-command-line/readmegenerator
Last synced: 4 months ago
JSON representation
(command-line/website) that analyzes your repo code percentage and adds nice sections such as the correct install instructions to your Readme in a safe manner.
- Host: GitHub
- URL: https://github.com/md-command-line/readmegenerator
- Owner: md-command-line
- Created: 2019-06-14T17:36:27.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2019-06-14T18:46:55.000Z (about 7 years ago)
- Last Synced: 2025-07-02T05:05:49.215Z (12 months ago)
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Readme Generator
(command-line/website) that analyzes your repo code percentage and adds nice sections such as the correct install instructions to your Readme in a safe manner.
## Current Usage:
```bash
# not currently implemented npx readmegenerator
```
## Plan:
1) get the organization and repo
```bash
url=$(git remote get-url origin) &&
suffix=$(basename $url) &&
organization=$(basename ${url%"$suffix"}) &&
repo=$(basename $url .git) &&
echo $organization $repo || echo 'something failed'
```
2) get the languages for the project:
```
curl https://api.github.com/repos/michaeldimmitt/meetup-subscribe/languages
{
"JavaScript": 27686,
"HTML": 1586,
"CSS": 848
}
curl https://api.github.com/repos/michaeldimmitt/$dir/languages
```
3) Check the Readme to see if it needs install instructions:
```bash
cat R*.md | grep "Setup\|Usage\|Install"
```
4) Calculate the percentages and determine if they are acceptable to add install instructions to the readme.
5) Download the winning Readme files:
```bash
cp R*.md AppendedReadme.md
curl -L https://raw.githubusercontent.com/MichaelDimmitt/readmegenerator/master/readmes/React.md >> AppendedReadme.md
curl -L https://raw.githubusercontent.com/MichaelDimmitt/readmegenerator/master/readmes/javascript.md >> AppendedReadme.md
echo 'Your readme is ready! check using:
cat AppendedReadme.md;
or accept the chages using:
mv AppendedReadme.md; Readme.md;
If you do not like the resulting git diff, undo our changes with git checkout Readme.md; 😘'
```
## Alternatives if the Plan goes wrong.
1) get the name of the project:
```bash
dir=${PWD##*/}
echo $dir
```
2) get the remote
```
# url=$(git remote -v | grep fetch | awk '{print $2}')
# $(git config --get remote.origin.url)
# this is not the correct url for api... maybe I will use gh_reveal's url parser to build the url.
```
## Additional Links:
https://github.com/MichaelDimmitt/automate-shared-markdown/blob/master/Readme.md