Exemplo n.º 1
0
def champs(args):
    dataz = genutils.loadJSONs()  # ('guide_data.json')
    genwok.genAllChampPages(dataz, args[0])
Exemplo n.º 2
0
            fp.write('<td><a href="{0}">{1}</a></td>'.format(champUrl(c), c))

            if cIndex % tableCols == (tableCols - 1):
                fp.write('</tr>\n')
        cIndex = cIndex + 1
   
    fp.write('</tbody>\n</table>\n\n')

    fp.close()


def champUrl(c):
    url = c.replace(' ', '')
    url = url.replace("'", '')
    url = url.replace('.', '')
    url = url.lower()
    url = 'champions/{0}.html'.format(url)

    return url

if __name__ == '__main__':
    dataz = genutils.loadJSONs()  # ('guide_data.json')

    if len(sys.argv) <= 1:
        genAllChampPages(dataz)
        genIndex('wok_site/content/home.raw')
    else:
        genAllChampPages(dataz, sys.argv[1])
        genIndex('wok_site/content/home.raw', sys.argv[1])