generate_check_md5 v2.1.0
Generator / Comparator MD5
Description
With this generator, you can very easily create a MD5 hash on each files wanted. Furthemore, you can compare two MD5 files and see the difference. That's make sense, for example, if you want to compare a file which is on HARDDRIVE A and an other file which is on HARDDRIVE B and be sure the files aren't corrupted. Very useful in the case of the backup copy.
Install (Production)
npm install -g generate_check_md5Usage (Production)
How it works ? (Production)
// To generate MD5 on console (only) :
gcmd5 --path "/path/to/the/my_directory_with_files1/" "/path/to/the/my_directory_with_files2/"
// To generate MD5 and write it in the file :
gcmd5 --path "/path/to/the/my_directory_with_files1/" "/path/to/the/my_directory_with_files2/" --dest "/path/to/write/file_md5_results.txt"
// To compare two md5 files :
gcmd5 --source "/path/to/the/md5_file_source_its_the_reference.txt/" --compare "/path/to/the/md5_file_to_be_compared_with_source_file.txt/"
// To generate AND compare md5 files in the same :
gcmd5 --path "/path/to/the/my_directory_with_files1/" "/path/to/the/my_directory_with_files2/" --dest "/path/to/write/file_md5_results.txt" --source "/path/to/the/md5_file_source_its_the_reference.txt/" --compare "/path/to/the/md5_file_to_be_compared_with_source_file.txt/"
//------------------------------------ OPTIONAL: ------------------------------------
// To rename files name in the file of results without space :
gcmd5 your_arguments --nospace
// Example:
// Before: /Folder1/my file for example.mkv a9asd1171dd83e122598af664bd3f785)
// After: /Folder1/my_file_for_example.mkv a9asd1171dd83e122598af664bd3f785)
// To ask only an update between a path and your md5 files :
gcmd5 your_arguments --update
// NB: By default, if you don't specify --update or --rewrite, it's the argument --update which is selected
// To rewrite completely your md5 files got with --dest :
gcmd5 your_arguments --rewrite
// To sort using the natural sort on the file with --dest :
gcmd5 your_other_args --dest "your_file" --sortInstall (Development)
Global Dependencies (Development)
| Dependency | Version | Install |
|---|---|---|
| NodeJS | > 4.x.x | http://node.org |
| Npm | > 3.x.x | http://node.org |
| Yarn | > 1.x.x | npm install yarn -g |
| Auto-cl | > 3.x.x | npm install auto-changelog -g |
Others Dependencies (Development)
Yarn
Tape the command: yarn
Npm
Tape the command: npm install
Usage (Development)
Tasks
$ npm run start: Likenpm run dev$ npm run clean: Remove the bin and coverage folders$ npm run lint: Apply a TSlinter on the src and tests folders$ npm run check: Apply the linter and check if the dependencies required in ts files is also present in the package.json$ npm run pretest: Before the tests, we start the ts compiler ifnpm run testwas called$ npm run test: Execute once all the tests available$ npm run test:watch: When the bin or src folder's files change, we do againnpm run test$ npm run compile: Compile all src files with ts compiler and get the bin output folder$ npm run compile:watch: When the src folder's files change, we do againnpm run compile$ npm run build: Executenpm run compile$ npm run postbuild: Executenpm run checkandnpm run testafter to have executenpm run build$ npm run coverage: Execute the coverage of the code and show the results in the coverage folder$ npm run coveralls: Executenpm run coverageand create the data of the code for coveralls$ npm run postcoveralls: Remove the coverage folder after executenpm run coveralls$ npm run prepublish: Execute the build before to executenpm run publishifnpm run publishwas called$ npm run deploy: Execute a pull / rebase and push on github (origin master)$ npm run patch: Create a tag 0.0.X and publish the npm module$ npm run minor: Create a tag 0.X.0 and publish the npm module$ npm run major: Create a tag X.0.0 and publish the npm module$ npm run postpublish: After to callnpm run publish, We push the new tag on the github (origin master)$ npm run autocl: Generate a Changelog file using the commits on github
How it works ? (Develoment)
1- Go in the bin folder.
2- Choose one of these commands:
// To generate MD5 on console (only) :
node index.js --path "/path/to/the/my_directory_with_files/1" "/path/to/the/my_directory_with_files/2"
// To generate MD5 and write it in the file :
node index.js --path "/path/to/the/my_directory_with_files1/" "/path/to/the/my_directory_with_files2/" --dest "/path/to/write/file_md5_results.txt"
// To compare two md5 files :
node index.js --source "/path/to/the/md5_file_source_its_the_reference.txt/" --compare "/path/to/the/md5_file_to_be_compared_with_source_file.txt/"
// To generate AND compare md5 files in the same :
node index.js --path "/path/to/the/my_directory_with_files1/" "/path/to/the/my_directory_with_files2/" --dest "/path/to/write/file_md5_results.txt" --source "/path/to/the/md5_file_source_its_the_reference.txt/" --compare "/path/to/the/md5_file_to_be_compared_with_source_file.txt/"
//------------------------------------ OPTIONAL: ------------------------------------
// To rename files name in the file of results without space :
node index.js your_arguments --nospace
// Example:
// Before: /Folder1/my file for example.mkv a9asd1171dd83e122598af664bd3f785)
// After: /Folder1/my_file_for_example.mkv a9asd1171dd83e122598af664bd3f785)
// To ask only an update between a path and your md5 files :
node index.js your_arguments --update
// NB: By default, if you don't specify --update or --rewrite, it's the argument --update which is selected
// To rewrite completely your md5 files got with --dest :
node index.js your_arguments --rewrite
// To sort using the natural sort on the file with --dest :
node index.js your_other_args --dest "your_file" --sortLicense
MIT © Kévin CARADANT
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago