pip install -r requirements/requirements.txt
python setup.py install
crlf --help
Tool crlf
can be used to change line endings to CRLF or LF of a single file, all files in a directory
or all nested directories (with option -R
).
Show help message and options
crlf --help
crlf -h
Perform dry-run - inspect how the files would change, without actually modifying files:
crlf --dry-run # no files will be changed
Suppress output - display only summary:
crlf --quiet # display only summary
crlf -q
Suppress complete output - display nothing:
crlf --silent
crlf -s
Show version:
crlf --version
crlf -V # uppercase "V"
Change file line endings:
crlf ./file.txt --to crlf # change line endings of "file.txt" to CRLF
crlf ./file.txt --to lf
Change line endings of files in directory:
crlf directory/ --to crlf # change line endings of all files in "directory" to CRLF
crlf directory/ --to lf
Change line endings of files in directory and its nested directories
crlf -R directory/ --to crlf # change line endings of all nested files in "directory" to CRLF
crlf -R directory/ --to lf
Example of standard execution:
crlf . --to crlf
Updated: .gitignore
Updated: CONTRIBUTING.md
Failed: file.txt
^ ! expected text file in unicode encoding, failed to parse file
Updated: ReadMe.md
Updated: setup.py
Ignored: version
^ file already has CRLF line endings
Updated: version.py
Done. Updated: 5 files, ignored: 1 files, failed to read: 1 files.
Example of quiet execution:
crlf . --to crlf --quiet
Done. Updated: 5 files, ignored: 1 files, failed to read: 1 files.