interface clean up
This commit is contained in:
@@ -48,6 +48,8 @@ def index():
|
|||||||
if form.validate_on_submit():
|
if form.validate_on_submit():
|
||||||
soup = ripper.get_soup_obj(form.search.data, headers)
|
soup = ripper.get_soup_obj(form.search.data, headers)
|
||||||
download_comic_files(soup)
|
download_comic_files(soup)
|
||||||
return render_template('success.html', title=ripper.get_title(soup))
|
title = ripper.get_title(soup)
|
||||||
|
cover = title + ' 000.jpg'
|
||||||
|
return render_template('success.html', title=title, cover=cover)
|
||||||
|
|
||||||
return render_template('index.html', form=form)
|
return render_template('index.html', form=form)
|
||||||
@@ -10,6 +10,7 @@ def create_comic_archive(title, folder):
|
|||||||
output = shutil.make_archive(title, 'zip', folder)
|
output = shutil.make_archive(title, 'zip', folder)
|
||||||
os.rename(output, os.path.join(folder, title +'.cbr'))
|
os.rename(output, os.path.join(folder, title +'.cbr'))
|
||||||
print('Performing folder cleanup...')
|
print('Performing folder cleanup...')
|
||||||
|
ignore = ('.cbr', '000.jpg')
|
||||||
for img in os.listdir(folder):
|
for img in os.listdir(folder):
|
||||||
if not img.endswith('.cbr'):
|
if not img.endswith(ignore):
|
||||||
os.remove(os.path.join(folder, img))
|
os.remove(os.path.join(folder, img))
|
||||||
28
app/static/css/site.css
Normal file
28
app/static/css/site.css
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
input::-webkit-input-placeholder, input::-moz-placeholder, :input-moz-placeholder, input:-ms-input-placeholder {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.jumbotron {
|
||||||
|
position: relative;
|
||||||
|
background: url(../esm-bg.jpg);
|
||||||
|
background-size: cover;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
height: 350px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.jumbo-info {
|
||||||
|
position: absolute;
|
||||||
|
top: 180px;
|
||||||
|
left: 0;
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.jumbo-info h1 {
|
||||||
|
font-weight: 900;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.cover {
|
||||||
|
height: 300px;
|
||||||
|
}
|
||||||
BIN
app/static/dp-bg.png
Normal file
BIN
app/static/dp-bg.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 962 KiB |
@@ -1,11 +1,81 @@
|
|||||||
<h1>Save All Comics!</h1>
|
<!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">
|
||||||
|
|
||||||
|
<!-- Font Awesome CSS -->
|
||||||
|
<link href="https://use.fontawesome.com/releases/v5.0.1/css/all.css" rel="stylesheet">
|
||||||
|
|
||||||
|
<!-- Bootstrap CSS -->
|
||||||
|
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
|
||||||
|
|
||||||
|
<!-- Site CSS -->
|
||||||
|
<link rel="stylesheet" href="{{ url_for('static', filename='css/site.css') }}">
|
||||||
|
|
||||||
|
<title>Save All Comics!</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<nav class="navbar navbar-expand-lg navbar-dark bg-dark col">
|
||||||
|
<a class="navbar-brand" href="#"><i class="fas fa-save "></i> Save All Comics!</a>
|
||||||
|
<button class="navbar-toggler d-lg-none" type="button" data-toggle="collapse" data-target="#collapsibleNavId" aria-controls="collapsibleNavId"
|
||||||
|
aria-expanded="false" aria-label="Toggle navigation"></button>
|
||||||
|
<div class="collapse navbar-collapse mx-auto" id="collapsibleNavId">
|
||||||
|
<ul class="navbar-nav ml-auto mt-2 mt-lg-0">
|
||||||
|
<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="#"><i class="fab fa-github"></i> Github</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item dropdown">
|
||||||
|
<a class="nav-link dropdown-toggle" href="#" id="dropdownId" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Dropdown</a>
|
||||||
|
<div class="dropdown-menu" aria-labelledby="dropdownId">
|
||||||
|
<a class="dropdown-item" href="#">Action 1</a>
|
||||||
|
<a class="dropdown-item" href="#">Action 2</a>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="jumbotron jumbotron-fluid">
|
||||||
|
<!-- <img src="{{ url_for('static', filename='esm-bg.jpg') }}" class="bg-image" /> -->
|
||||||
|
|
||||||
|
<div class="jumbo-info p-5 text-center w-100">
|
||||||
|
<h1 class="display-3 pb-0 mb-0">Save All Comics!</h1>
|
||||||
|
<h6 class="lead mt-0">Save & Read online comics on your OWN time.</h6>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="container-fluid text-center">
|
||||||
|
|
||||||
|
<section class="row">
|
||||||
|
<div class="col form-group py-4">
|
||||||
<form action="" method="POST" enctype=multipart/form-data>
|
<form action="" method="POST" enctype=multipart/form-data>
|
||||||
{{ form.hidden_tag() }}
|
{{ form.hidden_tag() }}
|
||||||
<p>Please input a <a href="http://www.readallcomics.com" rel="Nofollow">Readallcomics.com</a> link</p>
|
<p>Please input a <a href="http://www.readallcomics.com" rel="Nofollow">Readallcomics.com</a> link</p>
|
||||||
{{ form.search(placeholder='Comic URL, eg: https://readallcomics.com/marauders-001-2019/') }}
|
{{ form.search(class="form-control", placeholder='Comic URL, eg: https://readallcomics.com/marauders-001-2019/') }}
|
||||||
{{ form.submit() }}
|
{{ form.submit(class="btn btn-primary btn-lg mt-4") }}
|
||||||
</form>
|
</form>
|
||||||
<h2>About Saveallcomics</h2>
|
</div>
|
||||||
<p>We hope you have enjoyed using Saveallcomics! We are a totally <strong>FREE</strong> project without profit.</p>
|
</section>
|
||||||
|
|
||||||
|
|
||||||
|
<footer class="row">
|
||||||
|
<div class="col text-center">
|
||||||
<p>© 2019 <a href="">Saveallcomics</a>. Some rights reserved.</p>
|
<p>© 2019 <a href="">Saveallcomics</a>. Some rights reserved.</p>
|
||||||
|
</div>
|
||||||
|
</footer>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- 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.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>
|
||||||
|
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -1,5 +1,110 @@
|
|||||||
<h1>Huzzah! It Worked!</h1>
|
<!doctype html>
|
||||||
<h2>Download {{ title }}</h2>
|
<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">
|
||||||
|
|
||||||
|
<!-- Font Awesome CSS -->
|
||||||
|
<link href="https://use.fontawesome.com/releases/v5.0.1/css/all.css" rel="stylesheet">
|
||||||
|
|
||||||
|
<!-- Bootstrap CSS -->
|
||||||
|
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
|
||||||
|
|
||||||
|
<!-- Site CSS -->
|
||||||
|
<link rel="stylesheet" href="{{ url_for('static', filename='css/site.css') }}">
|
||||||
|
|
||||||
|
<title>Save All Comics!</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<nav class="navbar navbar-expand-lg navbar-dark bg-dark col">
|
||||||
|
<a class="navbar-brand" href="#"><i class="fas fa-save "></i> Save All Comics!</a>
|
||||||
|
<button class="navbar-toggler d-lg-none" type="button" data-toggle="collapse" data-target="#collapsibleNavId" aria-controls="collapsibleNavId"
|
||||||
|
aria-expanded="false" aria-label="Toggle navigation"></button>
|
||||||
|
<div class="collapse navbar-collapse mx-auto" id="collapsibleNavId">
|
||||||
|
<ul class="navbar-nav ml-auto mt-2 mt-lg-0">
|
||||||
|
<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="#"><i class="fab fa-github"></i> Github</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item dropdown">
|
||||||
|
<a class="nav-link dropdown-toggle" href="#" id="dropdownId" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Dropdown</a>
|
||||||
|
<div class="dropdown-menu" aria-labelledby="dropdownId">
|
||||||
|
<a class="dropdown-item" href="#">Action 1</a>
|
||||||
|
<a class="dropdown-item" href="#">Action 2</a>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="jumbotron jumbotron-fluid">
|
||||||
|
<!-- <img src="{{ url_for('static', filename='esm-bg.jpg') }}" class="bg-image" /> -->
|
||||||
|
|
||||||
|
<div class="jumbo-info p-5 text-center w-100">
|
||||||
|
<h1 class="display-3 pb-0 mb-0">Save All Comics!</h1>
|
||||||
|
<h6 class="lead mt-0">Save & Read online comics on your OWN time.</h6>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="container-fluid text-center">
|
||||||
|
|
||||||
|
<section class="row">
|
||||||
|
<div class="col">
|
||||||
|
<a href="{{ url_for('main.index') }}">« Back Home</a>
|
||||||
|
<h1>Downloading {{ title }}</h1>
|
||||||
|
{% set img = title + '/' + cover %}
|
||||||
|
<img src="{{ url_for('static', filename='download/' + img) }}" class="img-fluid img-thumbnail" width="400px">
|
||||||
|
</div>
|
||||||
|
<div class="col form-group py-4">
|
||||||
|
<p class="lead">Thank you for using SaveAllComics! We are a totally <em>FREE</em> project without profit.</p>
|
||||||
{% set download = title + '/' + title + '.cbr' %}
|
{% set download = title + '/' + title + '.cbr' %}
|
||||||
<button><a href="{{ url_for('static', filename='download/' + download) }}">{{ title }}</a></button>
|
<a class="btn btn-lg btn-success" role="button" href="{{ url_for('static', filename='download/' + download) }}">Download {{ title }}</a>
|
||||||
<a href="{{ url_for('main.index') }}">« Back to Home</a>
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
|
||||||
|
<footer class="row">
|
||||||
|
<div class="col text-center">
|
||||||
|
<p>© 2019 <a href="">Saveallcomics</a>. Some rights reserved.</p>
|
||||||
|
</div>
|
||||||
|
</footer>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- 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.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>
|
||||||
|
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
||||||
|
|
||||||
|
<!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.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
|
||||||
|
|
||||||
|
<title>Huzzah! It Worked!</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="container">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- 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.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>
|
||||||
|
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
Reference in New Issue
Block a user