Adding reading_plan. Updating requirements.txt.
This commit is contained in:
parent
5639e55ac8
commit
b41774bcdc
15
.vscode/launch.json
vendored
Normal file
15
.vscode/launch.json
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
{
|
||||
// Use IntelliSense to learn about possible attributes.
|
||||
// Hover to view descriptions of existing attributes.
|
||||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"name": "Herrewebsite",
|
||||
"type": "debugpy",
|
||||
"request": "launch",
|
||||
"program": "app.py",
|
||||
"console": "integratedTerminal"
|
||||
}
|
||||
]
|
||||
}
|
28
app.py
28
app.py
@ -1,8 +1,11 @@
|
||||
from flask import Flask, render_template, redirect
|
||||
import subprocess, logging, os, shutil
|
||||
import subprocess, logging, os, shutil, datetime
|
||||
import pandas as pd
|
||||
import pythonbible as bible
|
||||
|
||||
app = Flask(__name__, static_folder='static/')
|
||||
os.chdir(os.path.dirname(os.path.abspath(__file__)))
|
||||
CURRENT_DATE = datetime.datetime.now().strftime('%Y-%m-%d')
|
||||
|
||||
|
||||
def _git_clone(repository_url, destination_folder):
|
||||
@ -92,6 +95,27 @@ def contact():
|
||||
def about():
|
||||
return render_template('pages/about.html')
|
||||
|
||||
@app.route('/reading_plan')
|
||||
def reading_plan():
|
||||
# Open reading plan from static folder
|
||||
df = pd.read_csv('static/reading_plan/reading_plan_2024-09-08.csv')
|
||||
|
||||
# Check if the current date is in the reading plan ('Date' column)
|
||||
if CURRENT_DATE in df['Date'].values:
|
||||
# Get the row of the current date
|
||||
row = df[df['Date'] == CURRENT_DATE]
|
||||
else:
|
||||
# If CURRENT_DATE is smaller than the smallest value in the 'Date' column, get the first row, else get the last row
|
||||
row = df.iloc[0] if CURRENT_DATE < df['Date'].values[0] else df.iloc[-1]
|
||||
|
||||
# df colums are: Date,Book,Start Chapter,End Chapter
|
||||
book = row['Book'].iloc[0]
|
||||
start_chapter = row['Start Chapter'].iloc[0]
|
||||
end_chapter = row['End Chapter'].iloc[0]
|
||||
|
||||
# Create a reading plan html page
|
||||
return render_template('pages/reading_plan.html', book=book, start_chapter=start_chapter, end_chapter=end_chapter, reading_plan=df, date=CURRENT_DATE)
|
||||
|
||||
@app.route('/pages/strongholdkingdoms')
|
||||
def strongholdkingdoms():
|
||||
return render_template('pages/strongholdkingdoms.html')
|
||||
@ -99,4 +123,4 @@ def strongholdkingdoms():
|
||||
if __name__ == "__main__":
|
||||
_clone_repositories()
|
||||
_buid_docs()
|
||||
app.run(debug=True, host='0.0.0.0', port=5002)
|
||||
app.run(debug=False, host='0.0.0.0', port=5002)
|
||||
|
@ -1,2 +1,4 @@
|
||||
Flask==2.1.0 # or a later version
|
||||
Werkzeug==2.0.0
|
||||
watchdog
|
||||
pythonbible
|
325
static/reading_plan/reading_plan_2024-09-08.csv
Normal file
325
static/reading_plan/reading_plan_2024-09-08.csv
Normal file
@ -0,0 +1,325 @@
|
||||
Date,Book,Start Chapter,End Chapter
|
||||
2024-09-08,1 Kings,1,4
|
||||
2024-09-09,1 Kings,5,8
|
||||
2024-09-10,1 Kings,9,12
|
||||
2024-09-11,1 Kings,13,16
|
||||
2024-09-12,1 Kings,17,20
|
||||
2024-09-13,1 Kings,21,22
|
||||
2024-09-14,2 John,1,1
|
||||
2024-09-15,Zephaniah,1,3
|
||||
2024-09-16,2 Chronicles,1,4
|
||||
2024-09-17,2 Chronicles,5,8
|
||||
2024-09-18,2 Chronicles,9,12
|
||||
2024-09-19,2 Chronicles,13,16
|
||||
2024-09-20,2 Chronicles,17,20
|
||||
2024-09-21,2 Chronicles,21,24
|
||||
2024-09-22,2 Chronicles,25,28
|
||||
2024-09-23,2 Chronicles,29,32
|
||||
2024-09-24,2 Chronicles,33,36
|
||||
2024-09-25,2 Chronicles,37,37
|
||||
2024-09-26,Obadiah,1,1
|
||||
2024-09-27,Revelation,1,4
|
||||
2024-09-28,Revelation,5,8
|
||||
2024-09-29,Revelation,9,12
|
||||
2024-09-30,Revelation,13,16
|
||||
2024-10-01,Revelation,17,20
|
||||
2024-10-02,Revelation,21,22
|
||||
2024-10-03,Amos,1,4
|
||||
2024-10-04,Amos,5,8
|
||||
2024-10-05,Amos,9,9
|
||||
2024-10-06,1 Chronicles,1,4
|
||||
2024-10-07,1 Chronicles,5,8
|
||||
2024-10-08,1 Chronicles,9,12
|
||||
2024-10-09,1 Chronicles,13,16
|
||||
2024-10-10,1 Chronicles,17,20
|
||||
2024-10-11,1 Chronicles,21,24
|
||||
2024-10-12,1 Chronicles,25,28
|
||||
2024-10-13,1 Chronicles,29,29
|
||||
2024-10-14,Leviticus,1,4
|
||||
2024-10-15,Leviticus,5,8
|
||||
2024-10-16,Leviticus,9,12
|
||||
2024-10-17,Leviticus,13,16
|
||||
2024-10-18,Leviticus,17,20
|
||||
2024-10-19,Leviticus,21,24
|
||||
2024-10-20,Leviticus,25,27
|
||||
2024-10-21,Micah,1,4
|
||||
2024-10-22,Micah,5,7
|
||||
2024-10-23,Hosea,1,4
|
||||
2024-10-24,Hosea,5,8
|
||||
2024-10-25,Hosea,9,12
|
||||
2024-10-26,Hosea,13,14
|
||||
2024-10-27,John,1,4
|
||||
2024-10-28,John,5,8
|
||||
2024-10-29,John,9,12
|
||||
2024-10-30,John,13,16
|
||||
2024-10-31,John,17,20
|
||||
2024-11-01,John,21,21
|
||||
2024-11-02,Isaiah,1,4
|
||||
2024-11-03,Isaiah,5,8
|
||||
2024-11-04,Isaiah,9,12
|
||||
2024-11-05,Isaiah,13,16
|
||||
2024-11-06,Isaiah,17,20
|
||||
2024-11-07,Isaiah,21,24
|
||||
2024-11-08,Isaiah,25,28
|
||||
2024-11-09,Isaiah,29,32
|
||||
2024-11-10,Isaiah,33,36
|
||||
2024-11-11,Isaiah,37,40
|
||||
2024-11-12,Isaiah,41,44
|
||||
2024-11-13,Isaiah,45,48
|
||||
2024-11-14,Isaiah,49,52
|
||||
2024-11-15,Isaiah,53,56
|
||||
2024-11-16,Isaiah,57,60
|
||||
2024-11-17,Isaiah,61,64
|
||||
2024-11-18,Isaiah,65,67
|
||||
2024-11-19,Ephesians,1,4
|
||||
2024-11-20,Ephesians,5,6
|
||||
2024-11-21,1 Thessalonians,1,4
|
||||
2024-11-22,1 Thessalonians,5,5
|
||||
2024-11-23,Jonah,1,4
|
||||
2024-11-24,2 Samuel,1,4
|
||||
2024-11-25,2 Samuel,5,8
|
||||
2024-11-26,2 Samuel,9,12
|
||||
2024-11-27,2 Samuel,13,16
|
||||
2024-11-28,2 Samuel,17,20
|
||||
2024-11-29,2 Samuel,21,24
|
||||
2024-11-30,1 Samuel,1,4
|
||||
2024-12-01,1 Samuel,5,8
|
||||
2024-12-02,1 Samuel,9,12
|
||||
2024-12-03,1 Samuel,13,16
|
||||
2024-12-04,1 Samuel,17,20
|
||||
2024-12-05,1 Samuel,21,24
|
||||
2024-12-06,1 Samuel,25,28
|
||||
2024-12-07,1 Samuel,29,31
|
||||
2024-12-08,3 John,1,1
|
||||
2024-12-09,Joshua,1,4
|
||||
2024-12-10,Joshua,5,8
|
||||
2024-12-11,Joshua,9,12
|
||||
2024-12-12,Joshua,13,16
|
||||
2024-12-13,Joshua,17,20
|
||||
2024-12-14,Joshua,21,24
|
||||
2024-12-15,Ezra,1,4
|
||||
2024-12-16,Ezra,5,8
|
||||
2024-12-17,Ezra,9,10
|
||||
2024-12-18,Mark,1,4
|
||||
2024-12-19,Mark,5,8
|
||||
2024-12-20,Mark,9,12
|
||||
2024-12-21,Mark,13,16
|
||||
2024-12-22,Titus,1,3
|
||||
2024-12-23,Luke,1,4
|
||||
2024-12-24,Luke,5,8
|
||||
2024-12-25,Luke,9,12
|
||||
2024-12-26,Luke,13,16
|
||||
2024-12-27,Luke,17,20
|
||||
2024-12-28,Luke,21,24
|
||||
2024-12-29,Jeremiah,1,4
|
||||
2024-12-30,Jeremiah,5,8
|
||||
2024-12-31,Jeremiah,9,12
|
||||
2025-01-01,Jeremiah,13,16
|
||||
2025-01-02,Jeremiah,17,20
|
||||
2025-01-03,Jeremiah,21,24
|
||||
2025-01-04,Jeremiah,25,28
|
||||
2025-01-05,Jeremiah,29,32
|
||||
2025-01-06,Jeremiah,33,36
|
||||
2025-01-07,Jeremiah,37,40
|
||||
2025-01-08,Jeremiah,41,44
|
||||
2025-01-09,Jeremiah,45,48
|
||||
2025-01-10,Jeremiah,49,52
|
||||
2025-01-11,1 Timothy,1,4
|
||||
2025-01-12,1 Timothy,5,6
|
||||
2025-01-13,2 Timothy,1,4
|
||||
2025-01-14,Philemon,1,1
|
||||
2025-01-15,Genesis,1,4
|
||||
2025-01-16,Genesis,5,8
|
||||
2025-01-17,Genesis,9,12
|
||||
2025-01-18,Genesis,13,16
|
||||
2025-01-19,Genesis,17,20
|
||||
2025-01-20,Genesis,21,24
|
||||
2025-01-21,Genesis,25,28
|
||||
2025-01-22,Genesis,29,32
|
||||
2025-01-23,Genesis,33,36
|
||||
2025-01-24,Genesis,37,40
|
||||
2025-01-25,Genesis,41,44
|
||||
2025-01-26,Genesis,45,48
|
||||
2025-01-27,Genesis,49,50
|
||||
2025-01-28,Haggai,1,2
|
||||
2025-01-29,Ecclesiastes,1,4
|
||||
2025-01-30,Ecclesiastes,5,8
|
||||
2025-01-31,Ecclesiastes,9,12
|
||||
2025-02-01,Matthew,1,4
|
||||
2025-02-02,Matthew,5,8
|
||||
2025-02-03,Matthew,9,12
|
||||
2025-02-04,Matthew,13,16
|
||||
2025-02-05,Matthew,17,20
|
||||
2025-02-06,Matthew,21,24
|
||||
2025-02-07,Matthew,25,28
|
||||
2025-02-08,Malachi,1,4
|
||||
2025-02-09,Psalms,1,4
|
||||
2025-02-10,Psalms,5,8
|
||||
2025-02-11,Psalms,9,12
|
||||
2025-02-12,Psalms,13,16
|
||||
2025-02-13,Psalms,17,20
|
||||
2025-02-14,Psalms,21,24
|
||||
2025-02-15,Psalms,25,28
|
||||
2025-02-16,Psalms,29,32
|
||||
2025-02-17,Psalms,33,36
|
||||
2025-02-18,Psalms,37,40
|
||||
2025-02-19,Psalms,41,44
|
||||
2025-02-20,Psalms,45,48
|
||||
2025-02-21,Psalms,49,52
|
||||
2025-02-22,Psalms,53,56
|
||||
2025-02-23,Psalms,57,60
|
||||
2025-02-24,Psalms,61,64
|
||||
2025-02-25,Psalms,65,68
|
||||
2025-02-26,Psalms,69,72
|
||||
2025-02-27,Psalms,73,76
|
||||
2025-02-28,Psalms,77,80
|
||||
2025-03-01,Psalms,81,84
|
||||
2025-03-02,Psalms,85,88
|
||||
2025-03-03,Psalms,89,92
|
||||
2025-03-04,Psalms,93,96
|
||||
2025-03-05,Psalms,97,100
|
||||
2025-03-06,Psalms,101,104
|
||||
2025-03-07,Psalms,105,108
|
||||
2025-03-08,Psalms,109,112
|
||||
2025-03-09,Psalms,113,116
|
||||
2025-03-10,Psalms,117,120
|
||||
2025-03-11,Psalms,121,124
|
||||
2025-03-12,Psalms,125,128
|
||||
2025-03-13,Psalms,129,132
|
||||
2025-03-14,Psalms,133,136
|
||||
2025-03-15,Psalms,137,140
|
||||
2025-03-16,Psalms,141,144
|
||||
2025-03-17,Psalms,145,148
|
||||
2025-03-18,Psalms,149,152
|
||||
2025-03-19,Acts,1,4
|
||||
2025-03-20,Acts,5,8
|
||||
2025-03-21,Acts,9,12
|
||||
2025-03-22,Acts,13,16
|
||||
2025-03-23,Acts,17,20
|
||||
2025-03-24,Acts,21,24
|
||||
2025-03-25,Acts,25,28
|
||||
2025-03-26,Colossians,1,4
|
||||
2025-03-27,James,1,4
|
||||
2025-03-28,James,5,5
|
||||
2025-03-29,Ezekiel,1,4
|
||||
2025-03-30,Ezekiel,5,8
|
||||
2025-03-31,Ezekiel,9,12
|
||||
2025-04-01,Ezekiel,13,16
|
||||
2025-04-02,Ezekiel,17,20
|
||||
2025-04-03,Ezekiel,21,24
|
||||
2025-04-04,Ezekiel,25,28
|
||||
2025-04-05,Ezekiel,29,32
|
||||
2025-04-06,Ezekiel,33,36
|
||||
2025-04-07,Ezekiel,37,40
|
||||
2025-04-08,Ezekiel,41,44
|
||||
2025-04-09,Ezekiel,45,48
|
||||
2025-04-10,2 Corinthians,1,4
|
||||
2025-04-11,2 Corinthians,5,8
|
||||
2025-04-12,2 Corinthians,9,12
|
||||
2025-04-13,2 Corinthians,13,13
|
||||
2025-04-14,Lamentations,1,4
|
||||
2025-04-15,Lamentations,5,5
|
||||
2025-04-16,Esther,1,4
|
||||
2025-04-17,Esther,5,8
|
||||
2025-04-18,Esther,9,12
|
||||
2025-04-19,Esther,13,16
|
||||
2025-04-20,1 Corinthians,1,4
|
||||
2025-04-21,1 Corinthians,5,8
|
||||
2025-04-22,1 Corinthians,9,12
|
||||
2025-04-23,1 Corinthians,13,16
|
||||
2025-04-24,Nehemiah,1,4
|
||||
2025-04-25,Nehemiah,5,8
|
||||
2025-04-26,Nehemiah,9,12
|
||||
2025-04-27,Nehemiah,13,13
|
||||
2025-04-28,Habakkuk,1,3
|
||||
2025-04-29,2 Peter,1,3
|
||||
2025-04-30,Daniel,1,4
|
||||
2025-05-01,Daniel,5,8
|
||||
2025-05-02,Daniel,9,12
|
||||
2025-05-03,Daniel,13,14
|
||||
2025-05-04,Jude,1,1
|
||||
2025-05-05,Joel,1,3
|
||||
2025-05-06,Galatians,1,4
|
||||
2025-05-07,Galatians,5,6
|
||||
2025-05-08,2 Kings,1,4
|
||||
2025-05-09,2 Kings,5,8
|
||||
2025-05-10,2 Kings,9,12
|
||||
2025-05-11,2 Kings,13,16
|
||||
2025-05-12,2 Kings,17,20
|
||||
2025-05-13,2 Kings,21,24
|
||||
2025-05-14,2 Kings,25,25
|
||||
2025-05-15,Judges,1,4
|
||||
2025-05-16,Judges,5,8
|
||||
2025-05-17,Judges,9,12
|
||||
2025-05-18,Judges,13,16
|
||||
2025-05-19,Judges,17,20
|
||||
2025-05-20,Judges,21,21
|
||||
2025-05-21,Song of Songs,1,4
|
||||
2025-05-22,Song of Songs,5,8
|
||||
2025-05-23,Romans,1,4
|
||||
2025-05-24,Romans,5,8
|
||||
2025-05-25,Romans,9,12
|
||||
2025-05-26,Romans,13,16
|
||||
2025-05-27,1 John,1,4
|
||||
2025-05-28,1 John,5,5
|
||||
2025-05-29,Nahum,1,3
|
||||
2025-05-30,Job,1,4
|
||||
2025-05-31,Job,5,8
|
||||
2025-06-01,Job,9,12
|
||||
2025-06-02,Job,13,16
|
||||
2025-06-03,Job,17,20
|
||||
2025-06-04,Job,21,24
|
||||
2025-06-05,Job,25,28
|
||||
2025-06-06,Job,29,32
|
||||
2025-06-07,Job,33,36
|
||||
2025-06-08,Job,37,40
|
||||
2025-06-09,Job,41,42
|
||||
2025-06-10,Zechariah,1,4
|
||||
2025-06-11,Zechariah,5,8
|
||||
2025-06-12,Zechariah,9,12
|
||||
2025-06-13,Zechariah,13,14
|
||||
2025-06-14,Numbers,1,4
|
||||
2025-06-15,Numbers,5,8
|
||||
2025-06-16,Numbers,9,12
|
||||
2025-06-17,Numbers,13,16
|
||||
2025-06-18,Numbers,17,20
|
||||
2025-06-19,Numbers,21,24
|
||||
2025-06-20,Numbers,25,28
|
||||
2025-06-21,Numbers,29,32
|
||||
2025-06-22,Numbers,33,36
|
||||
2025-06-23,Deuteronomy,1,4
|
||||
2025-06-24,Deuteronomy,5,8
|
||||
2025-06-25,Deuteronomy,9,12
|
||||
2025-06-26,Deuteronomy,13,16
|
||||
2025-06-27,Deuteronomy,17,20
|
||||
2025-06-28,Deuteronomy,21,24
|
||||
2025-06-29,Deuteronomy,25,28
|
||||
2025-06-30,Deuteronomy,29,32
|
||||
2025-07-01,Deuteronomy,33,34
|
||||
2025-07-02,Exodus,1,4
|
||||
2025-07-03,Exodus,5,8
|
||||
2025-07-04,Exodus,9,12
|
||||
2025-07-05,Exodus,13,16
|
||||
2025-07-06,Exodus,17,20
|
||||
2025-07-07,Exodus,21,24
|
||||
2025-07-08,Exodus,25,28
|
||||
2025-07-09,Exodus,29,32
|
||||
2025-07-10,Exodus,33,36
|
||||
2025-07-11,Exodus,37,40
|
||||
2025-07-12,Proverbs,1,4
|
||||
2025-07-13,Proverbs,5,8
|
||||
2025-07-14,Proverbs,9,12
|
||||
2025-07-15,Proverbs,13,16
|
||||
2025-07-16,Proverbs,17,20
|
||||
2025-07-17,Proverbs,21,24
|
||||
2025-07-18,Proverbs,25,28
|
||||
2025-07-19,Proverbs,29,31
|
||||
2025-07-20,Ruth,1,4
|
||||
2025-07-21,1 Peter,1,4
|
||||
2025-07-22,1 Peter,5,5
|
||||
2025-07-23,Philippians,1,4
|
||||
2025-07-24,Hebrews,1,4
|
||||
2025-07-25,Hebrews,5,8
|
||||
2025-07-26,Hebrews,9,12
|
||||
2025-07-27,Hebrews,13,13
|
||||
2025-07-28,2 Thessalonians,1,3
|
|
@ -4,7 +4,7 @@
|
||||
|
||||
<nav>
|
||||
<ul style="list-style-type: none; padding: 0; display: flex; gap: 10px; justify-content: center;">
|
||||
{% for page in ['hello', 'contact', 'about'] %}
|
||||
{% for page in ['hello', 'contact', 'about', 'reading_plan'] %}
|
||||
<li>
|
||||
<a href="{{ url_for(page.lower()) }}" style="text-decoration: none;">
|
||||
<button style="background-color: #5d4643; color: #ffd700; border: 2px solid #2b1d1b; padding: 10px; cursor: pointer; transition: all 0.3s;">
|
||||
|
78
templates/pages/reading_plan.html
Normal file
78
templates/pages/reading_plan.html
Normal file
@ -0,0 +1,78 @@
|
||||
<!-- reading_plan.html -->
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Reading Plan</title>
|
||||
<link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='styles.css') }}">
|
||||
<style>
|
||||
/* Add some styles for the table and scrolling */
|
||||
.table-container {
|
||||
margin-top: 20px;
|
||||
max-height: 800px;
|
||||
overflow-y: auto;
|
||||
border: 1px solid #ccc;
|
||||
}
|
||||
|
||||
table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
table th, table td {
|
||||
border: 1px solid #ccc;
|
||||
padding: 8px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
table th {
|
||||
background-color: #f2f2f2;
|
||||
}
|
||||
|
||||
/* Set text color to black */
|
||||
body {
|
||||
color: black;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="main-container">
|
||||
<h1>Today's Reading Plan ({{ date }})</h1>
|
||||
|
||||
<p><strong>Book:</strong> {{ book }}</p>
|
||||
<p><strong>Start Chapter:</strong> {{ start_chapter }}</p>
|
||||
<p><strong>End Chapter:</strong> {{ end_chapter }}</p>
|
||||
|
||||
<!-- Table for the entire reading plan -->
|
||||
<div class="table-container">
|
||||
<h2>Full Reading Plan</h2>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Date</th>
|
||||
<th>Book</th>
|
||||
<th>Start Chapter</th>
|
||||
<th>End Chapter</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for index, row in reading_plan.iterrows() %}
|
||||
<tr>
|
||||
<td>{{ row['Date'] }}</td>
|
||||
<td>{{ row['Book'] }}</td>
|
||||
<td>{{ row['Start Chapter'] }}</td>
|
||||
<td>{{ row['End Chapter'] }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<!-- Optionally, you could add navigation buttons -->
|
||||
<div class="navigation">
|
||||
<a href="/">Back to Home</a>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue
Block a user