Compare commits

2 Commits
dev ... books

5 changed files with 85 additions and 81 deletions

View File

@@ -1,40 +0,0 @@
#!/usr/bin/php
<!--
Lists of items which I'd like to share such as gear and frequently used apps.
-->
<?php
if (!isset($GLOBALS["HEADER_TITLE"])) {
$GLOBALS["HEADER_TITLE"] = "Lists";
}
include "helpers/body_open.php";
?>
<div class="row">
<h1 class="col-12 title">Lists</h1>
</div>
<div class="row">
<h3 class="col-6 header">Gear</h3>
<h3 class="col-6 header">Apps</h3>
<!-- Gear -->
<div class="col-6 text">
<p>
Gear that I find critical to my life.
</p>
<ul class="indent">
<li><a href="TBD">Sleeping Bag</a></li>
</ul>
</div>
<!-- Apps -->
<div class="col-6 text">
<p>
Apps that I use frequently on a degoogled Android phone.
</p>
</div>
</div>
<?php
include "helpers/body_close.php";
?>

View File

@@ -131,15 +131,13 @@ function build_album_pages {
fi
## Put in the subpage HTML ##
new_row="\t\t<div class='row text'>"
# Set the count and start a row if this is the first loop.
# Set the count if this is the first loop.
if [[ -z $count ]]; then
count=0
echo -e "$newrow" >> $subpage
# Else check if we need to start a new one for the next 2 images.
elif (( $count % 2 == 0 )); then
echo -e "\t\t</div>" >> $subpage
echo -e "$newrow" >> $subpage
fi
# Add a row for the next 2 images.
if (( $count % 2 == 0 )); then
echo -e "\t\t<div class='row text'>" >> $subpage
fi
# Add the container for the image and its text.
echo -e "\t\t\t<div class='col-6 center'>" >> $subpage
@@ -162,6 +160,10 @@ function build_album_pages {
fi
# Close the image description and its link.
echo -e "</p>\n\t\t\t\t</a>\n\t\t\t</div>" >> $subpage
# Close the row after an odd count.
if (( $count % 2 == 1 )); then
echo -e "\t\t</div>" >> $subpage
fi
count=$(( count + 1 ))
done
echo -e "\t\t</div>" >> $subpage
@@ -247,8 +249,7 @@ function build_all_page {
count=0
fi
if [[ $count == 0 ]]; then
echo -e "\t\t</div>" >> $allpage
echo -e "\t\t<div class='row text'>" >> $allpage
echo -e "\t\t<div class=row text>" >> $allpage
fi
# Add a column.
@@ -290,16 +291,10 @@ function build_all_page {
}
## Main ##
beg_time="$SECONDS"
start_main_page
build_album_pages
build_all_page
end_main_page
end_time="$SECONDS"
time="$(( $end_time - $beg_time ))"
echo "<!-- Script took '$time' seconds to process. -->" >> $mainpage
cat $mainpage
exit 0

74
pages/resources.php Executable file
View File

@@ -0,0 +1,74 @@
#!/usr/bin/php
<!--
Lists of items which I'd like to share such as gear and frequently used apps.
-->
<?php
if (!isset($GLOBALS["HEADER_TITLE"])) {
$GLOBALS["HEADER_TITLE"] = "Resources";
}
include "helpers/body_open.php";
?>
<div class="row">
<h1 class="col-12 title">Lists of Resources</h1>
</div>
<!-- Books -->
<div class="row text" id="books">
<h3 class="col-3">
Books
</h3>
<div class="col-9">
<p>
TBD/TODO: Berk list description goes here!
</p>
<p>
Another line fortesting.
</p>
<p>
Yet another line fortesting.
</p>
<ul>
<li>
The Peaceful Warrior
</li>
<li>
TBD: Name of book on healing through breathing and posture.
</li>
<li>
The Untethered Soul / Living Untethered
</li>
</ul>
</div>
</div>
<!-- Apps -->
<div class="row text" id="apps">
<h3 class="col-3">
<a target='_blank' rel='noopener noreferrer'
href="https://git.hyperling.com/me/env-obtainium">
Apps (Repo TBD/TODO)
</a>
</h3>
<div class="col-9">
<p>
Obtaiumiun config for apps that I use on a degoogled Android phone.
</p>
</div>
</div>
<!-- Gear -->
<div class="row text" id="gear">
<h3 class="col-3">
Gear
</h3>
<div class="col-9">
<p>
Important gear I recommend.
</p>
</div>
</div>
<?php
include "helpers/body_close.php";
?>

View File

@@ -207,28 +207,6 @@
</div>
</div>
<div class="row" id="obtainium">
<h4 class="col-12 header">Obtainium Configuration</h4>
</div>
<div class="row text">
<div class="col-12 text">
<p>
In order to have the correct version numbers in Obtainium:
</p>
<ul>
<li>Enable <i>"Sort by only the last segment of the link"</i>.</li>
<li>
Set the <i>"Version string extraction RegEx"</i> field to:
<code>[0-9\.]+[0-9]+</code>
</li>
</ul>
<p>
Otherwise, <i>"Take first link"</i> works with pseudo versions.
</p>
</div>
</div>
<div class="row" id="other">
<h3 class="col-12 header">Other Programs</h3>
</div>

5
run.sh
View File

@@ -99,7 +99,6 @@ find files/photos/ -name "*".html -print -delete
http_code=0
port="${ports%% *}"
photos_uri=":$port/photos/"
beg_time="$SECONDS"
while [[ $http_code != "200" ]]; do
log "Sleeping for '$count' while waiting for $photos_uri to come up."
sleep $count
@@ -113,9 +112,7 @@ find files/photos/ -name "*".html -print -delete
count=$(( count + 1 ))
fi
done
end_time="$SECONDS"
time="$(( $end_time - $beg_time ))"
log "Finished checking for /photos/ after '$time' seconds."
log "Finished checking for /photos/."
} &
## Main ##