# comgen

> Auto generate fake commits and messages

Latest version **1.2.1** (published 2018-09-03) · MIT license · 0 weekly downloads

## Install

```sh
npm install comgen
pnpm add comgen
yarn add comgen
bun add comgen
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.1 |
| Published | 2018-09-03 |
| First published | 2018-09-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 5.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Patricio Vargas |
| Maintainers | pevargasg |

## Links

- npm: https://www.npmjs.com/package/comgen
- Repository: https://github.com/pevargasg/auto-commitGenerator
- Homepage: https://github.com/pevargasg/auto-commitGenerator#readme
- Issues: https://github.com/pevargasg/auto-commitGenerator/issues
- npm.io page: https://npm.io/package/comgen

## Dependencies (1)

- [comgen](https://npm.io/package/comgen.md) ^1.0.0

## Recent versions

- 1.2.1 (latest) — 2018-09-03
- 1.2.0 — 2018-09-03
- 1.1.3 — 2018-09-03
- 1.1.2 — 2018-09-03
- 1.1.1 — 2018-09-03
- 1.1.0 — 2018-09-03
- 1.0.5 — 2018-09-03
- 1.0.4 — 2018-09-03
- 1.0.3 — 2018-09-03
- 1.0.2 — 2018-09-03
- 1.0.1 — 2018-09-03
- 1.0.0 — 2018-09-03

## README

# Commit generator

Tired of creating a lot of commits to make your github profile look cool? This script will generate as many commits as you want in the number of days that you assign. This script will also create random messages for your commits.

## Getting Started

Run the following npm command to install

```
npm i comgen
```

URL: https://www.npmjs.com/package/comgen
<br/>
<br/>
OR
<br/>
<br/>
1.Fork this repo https://github.com/pevargasg/auto-commitGenerator
<br/>
2.Clone the forked repo into your local environment
<br/>
3.Run npm install
<br/>
4.Open the commit-generator.sh file under your node_modules/comgen
<br/>
5.Modify the variables

```
days = represent the number of days, the number of commits will be assigned
hours = represent the number of hours, the number of commits will be assigned
minutes = represent the number of minutes, the number of commits will be assigned
totalNumberOfCommits = number of commits
```

### NPM Run

In you package.json you can add the following line under scripts:

```
"scripts": {
    "comgen": "sh node_modules/comgen/commit-generator.sh"
 }
```

This will run the the shell file by doing <strong>npm run comgen</strong>

### Examples of Usage

<strong>npm run comgen d 365 h 24 m 60 c 100</strong>
<br/>
<strong>npm run comgen</strong>
<br/>
<strong>npm run comgen days 365 hours 24 minutes 60 commits 100</strong>
<br/>
Note that the deafault values are days :365, hours: 24, minutes: 60 and total commits: 300

```
d: days
h: hours
m: minutes
c: number of commits
```

### Shell Script

```
days=365
hours=24
minutes=60
commits=300

while [ $# -ne 0 ]; do
  case "$1" in
    "d"|"days") days=$2; shift 2;;
    "h"|"hours") hours=$2; shift 2;;
    "m"|"minutes") minutes=$2; shift 2;;
    "c"|"commits") commits=$2; shift 2;;
    *) break;;
  esac
done

lenghtOfTime=$((days*hours*minutes))
arrayOfCommits=$(shuf -i 1-$lenghtOfTime -n $commits | sort -r -n)

echo "Days: $days"
echo "Hours: $hours"
echo "Minutes: $minutes"
echo "Commits: $commits"

for index in $arrayOfCommits
  do
    randomMessage=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)
    git commit --allow-empty --date "$(date -d "-$index minutes")" -m "$randomMessage"
  done
git push origin master
```

## Contributing

Contact me wearetamo@gmail.com to make any contribution to this repo

## Authors

- **Patricio Vargas** - _Initial work_

See also the list of [contributors](https://github.com/pevargasg/auto-commitGenerator/graphs/contributors) who participated in this project.

## License

This project is licensed under the MIT License - see the [https://github.com/pevargasg/auto-commitGenerator/blob/master/LICENSE](LICENSE.md) file for details

```

```

---
_Source: https://npm.io/package/comgen · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
