mirror of
https://github.com/Xevion/the-office.git
synced 2025-12-10 08:08:52 -06:00
validity checks, better page styling, update data
This commit is contained in:
1958
the_office/data/processed/1-06.json
Normal file
1958
the_office/data/processed/1-06.json
Normal file
File diff suppressed because it is too large
Load Diff
1731
the_office/data/processed/2-10.json
Normal file
1731
the_office/data/processed/2-10.json
Normal file
File diff suppressed because it is too large
Load Diff
@@ -41,7 +41,7 @@ Dwight|Cocks in the henhouse.
|
||||
Michael|Don’t say cocks. Oh, what is your name, my fair lass?
|
||||
Katy|Katy.
|
||||
Michael|Ah, Katy. Wow. Look at you. You are, uh you’re like the new and improved Pam. Pam 6.0.
|
||||
[Pam looks embarassed at Michael – Katy looks sympathetically at Pam]
|
||||
None|[Pam looks embarassed at Michael – Katy looks sympathetically at Pam]
|
||||
Michael|Oh, look. Oh hey, no catfights you two. I’m against violence in the workplace.
|
||||
Dwight|So am I.
|
||||
Michael|Nobody cares what you think.
|
||||
@@ -54,7 +54,7 @@ Michael|Well, lets put ’em in the hallway. Give ’em some chairs. Right? Deci
|
||||
Michael|I do. I read Small Business man. I also uh, subscribe to USA Today and American Way Magazine, that’s the in-flight magazine. Some great articles in that. They did this great profile last month of Doris Roberts and where she likes to eat when she’s in Phoenix. Illuminating.
|
||||
-
|
||||
Michael|This is my conference room. So please, uh, make yourself at home. Whatever you need, I’m right on the other side of this wall. [knocks on wall] used to be a window here. There’s not anymore. So, that’s where I will be.
|
||||
[Katy unpacks her handbags]
|
||||
None|[Katy unpacks her handbags]
|
||||
Michael|So if you need anything else, something to make you more confortable just don’t hesitate to ask. I’m right here.
|
||||
Katy|I guess a cup of coffee would be great.
|
||||
Michael|Wait a second. I should have spotted another addict. Uh, gotta love the ‘bucks.
|
||||
@@ -181,7 +181,7 @@ Pam|I wished, right?
|
||||
Michael|Giggle-giggle, juji-juji, I get it, I get it. Divine Secrets of the Ya Ya Sisterhood over here right? [to Katy] So how’s that uh, coffee from earlier?
|
||||
Katy|Good.
|
||||
Michael|Ah, I knew it. Guzzled it down. You greedy little thing. So, uh, Pam is this your lunch break, or was that earlier when you were eating in the kitchen with those guys?
|
||||
[Pam sheepishly hands Katy the purse and leaves]
|
||||
None|[Pam sheepishly hands Katy the purse and leaves]
|
||||
Katy|[whispers] Sorry.
|
||||
Michael|Busted.
|
||||
Katy|[to Pam] Come back…
|
||||
@@ -241,7 +241,7 @@ Stanley|Is that from the machine that was in your office?
|
||||
Michael|Ummm-hmmm…
|
||||
Stanley|I thought that was the incentive prize for the top salesperson.
|
||||
Michael|Very easy to clean.
|
||||
[Stanley walks out]
|
||||
None|[Stanley walks out]
|
||||
Michael|Okay. Like he’s going to win anyway, right? [laughs]
|
||||
-
|
||||
Michael|Did we get any mail?
|
||||
@@ -287,7 +287,7 @@ Dwight|Please? I wanted to talk to you in private because I wanted to ask you ou
|
||||
Katy|No.
|
||||
Dwight|Ok was that no to talking to me in private, or was that no to the date?
|
||||
Katy|Both.
|
||||
[Dejected, Dwight walks out slowly]
|
||||
None|[Dejected, Dwight walks out slowly]
|
||||
Katy|What colors do you like?
|
||||
Angela|Gray. Dark Gray. Charcoal.
|
||||
-
|
||||
|
||||
@@ -62,7 +62,7 @@ Pam|Do you think that they’re like-
|
||||
Jim|No.
|
||||
Pam|No, right, no, no.
|
||||
Jim|[humming]
|
||||
Pam|Uhhh, ew, ew, ew… .Maybe?
|
||||
Pam|Uhhh, ew, ew, ew… Maybe?
|
||||
-
|
||||
Pam|It’s like squishing a spider under a book. It’s gonna be really gross but I have to look and make sure that it’s really dead. Sooo… [to camera guys] If you guys see anything… ?
|
||||
-
|
||||
|
||||
@@ -40,7 +40,7 @@ Michael|I want people to cut loose. I want people making out in closets. I want
|
||||
Pam|You do realize that we can’t serve liquor at the party.
|
||||
Michael|Yeah, I know. Damn it. Stupid corporate wet blankets. Like booze ever killed anybody.
|
||||
-
|
||||
Kevin & Oscar: One, two, three. [they lift and start to move a desk]
|
||||
Kevin & Oscar|One, two, three. [they lift and start to move a desk]
|
||||
Dwight|You guys should use a hand truck.
|
||||
Kevin|Do we have one?
|
||||
Dwight|No.
|
||||
@@ -276,7 +276,7 @@ Ryan|We’re running low on cups. Do you want me to just run out and get some?
|
||||
Angela|There should be some ..
|
||||
Michael|No, no, no, no. We’ll find some, don’t leave the party.
|
||||
-
|
||||
Phyllis, Meredith, Michael, Kevin: One, two, three. [do a shot]
|
||||
Phyllis, Meredith, Michael, Kevin|One, two, three. [do a shot]
|
||||
Michael|Kudos to Ryan, king of the party committee.
|
||||
Ryan|Oh, no.
|
||||
Michael|Yeah, yeah, yeah.
|
||||
@@ -422,5 +422,5 @@ Oscar|Turns out that Creed is a pretty interesting guy.
|
||||
-!14
|
||||
Angela|You behaved very badly tonight.
|
||||
Kelly|Sorry?
|
||||
-
|
||||
-!14
|
||||
Michael|See, that’s what Christmas is all about to me, is when you see someone open a gift and you think, “Man, I wish I got that.” I mean, that’s just such a great feeling, to watch other people envying a gift that you gave to somebody else. I don’t know, it’s just… I don’t know, just makes you kind of feel good.
|
||||
|
||||
@@ -247,13 +247,13 @@ Pam: Yeah.
|
||||
Roy: I was definitely right. [both laugh] Oh, brother.
|
||||
-
|
||||
Kevin: What am I going to do? [Refers to large pictures of Jan and Michael] I’m gonna hang it up at home. I don’t have a lot of art. [smirks]
|
||||
-
|
||||
-!1
|
||||
Michael: I just had the best, most romantic week of my life in Sandals, Jamaica. Went with a lady, and we laid on the beach and drank fruity drinks for free, because it was all-inclusive. And then I flew back to Scranton, and then they lost one of my bags.
|
||||
-
|
||||
-!1
|
||||
Michael: Hey, Mister tally man, tally me banana, six hand, seven hand, eight hand, BRUNCH! [snickers] So delicious. Dinner, too. And every morning I would watch the sunrise and I would eat a mango. That is how I want to feel all the time. It’s called island living. You know, how they say take a chill pill? In Jamaica, I took one. Guy on the beach sold it to me for $40. And after I finished vomiting, I was more relaxed than I ever have been. Lost six pounds, too. That’s how I want every day to be.
|
||||
-
|
||||
-!1
|
||||
Pam: Michael sends me a postcard from every vacation he goes on. Atlantic City, he wishes I was here. Busch Gardens, Virginia, all I got was this lousy postcard. And this time, I’m Jamaican-him-crazy. I don’t know how far away he thought he was, because he put $10 worth of stamps on this.
|
||||
-
|
||||
-!2
|
||||
Dwight: Hello, you’re back.
|
||||
Michael: Yeah, mon. Me just got back to the office.
|
||||
Dwight: While you were gone…
|
||||
@@ -262,7 +262,7 @@ Dwight: While you were gone, Jim glued my desk drawers together. He changed my v
|
||||
Michael: Dwight, please, please.
|
||||
Dwight: He turned over my…
|
||||
Michael: I just got back from vacation, mon, all right? So chill. Let’s don’t… Don’t harsh my mellow, mon.
|
||||
-
|
||||
-!2
|
||||
Dwight: I took a vacation once. Never again. While I was away, Jim had my desk shipped to me in Roswell.
|
||||
-
|
||||
Michael: Presents. I got presents for everybody. Dwight, a genuine Rastafarian wig.
|
||||
|
||||
5
the_office/helpers.py
Normal file
5
the_office/helpers.py
Normal file
@@ -0,0 +1,5 @@
|
||||
episode_counts = [6, 22, 23, 14, 26, 24, 24, 24, 23]
|
||||
|
||||
|
||||
def check_validity(season: int, episode: int):
|
||||
return (1 <= season <= 9) and (1 <= episode <= episode_counts[season])
|
||||
@@ -1,4 +1,6 @@
|
||||
from flask import current_app, render_template
|
||||
from flask import current_app, render_template, abort
|
||||
|
||||
from the_office.helpers import check_validity
|
||||
|
||||
|
||||
@current_app.route('/')
|
||||
@@ -9,9 +11,13 @@ def index():
|
||||
|
||||
@current_app.route('/<int:season>')
|
||||
def view_season(season):
|
||||
if not check_validity(season, 1):
|
||||
abort(404)
|
||||
return render_template('season.html', season=season)
|
||||
|
||||
|
||||
@current_app.route('/<int:season>/<int:episode>')
|
||||
def view_episode(season, episode):
|
||||
if not check_validity(season, episode):
|
||||
abort(404)
|
||||
return render_template('episode.html', season=season, episode=episode)
|
||||
|
||||
@@ -1,13 +1,16 @@
|
||||
.accordion .list-group-item {
|
||||
border-radius: 0;
|
||||
border-width: 1px 0 1px 0;
|
||||
border-width: 0 0 0 0;
|
||||
border-bottom-width: 1px;
|
||||
.list-group-item:first-child { border-top-width: 1px; }
|
||||
.list-group-item:last-child { border-bottom-width: 0; }
|
||||
|
||||
padding-left: 30px;
|
||||
//background: #d6dbe0;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.accordion .list-group-item a {
|
||||
color: #61656b;
|
||||
//color: #61656b;
|
||||
display: block;
|
||||
}
|
||||
|
||||
@@ -28,7 +31,13 @@
|
||||
.card {
|
||||
border: 1px solid rgba(0, 0, 0, .125);
|
||||
border-bottom-color: rgba(0, 0, 0, 0.125);
|
||||
border-bottom-style: solid;
|
||||
border-bottom-width: 1px;
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
.no-link {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.no-link:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
@@ -8,7 +8,6 @@
|
||||
{# Site scripts #}
|
||||
<script src="https://code.jquery.com/jquery-3.5.1.min.js"
|
||||
integrity="sha256-9/aliU8dGd2tb6OSsuzixeV4y/faTqgFtohetphbbj0=" crossorigin="anonymous"></script>
|
||||
<script defer src="{{ url_for('static', filename='js/smoothscroll.js') }}"></script>
|
||||
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css"
|
||||
integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh"
|
||||
crossorigin="anonymous">
|
||||
@@ -33,12 +32,12 @@
|
||||
{% for season in data %}
|
||||
<div class="card">
|
||||
<div class="card-header" id="season-heading-{{ season.season_id }}">
|
||||
<a class="collapsed" data-toggle="collapse" data-parent="#season-accordion"
|
||||
<a class="collapsed no-link" data-toggle="collapse" data-parent="#season-accordion"
|
||||
href="#collapse-season-{{ season.season_id }}"
|
||||
aria-expanded="false" aria-controls="collapse-season-{{ season.season_id }}">
|
||||
<h5 class="mb-0 pu-0 mu-0">
|
||||
Season {{ season.season_id }} <i
|
||||
class="fas fa-chevron-down float-right"></i>
|
||||
Season {{ season.season_id }}
|
||||
<i class="fas fa-chevron-down float-right"></i>
|
||||
</h5>
|
||||
</a>
|
||||
</div>
|
||||
@@ -49,7 +48,8 @@
|
||||
<ul class="list-group">
|
||||
{% for episode in season.episodes %}
|
||||
<li class="list-group-item">
|
||||
<a href="{{ url_for('view_episode', season=season.season_id, episode=episode.episode_id) }}">
|
||||
<a class="no-link"
|
||||
href="{{ url_for('view_episode', season=season.season_id, episode=episode.episode_id) }}">
|
||||
Ep. {{ episode.episode_id }} - {{ episode.title }}
|
||||
</a>
|
||||
</li>
|
||||
|
||||
@@ -1,14 +1,16 @@
|
||||
{% extends 'base.html' %}
|
||||
{% set episode_data = data[season - 1]['episodes'][episode - 1] %}
|
||||
{% block page %}
|
||||
<div class="col-lg-6 col-md-12">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h4 class="my-0">
|
||||
Season {{ season }} Episode {{ episode }}
|
||||
Season {{ season }}, Episode {{ episode }} - {{ episode_data.title }}
|
||||
</h4>
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
{{ episode_data.description }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,3 +1,14 @@
|
||||
{% extends 'base.html' %}
|
||||
{% block page %}
|
||||
<div class="col-lg-6 col-md-12">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h4 class="my-0">
|
||||
The Office Quotes
|
||||
</h4>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock page %}
|
||||
Reference in New Issue
Block a user