div aenderung
This commit is contained in:
@@ -18,7 +18,7 @@ from flask import request
|
||||
from cachetools import TTLCache, cached
|
||||
from werkzeug.utils import secure_filename
|
||||
# Initialize application
|
||||
app = Flask(__name__)
|
||||
app = Flask(__name__,static_url_path="/bsp/static")
|
||||
app.config['MAIL_SERVER']= "buran.htu.tuwien.ac.at"
|
||||
app.config['MAIL_DEFAULT_SENDER']="andis@fet.at"
|
||||
app.config['FREEZER_DESTINATION_IGNORE']=['*.zip',"*intern*"]
|
||||
@@ -58,8 +58,8 @@ def load_lvas_folders_studien():
|
||||
studien[fn]=data
|
||||
|
||||
|
||||
with open(os.path.join("test.yaml"),"w") as f:
|
||||
f.write(yaml.dump(studien))
|
||||
#with open(os.path.join("test.yaml"),"w") as f:
|
||||
# f.write(yaml.dump(studien))
|
||||
|
||||
# create a lva list from the structure
|
||||
for studium, lvaliste in studien.items():
|
||||
@@ -68,8 +68,8 @@ def load_lvas_folders_studien():
|
||||
lvas+=[lva]
|
||||
folders={}
|
||||
|
||||
with open(os.path.join("testlvaliste.yaml"),"w") as f:
|
||||
f.write(yaml.dump(lvas))
|
||||
#with open(os.path.join("testlvaliste.yaml"),"w") as f:
|
||||
# f.write(yaml.dump(lvas))
|
||||
# make folders compact in lva
|
||||
for lva in lvas:
|
||||
for l in lva["courses"]:
|
||||
@@ -166,6 +166,6 @@ def api_index(name='index'):
|
||||
def url_freeze():
|
||||
yield "/"
|
||||
|
||||
app.register_blueprint(page_blueprint, url_prefix=app.config["url_prefix"],static_folder='static')
|
||||
app.register_blueprint(page_blueprint, url_prefix=app.config["url_prefix"],static_folder='static',static_url_path="bsp/static")
|
||||
app.register_blueprint(api_blueprint, url_prefix=app.config["url_prefix"]+"/api/",static_folder='static')
|
||||
#app.add_url_rule('%s/<path:name>' % cfg.url_prefix,'page', post)
|
||||
|
||||
@@ -2,3 +2,4 @@ config
|
||||
slugify
|
||||
flask
|
||||
Frozen-Flask
|
||||
gevent
|
||||
@@ -1,8 +1,8 @@
|
||||
const puppeteer = require('puppeteer');
|
||||
const cheerio = require('cheerio');
|
||||
const fs = require("fs");
|
||||
const {read_html, du_unizeug} = require("./lib");
|
||||
const tissparse = require("./tissparse");
|
||||
const {read_html, du_unizeug} = require("../nodelib/libb");
|
||||
const tissparse = require("../nodelib/tissparsee");
|
||||
const YAML = require("yaml");
|
||||
|
||||
|
||||
14
tests/test2.js
Normal file
14
tests/test2.js
Normal file
@@ -0,0 +1,14 @@
|
||||
const cheerio = require('cheerio');
|
||||
const fs = require("fs");
|
||||
const {read_html, du_unizeug, fetch_page, merge_folders_courselist} = require("./nodelib/lib");
|
||||
const tissparse = require("./nodelib/tissparse");
|
||||
|
||||
|
||||
|
||||
read_html("data/etit.yaml.html").then((body) => {
|
||||
|
||||
//console.log(tissparse.courselist(body));
|
||||
folders=du_unizeug()
|
||||
let courselist=merge_folders_courselist(tissparse.courselist(body),folders);
|
||||
console.log(courselist)
|
||||
})
|
||||
Reference in New Issue
Block a user