<commit_before><commit_msg>added EXTREMELY BASIC flask functionality<commit_after>from lib.Site import *
from lib.Page import *
from lib.Element import *
from flask import Flask, request
import sys
import pprint

if len( sys.argv) != 2:
	print( 'usage: ' + sys.argv[0] + ' ' + 'site_name')
	exit()

site = Site( sys.argv[1])

app = Flask(__name__)

@app.route( '/')
def route_index():
	if site.name + '/index' in site.render().keys():
		return 'well there\'s an index page...'
	else:
		return 'please add an index page!!'

if __name__ == '__main__':
	app.run( host = '0.0.0.0')
{'fraction_non_alphanumeric': 0.1611785095320624, 'fraction_numerical': 0.012131715771230503, 'mean_word_length': 4.115044247787611, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 1, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3116892', 'n_tokens_mistral': 215, 'n_tokens_neox': 207, 'n_words': 63}