Compare commits

7 Commits
books ... dev

5 changed files with 81 additions and 85 deletions

40
pages/lists.php Executable file
View File

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

View File

@@ -1,74 +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"] = "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,6 +207,28 @@
</div> </div>
</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"> <div class="row" id="other">
<h3 class="col-12 header">Other Programs</h3> <h3 class="col-12 header">Other Programs</h3>
</div> </div>

5
run.sh
View File

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