1
0
forked from HPR/hpr-tools

Updates from previous repo

FAQ/FAQ.mkd, FAQ/Makefile: this version of the FAQ is now out of date
    and probably should be deleted.

InternetArchive/repair_item: script to upload missing shows after tie
    out errors during the normal upload; still under development.

InternetArchive/update_state: script to update show state in the
    'reservations' table in the database. Uses the CMS interface.

Link_Checker/scan_links: under development. Not currently usable.

Miscellaneous/fix_tags: audio metadata manipulation script. Recently
    added to this repo for convenience. Updates for 'experimental::try',
    the official Perl try/catch.

PostgreSQL_Database/add_hosts_to_show, PostgreSQL_Database/hpr_schema_2.pgsql,
    PostgreSQL_Database/nuke_n_pave.sh: an old experimental Pg database
    to take over from the previous MySQL version (from before 2023).
    Kept for reference; never implemented.
This commit is contained in:
Dave Morriss
2024-06-14 16:00:04 +01:00
parent 38abbcdd39
commit 50edeccc88
12 changed files with 1874 additions and 146 deletions

View File

@@ -1,31 +1,52 @@
# ==============================================================================
# FAQ Makefile 2021-01-30 11:00:47
# FAQ Makefile 2021-04-01 09:52:16
# ==============================================================================
#
# Simple Makefile to rebuild the components in this file
#
all : markdown
MDFILE = FAQ.mkd
HTMLFILE = FAQ.html
DEVFILE = FAQ_dev.html
TPLFILE = FAQ.tpl
PHPFILE = FAQ.php
all : markdown php
#
# Find all *.mkd files in the current directory and turn them into a list of
# *.html files as a rule target
# Rules for converting the Markdown into two files, one for stitching into
# the PHP framework via FAQ.tpl and the other just a stand-alone HTML file for
# development.
#
markdown: $(addsuffix .html,$(basename $(wildcard *.mkd)))
markdown: $(HTMLFILE) $(DEVFILE)
$(HTMLFILE): $(MDFILE)
tpage $< | pandoc -f markdown-smart -t html5 \
--number-sections --table-of-contents --toc-depth=4 -o $@
$(DEVFILE): $(MDFILE)
tpage $< | pandoc -f markdown-smart -t html5 --standalone \
--template=hpr.html5 -c http://hackerpublicradio.org/css/hpr.css \
--number-sections --table-of-contents --toc-depth=4 -o $@
#
# Rule to get from a Markdown (*.mkd) file to an HTML equivalent allowing for
# Template Toolkit stuff within the file
# When we generate the file FAQ.html (HTML fragment) we use tpage to make
# a complete standalone PHP page called FAQ.php
#
%.html: %.mkd; tpage $< | pandoc -f markdown-smart -t html5 --standalone \
--template=hpr.html5 -c http://hackerpublicradio.org/css/hpr.css \
--number-sections --table-of-contents --toc-depth=4 -o $@
.PHONY: php upload
php: $(PHPFILE)
$(PHPFILE): $(HTMLFILE)
tpage $(TPLFILE) > $(PHPFILE)
#
# Upload the FAQ HTML to the server for development
# Upload the FAQ HTML+PHP to the server for development
#
upload:
scp -P 22074 FAQ.html hpr@hackerpublicradio.org:www/
upload: $(PHPFILE)
scp -P 22074 $(PHPFILE) hpr@hackerpublicradio.org:www/
# ==============================================================================
#
# Use 'make sync' to copy updates to the visible project area
#
@@ -35,7 +56,7 @@ upload:
sync: put
fromdir = $(HOME)/HPR/FAQ/
todir = $(HOME)/HPR/Projects/hpr-admin/FAQ/
todir = $(HOME)/HPR/Projects/hpr-tools/FAQ/
filter = $(fromdir).rsync_export
syncmsg = Updating git directory with updates from development version
@@ -44,5 +65,5 @@ put:
@echo "** $(syncmsg)"
rsync -vaP --filter=". $(filter)" $(fromdir) $(todir)
.PHONY: upload sync put
.PHONY: sync put