Browse Source

Make project name configurable (-c project_name=foo).

Heikki Hokkanen 15 years ago
parent
commit
8c0032c63b
1 changed files with 5 additions and 1 deletions
  1. 5
    1
      gitstats

+ 5
- 1
gitstats View File

37
 	'commit_begin': '',
37
 	'commit_begin': '',
38
 	'commit_end': '',
38
 	'commit_end': '',
39
 	'linear_linestats': 1,
39
 	'linear_linestats': 1,
40
+	'project_name': '',
40
 }
41
 }
41
 
42
 
42
 def getpipeoutput(cmds, quiet = False):
43
 def getpipeoutput(cmds, quiet = False):
90
 	# This should be the main function to extract data from the repository.
91
 	# This should be the main function to extract data from the repository.
91
 	def collect(self, dir):
92
 	def collect(self, dir):
92
 		self.dir = dir
93
 		self.dir = dir
93
-		self.projectname = os.path.basename(os.path.abspath(dir))
94
+		if len(conf['project_name']) == 0:
95
+			self.projectname = os.path.basename(os.path.abspath(dir))
96
+		else:
97
+			self.projectname = conf['project_name']
94
 	
98
 	
95
 	##
99
 	##
96
 	# Load cacheable data
100
 	# Load cacheable data