Skip to content

Commit

Permalink
Updated dataCounter.py.
Browse files Browse the repository at this point in the history
  • Loading branch information
DevReaper0 committed Oct 18, 2021
1 parent f627fb6 commit 12472c4
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions dataCounter.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,13 @@
import os

rcmd = "( find ./ -name '*.%s' -print0 | xargs -0 cat ) | wc -l"
types = ['c', 'cpp', 'h', 'hpp', 'py', 'para', 'paracode', 'go', 'sh']
types = ['c', 'cpp', 'h', 'hpp', 'py', 'para', 'paracode', 'sh']

if len(sys.argv) > 1:
if sys.argv[1].lower() == "lines":
rcmd = "( find ./ -name '*.%s' -print0 | xargs -0 cat ) | wc -l"
elif sys.argv[1].lower() == "words":
rcmd = "( find ./ -name '*.%s' -print0 | xargs -0 cat ) | wc -w"
elif sys.argv[1].lower() == "chars":
rcmd = "( find ./ -name '*.%s' -print0 | xargs -0 cat ) | wc -m"
elif sys.argv[1].lower() == "bytes":
rcmd = "( find ./ -name '*.%s' -print0 | xargs -0 cat ) | wc -c"
elif sys.argv[1].lower() == "maxlinelength" or sys.argv[1].lower() == "max-line-length" or sys.argv[1].lower() == "mll":
rcmd = "( find ./ -name '*.%s' -print0 | xargs -0 cat ) | wc -L"

Expand All @@ -30,8 +26,6 @@
types = ['para', 'paracode']
elif sys.argv[2].lower() == "main":
types = ['c', 'cpp', 'h', 'hpp', 'py', 'para', 'paracode']
elif sys.argv[2].lower() == "go":
types = ['go']
elif sys.argv[2].lower() == "sh":
types = ['sh']

Expand Down

0 comments on commit 12472c4

Please sign in to comment.