Support for folder with multiple files
alexandrebarbaruiva opened this issue · comments
I'd love to see support for folders as I have many files in a single folder that I'd like to count.
Hi Alexandre, thanks for the suggestion, that sounds very useful! Will add this to my todolist 😊
I'd love to see this function too.
Workarounds for *nix terminals (uses GNU style flags/arguments). Lists word counts for **/*.md
files (all sub-directories).
# Only word counts.
find . -iname '*.md' -print0 | xargs --null --max-args=1 mwc
# Total word count in all files.
find . -iname '*.md' -print0 | xargs --null --max-args=1 mwc | tr '\n' '+' | sed 's/+$/\n/' | bc
# Word count per file, with filename/path, in a table.
find . -iname '*.md' -print0 | sort --zero-terminated | xargs --null --replace='{}' sh -c 'echo "{}" "$(mwc "{}")"' | column --table --table-right 2
This was fixed in #17! Folder-counting is now available through globbing (*.md
). Version v0.1.0 released for this.