7 Commits
Author SHA1 Message Date
ryan 02b843a2b7 upd: Dockerfile
change default brange for building image
2026-06-17 19:12:26 -04:00
ryan e7c64a5a13 upd: install script
fix import-bible
fix import-heidelberg
2026-06-13 13:41:48 -04:00
ryan 743885608d upd: composer
update composer lock file
2026-06-13 13:40:50 -04:00
ryan 60712b81ea upd: sidebar twig
update format for new home format
2026-06-13 13:39:25 -04:00
ryan d3508943a2 fix: dbts
fix typos
2026-06-13 13:39:01 -04:00
ryan 161e73f354 upd: note entity
fix js calls
add recording URL to json output
2026-06-13 13:38:38 -04:00
ryan e14abe23fd upd: ajaxcontroller
fix couple typos
2026-06-13 13:37:24 -04:00
7 changed files with 279 additions and 272 deletions
+1 -1
View File
@@ -42,7 +42,7 @@ RUN curl -sS https://get.symfony.com/cli/installer | bash && \
mv /root/.symfony5/bin/symfony /usr/local/bin/symfony mv /root/.symfony5/bin/symfony /usr/local/bin/symfony
ARG CACHEBURST=1 ARG CACHEBURST=1
ARG BRANCH=master ARG BRANCH=main
WORKDIR /var/www/html WORKDIR /var/www/html
RUN git clone -b ${BRANCH} --single-branch https://gitea.rkprather.com/ryan/sermon-notes.git ./ RUN git clone -b ${BRANCH} --single-branch https://gitea.rkprather.com/ryan/sermon-notes.git ./
Generated
+250 -244
View File
File diff suppressed because it is too large Load Diff
Executable → Regular
+2 -2
View File
@@ -17,7 +17,7 @@ shell_exec("chown -R www-data:www-data /data /var/www/html/var/cache");
// import reference material // import reference material
print "Importing Bible and Eccumenical Creeds".PHP_EOL; print "Importing Bible and Eccumenical Creeds".PHP_EOL;
shell_exec("symfony console app:ingest-bible /var/www/html/references/esv-bible"); shell_exec("symfony console app:import-bible /var/www/html/references/esv-bible");
shell_exec("symfony console app:import-ref /var/www/html/references/creeds/Apostles 'Apostles Creed' creed apc"); shell_exec("symfony console app:import-ref /var/www/html/references/creeds/Apostles 'Apostles Creed' creed apc");
shell_exec("symfony console app:import-ref /var/www/html/references/creeds/Athanasian 'Athanasian Creed' creed ath"); shell_exec("symfony console app:import-ref /var/www/html/references/creeds/Athanasian 'Athanasian Creed' creed ath");
shell_exec("symfony console app:import-ref /var/www/html/references/creeds/Chalcedon 'Definition of Chalcedon' creed dc"); shell_exec("symfony console app:import-ref /var/www/html/references/creeds/Chalcedon 'Definition of Chalcedon' creed dc");
@@ -33,7 +33,7 @@ $dutchStandards = (
if ($dutchStandards) { if ($dutchStandards) {
print "Importing Dutch Standards".PHP_EOL; print "Importing Dutch Standards".PHP_EOL;
shell_exec("symfony console app:import-ref /var/www/html/references/bc Belgic belgic BC{\$ndx}"); shell_exec("symfony console app:import-ref /var/www/html/references/bc Belgic belgic BC{\$ndx}");
shell_exec("symfony console app:import-heidelberg"); shell_exec("symfony console app:import-heidelberg /var/www/html/references/hc");
shell_exec("symfony console app:import-ref /var/www/html/references/cd Canons cd CD"); shell_exec("symfony console app:import-ref /var/www/html/references/cd Canons cd CD");
} }
+4 -5
View File
@@ -3,7 +3,7 @@
namespace App\Controller; namespace App\Controller;
use DateTime; use DateTime;
use Exception;
use Parsedown; use Parsedown;
use App\Entity\Reference; use App\Entity\Reference;
use App\Entity\Template; use App\Entity\Template;
@@ -16,7 +16,6 @@ use App\Entity\SharedNote;
use App\Utils\Utils; use App\Utils\Utils;
use Doctrine\DBAL\Exception\ReadOnlyException; use Doctrine\DBAL\Exception\ReadOnlyException;
use Doctrine\ORM\EntityManagerInterface; use Doctrine\ORM\EntityManagerInterface;
use Exception;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpFoundation\Response;
@@ -299,11 +298,11 @@ class AjaxController extends AbstractController
$newNote = false; $newNote = false;
if (isset($data->id) && $data->id) { if (isset($data->id) && $data->id) {
/** @var Note|array $note */ /** @var Note|array $note */
$note = $emi->getRepository(Note::class)->findBy(['id' => $data->id, 'user' => $this->getUser()]); $dbnote = $emi->getRepository(Note::class)->findBy(['id' => $data->id, 'user' => $this->getUser()]);
if (is_array($note) && count($note) > 0) { if (is_array($dbnote) && count($dbnote) > 0) {
/** @var Note $note */ /** @var Note $note */
$note = $note[0]; $note = $dbnote[0];
} else { } else {
$note = new Note(); $note = new Note();
$newNote = true; $newNote = true;
+4 -3
View File
@@ -167,14 +167,14 @@ class Note implements JsonSerializable
public function toLink(): string public function toLink(): string
{ {
return "<a href='#' onclick=\"retrieveNote('{$this->id}')\">". return "<a href='#' onclick=\"note.retrieveNote('{$this->id}')\">".
$this->title. $this->title.
"</a>&nbsp;". "</a>&nbsp;".
"<a href='#' onclick=\"deleteNote('{$this->id}', this)\">". "<a href='#' onclick=\"note.deleteNote('{$this->id}', this)\">".
"<i class='fas fa-trash-alt'></i>". "<i class='fas fa-trash-alt'></i>".
"</a>". "</a>".
( (
$this->recording ? "<br/>". $this->recording ?
"<a href='{$this->recording}' target='_blank' class='recording-link'>". "<a href='{$this->recording}' target='_blank' class='recording-link'>".
"<i class='fa fa-play-circle'></i>". "<i class='fa fa-play-circle'></i>".
"</a>" : null "</a>" : null
@@ -195,6 +195,7 @@ class Note implements JsonSerializable
{ {
return [ return [
'id' => $this->getId(), 'id' => $this->getId(),
'recording' => $this->getRecording(),
'link' => $this->toLink(), 'link' => $this->toLink(),
'title' => $this->getTitle(), 'title' => $this->getTitle(),
'date' => $this->getDate(), 'date' => $this->getDate(),
+3 -3
View File
@@ -26,12 +26,12 @@ class DatabaseTransferService
) { ) {
// connect the source database // connect the source database
switch (explode(":", $_ENV['DATABASE_URL'])[0]) { switch (explode(":", $_ENV['DATABASE_URL'])[0]) {
case 'pdo-sqlite'; case 'pdo-sqlite':
list($driverName, $dbFile) = explode(":/", $_ENV['DATABASE_URL']); list($driverName, $dbFile) = explode(":/", $_ENV['DATABASE_URL']);
$this->srcDB = new PDO('sqlite:'.$dbFile); $this->srcDB = new PDO('sqlite:'.$dbFile);
break; break;
case 'pdo-mysql'; case 'pdo-mysql':
case 'pdo-pgsql'; case 'pdo-pgsql':
$dsn = $this->convertDBURLString($_ENV['DATABASE_URL']); $dsn = $this->convertDBURLString($_ENV['DATABASE_URL']);
$this->srcDB = new PDO($dsn['dsn'], $dsn['username'], $dsn['password']); $this->srcDB = new PDO($dsn['dsn'], $dsn['username'], $dsn['password']);
} }
+11 -10
View File
@@ -1,14 +1,16 @@
<!-- Sidebar --> <div id='sidebar-header'>
<div id="sidebar">
<div class="inner">
<!-- Search --> <!-- Search -->
{% if app.user %} {% if app.user %}
<section id="search" class="alt"> <section id="search" class="alt">
<input type="text" name="query" id="query" placeholder="Search by title, passage, or note" /> <input type="text" name="query" id="query" placeholder="Search by title, passage, or note" />
</section> </section>
{% endif %} {% endif %}
<a class='toggle' href='' id='sidebar-link'>Toggle</a>
</div>
<!-- Sidebar -->
<div id="sidebar">
<div class="inner">
<!-- Menu --> <!-- Menu -->
<nav id="menu"> <nav id="menu">
<header class="major"> <header class="major">
@@ -20,16 +22,16 @@
<ul> <ul>
{% if app.user %} {% if app.user %}
<li><a href='/home'>Home</a></li> <li><a href='/home'>Home</a></li>
<li><a href="#" onclick='newNote()'>New Note</a></li> <li><a onclick='note.newNote()'>New Note</a></li>
<li><a href='#' onclick='openNote()'>Open Note</a></li> <li><a onclick='note.openNote()'>Open Note</a></li>
<li><a href="#" onclick="saveNote()">Save Note</a></li> <li><a onclick="note.saveNote()">Save Note</a></li>
{% if isAdmin is defined and isAdmin %} {% if isAdmin is defined and isAdmin %}
<li><a href='/reference-editor'>Reference Editor</a></li> <li><a href='/reference-editor'>Reference Editor</a></li>
{% if xferDB is defined and xferDB %} {% if xferDB is defined and xferDB %}
<li><a href='/xfer-database'>Transfer Database</a></li> <li><a href='/xfer-database'>Transfer Database</a></li>
{% endif %} {% endif %}
{% endif %} {% endif %}
<li><a href='#' onclick="openRef()">Open Reference</a></li> <li><a onclick="openRef()">Open Reference</a></li>
<li><a href='/template-editor'>Template Editor</a></li> <li><a href='/template-editor'>Template Editor</a></li>
<li><a href='/cheat-sheet' target='_blank'>Markdown Cheat Sheet</a></li> <li><a href='/cheat-sheet' target='_blank'>Markdown Cheat Sheet</a></li>
{% else %} {% else %}
@@ -50,7 +52,7 @@
{% for n in last4Notes %} {% for n in last4Notes %}
<article> <article>
<p>{{ n.date|date("m/d/Y") }}</p> <p>{{ n.date|date("m/d/Y") }}</p>
<a href="#" onclick="retrieveNote('{{ n.id }}');openNote();">{{ n.title }}</a> <a onclick="note.retrieveNote('{{ n.id }}');note.openNote();">{{ n.title }}</a>
<p>{{ n.passage }}</p> <p>{{ n.passage }}</p>
</article> </article>
{% endfor %} {% endfor %}
@@ -70,5 +72,4 @@
</ul> </ul>
</section> </section>
</div> </div>
<a class='toggle' href='#sidebar' id='sidebar-link'>Toggle</a>
</div> </div>