#NEWLINE# def writeContent( self , commitId , version , date ) : #NEWLINE# #INDENT# webContent = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# filename = 'gkno-web-content.json' #NEWLINE# fileHandle = open ( filename , 'w' ) #NEWLINE# webContent [ '__gkno__' ] = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# webContent [ '__gkno__' ] [ 'version' ] = version #NEWLINE# webContent [ '__gkno__' ] [ 'commit' ] = commitId #NEWLINE# webContent [ '__gkno__' ] [ 'date' ] = date #NEWLINE# execute = Popen ( [ 'git' , 'submodule' ] , stdin = PIPE , stdout = PIPE , stderr = PIPE ) #NEWLINE# ( output , error ) = execute . communicate ( ) #NEWLINE# success = execute . returncode #NEWLINE# for line in output . split ( '\n' ) : #NEWLINE# #INDENT# lineList = line . split ( ' ' ) #NEWLINE# if ( len ( lineList ) > 2 ) : #NEWLINE# #INDENT# commit = lineList [ 1 ] #NEWLINE# name = lineList [ 2 ] #NEWLINE# name = name . replace ( '../' , '' ) #NEWLINE# if name . startswith ( 'resources' ) : #NEWLINE# #INDENT# name = name . replace ( 'resources/' , '' ) . lower ( ) #NEWLINE# self . resourcesInformation [ name ] = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# self . resourcesInformation [ name ] [ 'commit' ] = commit #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if name . startswith ( 'tools' ) : #NEWLINE# #INDENT# name = name . replace ( 'tools/' , '' ) . lower ( ) #NEWLINE# if ( name in self . toolInformation ) : #NEWLINE# #INDENT# self . toolInformation [ name ] [ 'commit' ] = commit #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# webContent [ 'categories' ] = self . categories #NEWLINE# webContent [ 'tools' ] = self . toolInformation #NEWLINE# webContent [ 'pipelines' ] = self . pipelineInformation #NEWLINE# webContent [ 'resources' ] = self . resourcesInformation #NEWLINE# webContent [ 'gknoArguments' ] = execute . gknoArguments #NEWLINE# json . dump ( webContent , fileHandle , sort_keys = True , indent = 2 ) #NEWLINE# fileHandle . close ( )