Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified db.sqlite3
Binary file not shown.
226 changes: 125 additions & 101 deletions templates/analyze.html
Original file line number Diff line number Diff line change
@@ -1,114 +1,138 @@
<!doctype html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/css/bootstrap.min.css" integrity="sha384-GJzZqFGwb1QTTN6wy59ffF1BuGJpLSa9DkKMp0DgiMDm4iYMj70gZWKYbI706tWS" crossorigin="anonymous">

<title>Text Utils-Results </title>
<!-- Favicon-->
<link rel="shortcut icon" href="https://codewithharry.com/static/photo.png">
<style>
.footer {
position: fixed;
left: 0;
bottom: 0;
width: 100%;
background-color: black;
color: white;
text-align: center;
display: block;
}
#corner-btn{
position: absolute;
right: 0;
top: 15px;
padding: 4px;
}
</style>
</head>
<body>
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
<a class="navbar-brand" href="#">TextUtils.in</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNavDropdown" aria-controls="navbarNavDropdown" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNavDropdown">
<ul class="navbar-nav">
<li class="nav-item active">
<a class="nav-link" href="/">Home <span class="sr-only">(current)</span></a>
</li>
<li class="nav-item">
<a class="nav-link" href="/about">About Us</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Contact Us</a>
</li>

</ul>
</div>
<form class="form-inline">
<input class="form-control mr-sm-2" type="search" placeholder="Search" aria-label="Search">
<button class="btn btn-outline-success my-2 my-sm-0" type="submit">Search</button>
</form>
</nav>

<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/css/bootstrap.min.css"
integrity="sha384-GJzZqFGwb1QTTN6wy59ffF1BuGJpLSa9DkKMp0DgiMDm4iYMj70gZWKYbI706tWS" crossorigin="anonymous">

<div class="alert alert-success alert-dismissible fade show" role="alert">
<strong>Success!</strong> Your text has been analyzed!
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<title>Text Utils-Results </title>
<!-- Favicon-->
<link rel="shortcut icon" href="https://codewithharry.com/static/photo.png">
<style>
.footer {
position: fixed;
left: 0;
bottom: 0;
width: 100%;
background-color: black;
color: white;
text-align: center;
display: block;
}

#corner-btn {
position: absolute;
right: 0;
top: 15px;
padding: 4px;
}
</style>
</head>

<body>
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
<a class="navbar-brand" href="#">TextUtils.in</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNavDropdown"
aria-controls="navbarNavDropdown" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNavDropdown">
<ul class="navbar-nav">
<li class="nav-item active">
<a class="nav-link" href="/">Home <span class="sr-only">(current)</span></a>
</li>
<li class="nav-item">
<a class="nav-link" href="/about">About Us</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Contact Us</a>
</li>

<div class="container">
</ul>
</div>
<form class="form-inline">
<input class="form-control mr-sm-2" type="search" placeholder="Search" aria-label="Search">
<button class="btn btn-outline-success my-2 my-sm-0" type="submit">Search</button>
</form>
</nav>

<h1>Your Analyzed Text - {{ purpose }}</h1>

<div style="position:relative;" class="bg-light">
<p>
<button id="corner-btn" class="btn btn-outline-primary" onclick="copy()">
Copy
<div class="alert alert-success alert-dismissible fade show" role="alert">
<strong>Success!</strong> Your text has been analyzed!
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
<pre id="copy-text" class="p-4"><h2>{{ analyzed_text }}</h2></pre>
</p>
</div>
</div>
<footer class="footer">
</div>


<div class="container">
<span class="text-light">&#169 2019 Textutils.in </span>

<h1>Your Analyzed Text</h1>
<h4>Applied Changes : Applied Changes is in <font style='color:green'>GREEN </font> color</h4>
<h6 style="--sts:{{rempunc_sts}}; color:var(--sts)">1. Remove Punctuations </h6>
<h6 style="--sts:{{fullcaps_sts}}; color:var(--sts)">2. All Capitalised </h6>
<h6 style="--sts:{{remnew_sts}}; color:var(--sts)">3. Remove New Line </h6>
<h6 style="--sts:{{remspace_sts}}; color:var(--sts)">4. Remove Extra Spaces </h6>
<h6 style="--sts:{{remnum_sts}}; color:var(--sts)">5. Remove Numbers </h6>


<!-- UNDER DEVELOPMENT SECTION -->
<div class="container">
Remove Punctuations
</div>

<div style="position:relative" class="bg-light">
<p>
<button id="corner-btn" class="btn btn-outline-primary" onclick="copy()">
Copy
</button>
<pre id="copy-text" class="p-4"><h2>{{ analyzed_text }}</h2></pre>
</p>
</div>
</div>
</footer>

<!-- Optional JavaScript -->
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.6/umd/popper.min.js" integrity="sha384-wHAiFfRlMFy6i5SRaxvfOCifBUQy1xHdJ/yoi7FRNXMRBu5WHdZYu1hA6ZOblgut" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/js/bootstrap.min.js" integrity="sha384-B0UglyR+jN6CkvvICOB2joaf5I4l3gm9GU6Hc1og6Ls7i6U/mkkaduKaBhlAXv9k" crossorigin="anonymous"></script>

<script>
function copy() {
// copied from https://stackoverflow.com/questions/36639681/how-to-copy-text-from-a-div-to-clipboard
if (document.selection) {
var range = document.body.createTextRange();
range.moveToElementText(document.getElementById("copy-text"));
range.select().createTextRange();
document.execCommand("copy");

} else if (window.getSelection) {
var range = document.createRange();
range.selectNode(document.getElementById("copy-text"));
window.getSelection().addRange(range);
document.execCommand("copy");
alert('Text Copied')

}
<footer class="footer">
<div class="container">
<span class="text-light">&#169 2019 Textutils.in </span>
</div>
</footer>

<!-- Optional JavaScript -->
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js"
integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo"
crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.6/umd/popper.min.js"
integrity="sha384-wHAiFfRlMFy6i5SRaxvfOCifBUQy1xHdJ/yoi7FRNXMRBu5WHdZYu1hA6ZOblgut"
crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/js/bootstrap.min.js"
integrity="sha384-B0UglyR+jN6CkvvICOB2joaf5I4l3gm9GU6Hc1og6Ls7i6U/mkkaduKaBhlAXv9k"
crossorigin="anonymous"></script>

<script>
function copy() {
// copied from https://stackoverflow.com/questions/36639681/how-to-copy-text-from-a-div-to-clipboard
if (document.selection) {
var range = document.body.createTextRange();
range.moveToElementText(document.getElementById("copy-text"));
range.select().createTextRange();
document.execCommand("copy");

} else if (window.getSelection) {
var range = document.createRange();
range.selectNode(document.getElementById("copy-text"));
window.getSelection().addRange(range);
document.execCommand("copy");
alert('Text Copied')

}
</script>
</body>
</html>

}
</script>
</body>

</html>
Loading