https://github.com/f-lombardo/file-statistics
https://github.com/f-lombardo/file-statistics
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/f-lombardo/file-statistics
- Owner: f-lombardo
- Created: 2023-10-29T23:16:15.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2023-10-30T12:03:45.000Z (over 1 year ago)
- Last Synced: 2023-10-30T13:24:37.967Z (over 1 year ago)
- Language: TypeScript
- Size: 38.1 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# File statistics
This is a Typescript command line application that asks the user for a path or an URL pointing to some text and then
prints on the console these statistics:
- total number of words;
- total number of letters;
- total number of blanks;
- words repeated more than 10 times.## How to run the project
### Linux and Mac
At the first execution of the program run in a console window from the root of the project `./scripts/prepare.sh`.
Then to call the program run `./scripts/prepare.sh`.
### Windows (or manual execution)
To prepare the environment run in a command window.
```
npm install
npm run build
```
Then to run the program:
```
npm start
```
### Docker
This is best suited for URL files, even if you could use the `fixtures` mounted volume. Run:
`docker compose run --rm app npm start`## Running tests
After having prepared the environment (see above) run `npm run test`