|
Project Information
Links
|
StatusThis project has beta status: use at your own risk! Please submit bugs as you find them. SummaryCleanup whitespace in text files:
UsagePreconditions: Python is required, EasyInstall recommended. Install like this: $sudo easy_install -U tabfix or on Windows: >easy_install -U tabfix Syntax: $ tabfix --help
Usage: tabfix [options] [PATH]
Options:
--version show program's version number and exit
-h, --help show this help message and exit
-s N, --tab-size=N set target tab size (default: 4)
--input-tab-size=N assume tab size of input file to be N (default: target
tab size)
-t, --tabbify uses tabs for indentation (default: use spaces
--line-separator=MODE
line separator used for output file. Possible values:
Unix, Windows, Mac, LF, CRLF, CR (default: keep mode
from input file)
-x, --execute turn off the dry-run mode (which is ON by default),
that would just print status messages but does not
change anything
-m MATCHLIST, --match=MATCHLIST
match this file name pattern (option may be repeated)
-r, --recursive visit sub directories
-o FILENAME, --target=FILENAME
name of output file
--no-backup prevent creation of backup files (*.bak)
-q, --quiet don't print status messages to stdout (verbosity 0)
-v, --verbose increment verbosity to 2 (use -vv for 3, ...)
--zip-backup add backups of modified files to a zip-file
See also http://tabfix.googlecode.com
$ Example Fix whitespace in all JavaScript and HTML files in the current directory and all sub directories. > tabfix -t -r -m*.js -m*.html By default, the script is in dry-run mode, so only status messages are printed, but no files are changed. > tabfix -t -r -m*.js -m*.html -x Example Fix whitespace (using 4 spaces for indentation) in two source files: > tabfix foo.js bar.html Example Cleanup test.html and write output to test2.html. Convert tabs to 4 spaces, assuming original tab size was 2. >tabfix --input-tab-size=2 test.html -otest2.html -vv |