예제 #1
0
def printTable(pathDir, header,  title,  mv2): 
	print '<table id="' + header + '" class="mod_table"><tr>'
	print '<td class="table_header" colspan="4" title="' + title + '">' + header + '</td></tr>'
	modGreen = lib_mod_map.getModGreen(modArr, pathDir)
	modGrey = lib_mod_map.getModGrey(modGreen, pathDir)
	if not len(modGreen) == len(modGrey) == 0:
		for a in modGreen:
			fullname = ('value="', pathDir,'/', a, '">')
			printULgreen ( a, fullname )
		for b in modGrey:
			fullname = ('value="', pathDir,'/', b, '">')
			printULgrey( b, fullname,  mv2 )
	else:
		if len(os.listdir(pathDir)) == 0:
			print '<tr><td><p class="disabled"  >' + empty + '</p></td></tr>'
						
		
	print '</table>'
	for subdir in lib_mod_map.getSubdirs(pathDir, 'not_include_root'):
		subdirType = lib_mod_map.testSubdirs(lib_mod_map.getSubdirs(subdir, 'include_root'), modArr)
		if not  subdirType == 'none':
			print '<table class="subdir_table" >'
			printSubdirHeader( subdir,  subdirType, mv2, pathDir)
			modGreen = lib_mod_map.getModGreen(modArr, subdir)
			for a in modGreen:
				fullname = ('value="', subdir,'/', a, '">')
				printULgreen ( a,  fullname )
			for b in lib_mod_map.getModGrey(modGreen, subdir):
				fullname = ('value="', subdir ,'/', b, '">')
				printULgrey( b, fullname,  'none' )
			print '</table>'
예제 #2
0
파일: repo.py 프로젝트: vpashka/magos-linux
def makeList(pathDir):
    dirList = {}
    for subdir in lib_mod_map.getSubdirs(pathDir, 'include_root'):
        sizeList = {}
        dirLs = getList(subdir)
        if not len(dirLs) == 0:
            for b in dirLs:
                size = os.path.getsize(subdir + '/' + b) / 1024
                sizeList[b] = size
                dirList[subdir.replace(pathDir, '')] = sizeList
    return dirList
예제 #3
0
def makeList(pathDir):
	dirList = {}
	for subdir in lib_mod_map.getSubdirs(pathDir, 'include_root'):
		sizeList = {}
		dirLs = getList(subdir)
		if not len(dirLs) == 0:
			for b in dirLs:
				size = os.path.getsize(subdir + '/' + b) / 1024
				sizeList[b] = size
				dirList[subdir.replace(pathDir, '')] = sizeList
	return dirList