php-plantumlwriter icon indicating copy to clipboard operation
php-plantumlwriter copied to clipboard

Filtering filename

Open yangxikun opened this issue 10 years ago • 5 comments

Hello, I hope the write command have some options to filter file according filename extension, which should be include or exclude when parsing. Also it's best to let user decide whether to parsing recursively.

yangxikun avatar Jul 23 '14 11:07 yangxikun

You can actually achieve this using find and xargs. This parses only php files in the current directory:

find ./ -maxdepth 1 -name "*.php" | xargs php-plantuml write

davidfuhr avatar Jul 25 '14 09:07 davidfuhr

Get it, thanks!

yangxikun avatar Jul 26 '14 03:07 yangxikun

A careful remark on the xargs solution: it will work when there are not too many files. There's a limit to number of arguments or you'll get xargs: argument line too long

pjordaan avatar Dec 03 '14 07:12 pjordaan

Thanks for the remark!

davidfuhr avatar Dec 05 '14 09:12 davidfuhr

You can use "-n number" params to limit the number of arguments which xargs pass to php-plantuml everytime.

yangxikun avatar Dec 09 '14 04:12 yangxikun