Skip to content

Commit

Permalink
feat: updating docs and fixing import error
Browse files Browse the repository at this point in the history
  • Loading branch information
fafnirZ committed Jun 14, 2024
1 parent e69197e commit b7b719a
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 4 deletions.
15 changes: 14 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,14 @@
# git-chfrq
# git-chfrq

## Installation
```
git clone git@github.com:fafnirZ/git-chkfrq.git
cd git-chkfrq/
pip3 install .
```

this should install the `git-chkfrq` command

## Usage
run `git-chkfrq` for some usage instructions and notes
11 changes: 10 additions & 1 deletion git_chkfrq/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,16 @@ def main():


if len(sys.argv) != 3:
print("Usage: python3 -m git-chfrq {path_to_repo} {date_expr}")
print("Usage: git-chkfrq {path_to_repo} {date_expr}")
example_str = (
"Example:\n"
" git-chkfrq ./ 9d\n"
" git-chkfrq ./ 1y\n\n"
"allowed date_expression regex: (-)?[0-9]+(d|m|y)\n"
"NOTE: it will always be a relative time from now to a point in the past\n"
"as you cannot compare with future commits that do not exist\n"
)
print(example_str)
exit(1)

# get where user is executing the script
Expand Down
3 changes: 2 additions & 1 deletion git_chkfrq/utils.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import math
import re
from git.diff import Diff
from pathlib import Path
from datetime import datetime, timedelta
from dateutil.relativedelta import relativedelta
from git import Repo

def continguous_zip(l: list):
"""generated by gpt
Expand Down
1 change: 0 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
install_requires=[
'GitPython',
'python-dateutil',
'pathlib',
],
entry_points={
'console_scripts': [
Expand Down

0 comments on commit b7b719a

Please sign in to comment.