예제 #1
0
def helpSamTool(tool) :
	process = subprocess.Popen(tool+" -h", shell=True, stdout=subprocess.PIPE)
	help = process.communicate()[0]

	helpFile = open( "help/bin/" + tool + ".html", 'w')
	htmlHelp = plaintext2html( help );
	helpFile.write( htmlHelp );
	helpFile.close();
예제 #2
0
def helpSamTool(tool) :
	process = subprocess.Popen(tool+" -h", shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
	help = process.communicate()[0]

	helpFile = open( "help/bin/" + tool + ".html", 'w')
	htmlHelp = plaintext2html( help );
	helpFile.write( htmlHelp );
	helpFile.close();
예제 #3
0
def access(id):
    content = database.get(id)
    if content:
        response.content_type = 'text/html'

        from plaintext2html import plaintext2html
        from accent2htmlcode import replace_accents

        html0 = plaintext2html(content)
        html1 =  u"<html><head><title>{0}</title></head><body>{1}</body></html>".format(unicode(id), html0)
        html2 = replace_accents(html1)

        return html2
    else:
        return HTTPError(404)
예제 #4
0
list = process.communicate()[0]
splited = list.split('\n')

for plugin in splited:
	if( plugin == "") : break;
	processPlugin = subprocess.Popen("sam-do "+plugin+" --param-group" , shell=True, stdout=subprocess.PIPE)
	group = processPlugin.communicate()[0]
	group = group.replace("\n","")
	processPlugin = subprocess.Popen("sam-do "+plugin+" -h // --color" , shell=True, stdout=subprocess.PIPE)
	help = processPlugin.communicate()[0]

	if not os.path.exists( "help/plugin/"+group ) :
		os.makedirs( "help/plugin/"+group );
	
	pluginFile = open( "help/plugin/"+group+"/"+plugin+".html", 'w')
	htmlHelp = plaintext2html( help );
	pluginFile.write( htmlHelp );
	pluginFile.close()

#### sam tools help ####

if not os.path.exists( "help/bin/" ) :
	os.makedirs( "help/bin/" );

def helpSamTool(tool) :
	process = subprocess.Popen(tool+" -h", shell=True, stdout=subprocess.PIPE)
	help = process.communicate()[0]

	helpFile = open( "help/bin/" + tool + ".html", 'w')
	htmlHelp = plaintext2html( help );
	helpFile.write( htmlHelp );
예제 #5
0
    if (plugin == ""): break
    processPlugin = subprocess.Popen("sam-do " + plugin + " --param-group",
                                     shell=True,
                                     stdout=subprocess.PIPE)
    group = processPlugin.communicate()[0]
    group = group.replace("\n", "")
    processPlugin = subprocess.Popen("sam-do " + plugin + " -h // --color",
                                     shell=True,
                                     stdout=subprocess.PIPE)
    help = processPlugin.communicate()[0]

    if not os.path.exists("help/plugin/" + group):
        os.makedirs("help/plugin/" + group)

    pluginFile = open("help/plugin/" + group + "/" + plugin + ".html", 'w')
    htmlHelp = plaintext2html(help)
    pluginFile.write(htmlHelp)
    pluginFile.close()

#### sam tools help ####

if not os.path.exists("help/bin/"):
    os.makedirs("help/bin/")


def helpSamTool(tool):
    process = subprocess.Popen(tool + " -h",
                               shell=True,
                               stdout=subprocess.PIPE)
    help = process.communicate()[0]