2.1.0 • Published 7 years ago

generate_check_md5 v2.1.0

Weekly downloads
3
License
MIT
Repository
github
Last release
7 years ago

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_md5

Usage (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" --sort

Install (Development)

Global Dependencies (Development)

DependencyVersionInstall
NodeJS> 4.x.xhttp://node.org
Npm> 3.x.xhttp://node.org
Yarn> 1.x.xnpm install yarn -g
Auto-cl> 3.x.xnpm install auto-changelog -g

Others Dependencies (Development)

Yarn

Tape the command: yarn

Npm

Tape the command: npm install

Usage (Development)

Tasks

  • $ npm run start: Like npm 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 if npm run test was 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 again npm 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 again npm run compile
  • $ npm run build: Execute npm run compile
  • $ npm run postbuild: Execute npm run check and npm run test after to have execute npm run build
  • $ npm run coverage: Execute the coverage of the code and show the results in the coverage folder
  • $ npm run coveralls: Execute npm run coverage and create the data of the code for coveralls
  • $ npm run postcoveralls: Remove the coverage folder after execute npm run coveralls
  • $ npm run prepublish: Execute the build before to execute npm run publish if npm run publish was 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 call npm 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" --sort

License

MIT © Kévin CARADANT

2.1.0

7 years ago

2.0.2

7 years ago

2.0.1

7 years ago

1.0.0

7 years ago

2.0.0

7 years ago

1.11.0

7 years ago

1.10.0

7 years ago

1.8.1

7 years ago

1.8.0

7 years ago

1.6.0

7 years ago

1.5.0

7 years ago

1.4.1

7 years ago

1.4.0

7 years ago

1.3.0

7 years ago

1.2.13

7 years ago

1.2.12

7 years ago

1.2.11

7 years ago

1.2.10

7 years ago

1.2.9

7 years ago

1.2.8

7 years ago

1.2.7

7 years ago

1.2.6

7 years ago

1.2.5

7 years ago

1.2.4

7 years ago

1.2.3

7 years ago

1.2.2

7 years ago

1.2.1

7 years ago

1.2.0

7 years ago

1.1.1

7 years ago

1.1.0

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago