prosegrinder / python-prosegrinder

A relatively fast, functional prose text counter with readability scoring.
GNU General Public License v3.0
3 stars 2 forks source link

Multifile cli #22

Closed yvlcmb closed 2 years ago

yvlcmb commented 2 years ago

Pull request for prospector branch that adds multiple file support for Issue #20

1) Added a for loop to cli in __main__.py to handle multiple files from the command line. The only change was renaming @click.argument to 'files' and adding the nargs=-1 argument.

2) Updated tests/test_cli.py to incorporate new functionality and it is passing according to pytest. Instead of adding a new file to tests/resources/ , I just used the pre-existing copyright.txt file there. To get the test to pass I had to run the CLI first on both shortstory.txt and copryright.txt then appended the output to cli-default.json

To run use:

$ prosegrinder file1 file2 file3
davidlday commented 2 years ago

@slingload - I'm working on moving linting to GitHub actions and ditch Codacy. Hopefully have all that completed and merged later today. So ignore the failing lint check for now - I'm fixing in my other PR.

davidlday commented 2 years ago

Didn't mean to close this! Can you repoint it to main instead, pls?

Nevermind - I'm resolving conflict here and will merge.