https://github.com/tejasmr/genreadme
Generate README.md with code snippets from the relative file paths
https://github.com/tejasmr/genreadme
dockerfile generator github-actions markdown python readme
Last synced: 3 months ago
JSON representation
Generate README.md with code snippets from the relative file paths
- Host: GitHub
- URL: https://github.com/tejasmr/genreadme
- Owner: tejasmr
- Created: 2022-05-14T13:35:12.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2022-05-14T16:13:51.000Z (about 3 years ago)
- Last Synced: 2025-01-29T05:23:09.901Z (5 months ago)
- Topics: dockerfile, generator, github-actions, markdown, python, readme
- Language: Python
- Homepage:
- Size: 24.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# genREADME
# Generated code snippets
## Pokemon
```c
#includeint main() {
printf("pokemon\n");
}
```
## Main
```ts
console.log("another");
```## Usage
To Generate a README.md with code snippets. In your MAIN.md or any other file, use
`gen => [alt-name](link)`
for creating a code snippet.
1. alt-name will be the title if with_title = true and it is not empty
2. other wise if with_title = true, the the filename with first letter capitalized will be the title
3. link refers to the relative path to the file### Example workflow
```yaml
name: My Workflow
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Generate README.md
uses: tezz-io/genREADME@main
with:
file: "MAIN.md"
with_title: "true"
n_hashes: "2"
- name: Setup Username and email
run: |
git config user.name github-actions
git config user.email [email protected]
- name: Push generated README.md
run: |
git add .
git commit -m "Generated README.md"
git push
```### Inputs
| Input | Description |
|------------------------------------------------------|-----------------------------------------------|
| `file` | Path to MAIN.md or other .md file |
| `with_title` | Whether the title of the snippet should be present |
| `n_hashes` | The number of hashes before the title |