Skip to content

Commit

Permalink
Merge branch 'dev' into canon
Browse files Browse the repository at this point in the history
  • Loading branch information
juliancoy authored Mar 23, 2024
2 parents c0655bc + f1874e7 commit 9482a67
Show file tree
Hide file tree
Showing 67 changed files with 5,469 additions and 2 deletions.
10 changes: 9 additions & 1 deletion export.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,12 @@ def copyDictUnique(indict, modifier):

os.system("cp -r src/* build/")

julian_flare = json.dumps(m.asFlare(), indent=2)
os.system("rm -rf src/book_of_doctrine")
os.system("rm src/book_of_doctrine.html")
os.system("cp -r src/* build/")
with open("./src/index_template.html") as f:
template = f.read()
julian_flare = json.dumps(m.exportStatic(template=template, buildDir = "./build"), indent=2)

with open("build/julian_flare.json", "w+") as f:
f.write(julian_flare)
Expand All @@ -91,6 +96,9 @@ def copyDictUnique(indict, modifier):
with open("src/julian_flare.json", "w+") as f:
f.write(julian_flare)

os.system('cp -r "build/book_of_doctrine" "src/book_of_doctrine"')
os.system('cp -r "build/book_of_doctrine.html" "src/book_of_doctrine.html"')

with open("build/julian.json", "w+") as f:
f.write(json.dumps(m.asDict(), indent=2))

Expand Down
2 changes: 1 addition & 1 deletion runDocker.sh
Original file line number Diff line number Diff line change
@@ -1 +1 @@
docker run -it --rm --net=host -v $(pwd):/app -w /app python:3.11 /bin/bash
docker run -it --rm -v $(pwd):/app -w /app python:3.11 /bin/bash
51 changes: 51 additions & 0 deletions seo.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
import os
import xml.etree.ElementTree as ET
from datetime import datetime
from xml.dom import minidom

def create_manifest(directory, parent_element):
"""
Recursively creates XML elements for each item in the given directory.
Adds lastmod, changefreq, and priority elements where applicable.
"""
for item in os.listdir(directory):
item_path = os.path.join(directory, item)
if os.path.isdir(item_path):
# Create a 'directory' element for directories
dir_element = ET.SubElement(parent_element, 'directory', name=item)
create_manifest(item_path, dir_element)
else:
# Create a 'file' element for files
file_element = ET.SubElement(parent_element, 'file', name=item)
# Add lastmod, changefreq, and priority elements
lastmod = os.path.getmtime(item_path)
lastmod_date = datetime.utcfromtimestamp(lastmod).strftime('%Y-%m-%d')
ET.SubElement(file_element, 'lastmod').text = lastmod_date
ET.SubElement(file_element, 'changefreq').text = 'monthly' # Adjust based on your content
ET.SubElement(file_element, 'priority').text = '0.5' # Adjust based on your content

def generate_sitemanifest(root_dir):
"""
Generates a sitemanifest.xml file for the given root directory with pretty formatting.
Includes SEO optimizations like lastmod, changefreq, and priority.
"""
root_element = ET.Element('sitemanifest')
create_manifest(root_dir, root_element)

# Generate the XML tree
tree = ET.ElementTree(root_element)

# Use minidom to pretty print the XML
xml_str = ET.tostring(root_element, 'utf-8')
pretty_xml_as_string = minidom.parseString(xml_str).toprettyxml(indent=" ")

# Write the pretty-printed XML to a file
with open(os.path.join(root_dir, 'sitemanifest.xml'), 'w', encoding='utf-8') as f:
f.write(pretty_xml_as_string)

if __name__ == "__main__":
# Specify the root directory for which you want to create the sitemanifest.xml
root_directory = './build' # Replace with your directory path
generate_sitemanifest(root_directory)

print("sitemanifest.xml has been generated with SEO optimizations and pretty formatting.")
22 changes: 22 additions & 0 deletions src/arrows.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
.arrow-button {
/* Base styles for all buttons */
display: inline-block;
width: 40px;
height: 40px;
background-size: contain;
background-repeat: no-repeat;
cursor: pointer;
}

.back-arrow {
background-image: url('back.png');
}

.up-arrow {
background-image: url('up.png');
}

.forward-arrow {
background-image: url('forward.png');
}

Binary file added src/back.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
807 changes: 807 additions & 0 deletions src/book_of_doctrine.html

Large diffs are not rendered by default.

102 changes: 102 additions & 0 deletions src/book_of_doctrine/church.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
<!DOCTYPE html>
<html>

<head>
<title>Church of God (Deist)</title>
<link rel="icon" href="favicon.ico" type="image/x-icon" />
<script src="https://d3js.org/d3.v6.min.js"></script>
<link href="https://fonts.googleapis.com/css2?family=Raleway:wght@500&display=swap" rel="stylesheet" />
<link rel="stylesheet" type="text/css" href="/style.css" />
<link rel="stylesheet" type="text/css" href="/navbar.css" />
<link rel="stylesheet" type="text/css" href="/arrows.css" /> <!-- Reference to arrows.css -->
<script type="text/javascript"
src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>
</head>

