Exemplo n.º 1
0
def upload():
    """ Gets the upload page.
    :return: The upload page.
    """

    # Fix the session in case the browser is caching the old session
    session_manager.fix()
    return render("upload.html")
Exemplo n.º 2
0
def cut():
    """ Gets the cut page.
    :return: The cut page.
    """

    # Set the default cutting options
    if "cuttingoptions" not in session:
        session["cuttingoptions"] = constants.DEFAULT_CUT_OPTIONS

    return render("cut.html")
Exemplo n.º 3
0
def tokenizer():
    """ Handles the functionality on the tokenizer page.
    :return: The tokenize page.
    """

    # Set the default session options.
    session["analyoption"] = constants.DEFAULT_ANALYZE_OPTIONS

    # Send the page.
    return render("tokenize.html")
Exemplo n.º 4
0
def rolling_window() -> str:
    """ Gets the rolling window page.
    :return: The rolling window page.
    """

    # Set the default options
    if "rwoption" not in session:
        session["rwoption"] = constants.DEFAULT_ROLLINGWINDOW_OPTIONS

    # Return the page
    return render("rolling-window.html")
Exemplo n.º 5
0
def statistics() -> str:
    """ Gets the statistics page.
    :return: The statistics page.
    """

    # Set the default options
    if "analyoption" not in session:
        session["analyoption"] = constants.DEFAULT_ANALYZE_OPTIONS

    # Return the statistics page
    return render("statistics.html")
Exemplo n.º 6
0
def consensus_tree() -> str:
    """Gets the consensus tree page.
    :return: The consensus tree page.
    """

    # Set the default options
    if "analyoption" not in session:
        session["analyoption"] = constants.DEFAULT_ANALYZE_OPTIONS
    if "bctoption" not in session:
        session["bctoption"] = constants.DEFAULT_BCT_OPTIONS

    # Return the consensus tree page
    return render("consensus-tree.html")
Exemplo n.º 7
0
def similarity_query() -> str:
    """ Gets the similarity query page.
    :return: The similarity query page.
    """

    # Set the default options
    if "analyoption" not in session:
        session["analyoption"] = constants.DEFAULT_ANALYZE_OPTIONS
    if "similarities" not in session:
        session["similarities"] = constants.DEFAULT_SIM_OPTIONS

    # Return the similarity query page
    return render("similarity-query.html")
Exemplo n.º 8
0
def dendrogram() -> str:
    """ Gets the dendrogram page.
    :return: The dendrogram page.
    """

    # Set default options
    if "analyoption" not in session:
        session["analyoption"] = constants.DEFAULT_ANALYZE_OPTIONS
    if "hierarchyoption" not in session:
        session["hierarchyoption"] = constants.DEFAULT_HIERARCHICAL_OPTIONS

    # Return the dendrogram page
    return render("dendrogram.html")
Exemplo n.º 9
0
def k_means() -> str:
    """Gets the k-means clustering page.
    :return: The k-means clustering page.
    """

    # Set default options
    if "analyoption" not in session:
        session["analyoption"] = constants.DEFAULT_ANALYZE_OPTIONS
    if "kmeanoption" not in session:
        session["kmeanoption"] = constants.DEFAULT_KMEAN_OPTIONS

    # Return the k-means clustering page
    return render("k-means.html")
Exemplo n.º 10
0
def top_words() -> str:
    """ Gets the top words page.
    :return: The top words page.
    """

    # Set the default options
    if "topwordoption" not in session:
        session["topwordoption"] = constants.DEFAULT_TOPWORD_OPTIONS
    if "analyoption" not in session:
        session["analyoption"] = constants.DEFAULT_ANALYZE_OPTIONS

    # Return the top words page
    return render("top-words.html")
Exemplo n.º 11
0
def content_analysis() -> str:
    """ Gets the content analysis page.
    :return: The content analysis page.
    """

    # Remove any existing uploaded files
    session["dictionary_labels"] = []
    files = glob.glob(get_path() + '*')
    for file in files:
        os.remove(file)

    # Return the content analysis page
    return render("content-analysis.html")
Exemplo n.º 12
0
def scrub() -> str:
    """ Gets the scrub page.
    :return: The scrub page.
    """

    if "scrubbingoptions" not in session:
        session["scrubbingoptions"] = constants.DEFAULT_SCRUB_OPTIONS
    if "xmlhandlingoptions" not in session:
        session["xmlhandlingoptions"] = {
            "myselect": {
                "action": "",
                "attribute": ""
            }
        }
    utility.xml_handling_options()

    return render("scrub.html")
Exemplo n.º 13
0
def word_cloud() -> str:
    """ Gets the word cloud page.
    :return: The word cloud page.
    """

    return render("word-cloud.html")
Exemplo n.º 14
0
def page_not_found(_):
    """Custom 404 Page"""

    app.logger.error("\nPage not found: {url}".format(url=request.path))
    return render("404.html")
Exemplo n.º 15
0
def multicloud() -> str:
    """ Gets the multicloud page.
    :return: The multicloud page.
    """

    return render("multicloud.html")
Exemplo n.º 16
0
def viz():
    """ Gets the bubbleviz page.
    :return: The bubbleviz page.
    """

    return render("bubbleviz.html")