1
mirror of https://invent.kde.org/network/falkon.git synced 2024-12-20 18:56:34 +01:00
falkonOfficial/scripts/pythonLineCounter.py
nowrep 56397717f9 Add Tab icon next to last tab
Also uploaded scripts for various jobs related to QupZilla to github
(scripts folder)
2011-10-23 14:44:18 +02:00

21 lines
643 B
Python

#!/usr/bin/python
import commands, re
cpp=commands.getoutput("find . -name '*.cpp' | xargs wc -l |grep celkem")
headers=commands.getoutput("find . -name '*.h' | xargs wc -l |grep celkem")
intcpp=int(re.findall(r"\d+",cpp)[0])
intheaders=int(re.findall(r"\d+",headers)[0])
print "\n"
print "##########################"
print "## nowrep line counter! ##"
print "##########################"
print "\n"
print "Lines in Headers (.h files): "+str(intheaders)
print "Lines in Sources (.cpp files): "+str(intcpp)
print "----------------------------------------"
print "\n"
print "::: "+str(intheaders + intcpp)+" LINES IN SUMMARY :::"
print "\n"