<body>
<!-- Navigation Bar -->
<ul class="navbar">
<li><a href="javascript:void(0)" id="bojButton" class="dropbtn">Book of Doctrine</a></li>
<li class="dropdown">
<a href="javascript:void(0)" id="pillarSelect" class="dropbtn">All Pillars</a>
<div class="dropdown-content" id="pillarDropdown"></div>
</li>
<li class="dropdown">
<a href="javascript:void(0)" id="chapterSelect" class="dropbtn">All Chapters</a>
<div class="dropdown-content" id="chapterDropdown"></div>
</li>
<li><a href="javascript:void(0)" id="deismuButton" class="dropbtn">DeismU</a></li>
<li><a href="javascript:void(0)" id="profileButton" class="dropbtn">Profile</a></li>
<li><a href="javascript:void(0)" id="loginButton" class="dropbtn">Login</a></li>
</ul>

<!-- Main Content -->
<div class="flex-container">
<div id="chart"></div>
<div>
<!-- Arrow buttons (top) -->
<a href="./book_of_doctrine/nature.html" class="arrow-button back-arrow"></a>
<a href="./book_of_doctrine.html" class="arrow-button up-arrow"></a>
<a href="./book_of_doctrine/god.html" class="arrow-button forward-arrow"></a>

<div id="selected-node-text"><h3><a name=Church>Church</a></h3>
<p align="left"><h4><a name=OrgChart>OrgChart</a></h4>
<p align="left"><sup>0</sup> Julian.
</p><h4><a name=Communications>Communications</a></h4>
<p align="left"><h5><a name=Missiology>Missiology</a></h5>
<p align="left"><sup>0</sup> Missiology is the outreach arm of the Deist church. <sup>1</sup> Our media include
<ol><li>
The WWW</li><li>
Social Media</li><li>
Corporate Events</li></ol>


</p><h5><a name=Standards>Standards</a></h5>
<p align="left"><sup>0</sup> Vowel Set
<ol><li>
/ɔ/<ol>
<li>
a</li><li>
ball</li></ol>
</li><li>
/ɛ/<ol>
<li>
e</li><li>
bed</li></ol>
</li><li>
/i/<ol>
<li>
i</li><li>
eat</li></ol>
</li><li>
/oʊ/<ol>
<li>
o</li><li>
boat</li></ol>
</li><li>
/u/<ol>
<li>
u</li><li>
boot</li></ol>
</li></ol>


</p>
</p><h4><a name=Canonization>Canonization</a></h4>
<p align="left"><sup>0</sup> Any person who contributes to the Third Testament shall be considered Canonized by the Letter. <sup>1</sup> Furthermore, the Chief Theologian may bestow Sainthood upon dead persons, consistent with the practices and requirements of the Catholic church. <sup>2</sup> Finally, any person who completes a curriculum shall be considered Canonized by the Degree.
</p>
</p></div>

<!-- Arrow buttons (bottom) -->
<a href="./book_of_doctrine/nature.html" class="arrow-button back-arrow"></a>
<a href="./book_of_doctrine.html" class="arrow-button up-arrow"></a>
<a href="./book_of_doctrine/god.html" class="arrow-button forward-arrow"></a>
</div>
</div>

<script src="https://cdn.auth0.com/js/auth0-spa-js/1.13/auth0-spa-js.production.js"></script>
<script src="/navbar.js"></script>
<script src="/deismu.js"></script>
</body>

</html>
58 changes: 58 additions & 0 deletions src/book_of_doctrine/church/canonization.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
<!DOCTYPE html>
<html>

<head>
<title>Church of God (Deist)</title>
<link rel="icon" href="favicon.ico" type="image/x-icon" />
<script src="https://d3js.org/d3.v6.min.js"></script>
<link href="https://fonts.googleapis.com/css2?family=Raleway:wght@500&display=swap" rel="stylesheet" />
<link rel="stylesheet" type="text/css" href="/style.css" />
<link rel="stylesheet" type="text/css" href="/navbar.css" />
<link rel="stylesheet" type="text/css" href="/arrows.css" /> <!-- Reference to arrows.css -->
<script type="text/javascript"
src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>
</head>

<body>
<!-- Navigation Bar -->
<ul class="navbar">
<li><a href="javascript:void(0)" id="bojButton" class="dropbtn">Book of Doctrine</a></li>
<li class="dropdown">
<a href="javascript:void(0)" id="pillarSelect" class="dropbtn">All Pillars</a>
<div class="dropdown-content" id="pillarDropdown"></div>
</li>
<li class="dropdown">
<a href="javascript:void(0)" id="chapterSelect" class="dropbtn">All Chapters</a>
<div class="dropdown-content" id="chapterDropdown"></div>
</li>
<li><a href="javascript:void(0)" id="deismuButton" class="dropbtn">DeismU</a></li>
<li><a href="javascript:void(0)" id="profileButton" class="dropbtn">Profile</a></li>
<li><a href="javascript:void(0)" id="loginButton" class="dropbtn">Login</a></li>
</ul>

