Skip to content

Commit 6a12d11

Browse files
authored
Set up for use as Python package (#6)
* Set so loadable module in python * Add python package usage instructions
1 parent 062eb49 commit 6a12d11

File tree

2 files changed

+18
-5
lines changed

2 files changed

+18
-5
lines changed

README.md

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,25 @@ pip install git+https://github.com/Imageomics/sum-buddy
1515

1616
## How it Works
1717

18+
### Command Line Usage
19+
1820
```
1921
usage: sum-buddy [-h] --input-dir INPUT_DIR --output-file OUTPUT_FILE
2022
2123
Generate CSV with filepath, filename, and MD5 checksums for all files in a given directory
2224
2325
options:
24-
-h, --help show this help message and exit
25-
--input-dir INPUT_DIR
26-
Directory to traverse for files
27-
--output-file OUTPUT_FILE
28-
Filepath for the output CSV file
26+
-h, --help show this help message and exit
27+
--input-dir INPUT_DIR Directory to traverse for files
28+
--output-file OUTPUT_FILE Filepath for the output CSV file
29+
```
30+
31+
### Python Package Usage
32+
```python
33+
from sumbuddy import get_checksums
34+
35+
get_checksums("path/to/image/folder", "path/to/checksums.csv")
36+
37+
# outputs status bar followed by
38+
# Checksums written to path/to/checksums.csv
2939
```

src/sumbuddy/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
from sumbuddy.__main__ import md5_checksum, get_checksums
2+
3+
__all__ = ["md5_checksum", "get_checksums"]

0 commit comments

Comments
 (0)