Example #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")
Example #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")
Example #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")
Example #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")
Example #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")
Example #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")
Example #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")
Example #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")
Example #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")
Example #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")
Example #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")
Example #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")
Example #13
0
def word_cloud() -> str:
    """ Gets the word cloud page.
    :return: The word cloud page.
    """

    return render("word-cloud.html")
Example #14
0
def page_not_found(_):
    """Custom 404 Page"""

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

    return render("multicloud.html")
Example #16
0
def viz():
    """ Gets the bubbleviz page.
    :return: The bubbleviz page.
    """

    return render("bubbleviz.html")