<!-- Main Content -->
<div class="flex-container">
<div id="chart"></div>
<div>
<!-- Arrow buttons (top) -->
<a href="./book_of_doctrine/church/communications.html" class="arrow-button back-arrow"></a>
<a href="./book_of_doctrine/church.html" class="arrow-button up-arrow"></a>
<a href="./book_of_doctrine/church/orgchart.html" class="arrow-button forward-arrow"></a>

<div id="selected-node-text"><h4><a name=Canonization>Canonization</a></h4>
<p align="left"><sup>0</sup> Any person who contributes to the Third Testament shall be considered Canonized by the Letter. <sup>1</sup> Furthermore, the Chief Theologian may bestow Sainthood upon dead persons, consistent with the practices and requirements of the Catholic church. <sup>2</sup> Finally, any person who completes a curriculum shall be considered Canonized by the Degree.
</p></div>

<!-- Arrow buttons (bottom) -->
<a href="./book_of_doctrine/church/communications.html" class="arrow-button back-arrow"></a>
<a href="./book_of_doctrine/church.html" class="arrow-button up-arrow"></a>
<a href="./book_of_doctrine/church/orgchart.html" class="arrow-button forward-arrow"></a>
</div>
</div>

<script src="https://cdn.auth0.com/js/auth0-spa-js/1.13/auth0-spa-js.production.js"></script>
<script src="/navbar.js"></script>
<script src="/deismu.js"></script>
</body>

</html>
96 changes: 96 additions & 0 deletions src/book_of_doctrine/church/communications.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
<!DOCTYPE html>
<html>

<head>
<title>Church of God (Deist)</title>
<link rel="icon" href="favicon.ico" type="image/x-icon" />
<script src="https://d3js.org/d3.v6.min.js"></script>
<link href="https://fonts.googleapis.com/css2?family=Raleway:wght@500&display=swap" rel="stylesheet" />
<link rel="stylesheet" type="text/css" href="/style.css" />
<link rel="stylesheet" type="text/css" href="/navbar.css" />
<link rel="stylesheet" type="text/css" href="/arrows.css" /> <!-- Reference to arrows.css -->
<script type="text/javascript"
src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>
</head>

<body>
<!-- Navigation Bar -->
<ul class="navbar">
<li><a href="javascript:void(0)" id="bojButton" class="dropbtn">Book of Doctrine</a></li>
<li class="dropdown">
<a href="javascript:void(0)" id="pillarSelect" class="dropbtn">All Pillars</a>
<div class="dropdown-content" id="pillarDropdown"></div>
</li>
<li class="dropdown">
<a href="javascript:void(0)" id="chapterSelect" class="dropbtn">All Chapters</a>
<div class="dropdown-content" id="chapterDropdown"></div>
</li>
<li><a href="javascript:void(0)" id="deismuButton" class="dropbtn">DeismU</a></li>
<li><a href="javascript:void(0)" id="profileButton" class="dropbtn">Profile</a></li>
<li><a href="javascript:void(0)" id="loginButton" class="dropbtn">Login</a></li>
</ul>

<!-- Main Content -->
<div class="flex-container">
<div id="chart"></div>
<div>
<!-- Arrow buttons (top) -->
<a href="./book_of_doctrine/church/orgchart.html" class="arrow-button back-arrow"></a>
<a href="./book_of_doctrine/church.html" class="arrow-button up-arrow"></a>
<a href="./book_of_doctrine/church/canonization.html" class="arrow-button forward-arrow"></a>

<div id="selected-node-text"><h4><a name=Communications>Communications</a></h4>
<p align="left"><h5><a name=Missiology>Missiology</a></h5>
<p align="left"><sup>0</sup> Missiology is the outreach arm of the Deist church. <sup>1</sup> Our media include
<ol><li>
The WWW</li><li>
Social Media</li><li>
Corporate Events</li></ol>


</p><h5><a name=Standards>Standards</a></h5>
<p align="left"><sup>0</sup> Vowel Set
<ol><li>
/ɔ/<ol>
<li>
a</li><li>
ball</li></ol>
</li><li>
/ɛ/<ol>
<li>
e</li><li>
bed</li></ol>
</li><li>
/i/<ol>
<li>
i</li><li>
eat</li></ol>
</li><li>
/oʊ/<ol>
<li>
o</li><li>
boat</li></ol>
</li><li>
/u/<ol>
<li>
u</li><li>
boot</li></ol>
</li></ol>


</p>
</p></div>

<!-- Arrow buttons (bottom) -->
<a href="./book_of_doctrine/church/orgchart.html" class="arrow-button back-arrow"></a>
<a href="./book_of_doctrine/church.html" class="arrow-button up-arrow"></a>
<a href="./book_of_doctrine/church/canonization.html" class="arrow-button forward-arrow"></a>
</div>
</div>

<script src="https://cdn.auth0.com/js/auth0-spa-js/1.13/auth0-spa-js.production.js"></script>
<script src="/navbar.js"></script>
<script src="/deismu.js"></script>
</body>

</html>
Loading

0 comments on commit 9482a67

Please sign in to comment.