Exemplo n.º 1
0
def linkAllDirectories():

    os.chdir(os.environ['WIKIPROTPATH'])

    import webpageCreator
    webpageCreator.webpage(os.getcwd(), link)

    owd = os.environ['WIKIPROTPATH'] + '/Scanners/'
    os.chdir(owd)
    directoryList1 = next(os.walk('.'))[1]
    #print(directoryList1)

    import webpageCreator
    #print(sys.argv[1])

    #url = sys.argv[1]
    #print(sys.argv[1])
    #webpageCreator.webpage(os.getcwd(), url)
    webpageCreator.webpage(os.environ['WIKIPROTPATH'] + '/Scanners', link)
    #print('Now adding the links to the index file')

    #import directoryURLlink

    #    directoryURLlink.runCreateLinks(url)
    #directoryURLlink.runCreateLinks(link)

    i = 0
    while (i < len(directoryList1)):
        if (directoryList1[i] != 'apps'):
            if (directoryList1[i] != 'files'):
                if (directoryList1[i] != 'uploads'):
                    if (directoryList1[i] != '.idea'):
                        if (directoryList1[i] != '.git'):
                            import webpageCreator

                            #                webpageCreator.webpage(os.path.abspath(directoryList1[i]), url)
                            webpageCreator.webpage(
                                os.path.abspath(directoryList1[i]), link)
                            #print('Now adding the links to the index file')

                            #                        import directoryURLlink

                            #    directoryURLlink.runCreateLinks(url)
                            #                        directoryURLlink.runCreateLinks(link)

                            directoryList2 = next(os.walk('.'))[1]
                            sowd = os.getcwd()

                            j = 0
                            while (j < len(directoryList2)):
                                if (directoryList2[j] != 'apps'):
                                    if (directoryList2[j] != 'files'):
                                        if (directoryList2[j] != 'uploads'):
                                            if (directoryList2[j] != '.idea'):
                                                if (directoryList2[j] !=
                                                        '.git'):

                                                    #                                           webpageCreator.webpage(os.path.abspath(directoryList2[j]), url)
                                                    webpageCreator.webpage(
                                                        os.path.abspath(
                                                            directoryList2[j]),
                                                        link)
                                                    #print('Now adding the links to the index file')

                                                    #import directoryURLlink

                                                    #    directoryURLlink.runCreateLinks(url)
                                                    #directoryURLlink.runCreateLinks(link)

                                                    #                                            print(os.getcwd())
                                                    os.chdir(sowd)
            #                                           print(os.getcwd())

                                j = j + 1

        #                  print(os.getcwd())
                            os.chdir(owd)
        #                 print(os.getcwd())

        i = i + 1

    return
Exemplo n.º 2
0
def linkSingleDirectory():
    import webpageCreator
    webpageCreator.webpage(os.getcwd(), link)
    #    print(link + '  ' + os.getcwd())
    return
Exemplo n.º 3
0
owd = os.environ['WIKIPROTPATH'] + 'Scanners/'
os.chdir(owd)
directoryList1 = next(os.walk('.'))[1]
#print(directoryList1)

import webpageCreator
print(sys.argv[1])
if len(sys.argv) > 1:
    link = sys.argv[1]
else:
    link = 'https://msveiven.github.io'

#url = sys.argv[1]
#print(sys.argv[1])
#webpageCreator.webpage(os.getcwd(), url)
webpageCreator.webpage(os.environ['WIKIPROTPATH'] + 'Scanners')

i = 0
while (i < len(directoryList1)):
    if (directoryList1[i] != 'apps'):
        if (directoryList1[i] != 'files'):
            if (directoryList1[i] != 'uploads'):
                if (directoryList1[i] != '.idea'):

                    import webpageCreator

                    #                webpageCreator.webpage(os.path.abspath(directoryList1[i]), url)
                    webpageCreator.webpage(os.path.abspath(directoryList1[i]))

                    directoryList2 = next(os.walk('.'))[1]
                    sowd = os.getcwd()