Compare commits

...

3 commits

Author SHA1 Message Date
Danny O'Brien
39035e3d2c Nicer makefile 2025-07-08 21:39:40 -07:00
Danny O'Brien
4b6b4a9cd3 Move venv to a more normal .venv 2025-07-08 21:02:38 -07:00
Danny O'Brien
921c8e1422 add capitalism to footnotes 2025-07-08 21:01:16 -07:00
4 changed files with 30 additions and 13 deletions

View file

@ -1,6 +1,16 @@
RED := \033[0;31m
GREEN := \033[0;32m
YELLOW := \033[0;33m
BLUE := \033[0;34m
MAGENTA := \033[0;35m
CYAN := \033[0;36m
WHITE := \033[0;37m
BOLD := \033[1m
RESET := \033[0m
.PHONY: default .PHONY: default
default: default:
@echo "Please specify a target to run, e.g., 'make live' for live deployment." @echo "$(RED)Please specify a target to run, e.g., 'make live' for live deployment.$(RESET)"
# Define a common rule to check if ALMANACK_ROOT is set # Define a common rule to check if ALMANACK_ROOT is set
.PHONY: check-activated .PHONY: check-activated
@ -11,14 +21,15 @@ endif
# Define the 'live' target which will be triggered on 'make live' # Define the 'live' target which will be triggered on 'make live'
RSYNC_OPTS := -avz --delete --delete-after --filter='dir-merge,-n /.gitignore' -e "a-ssh" RSYNC_OPTS := -avz --delete --delete-after --filter='dir-merge,-n /.gitignore' -e "a-ssh"
DEST1 := boat:/var/local/www/www.almnck.com/ DESTINATIONS := boat:/var/local/www/www.almnck.com/ dallas:/var/local/www/www.almnck.com/ sj:/var/local/www/www.almnck.com/
DEST2 := amsterdam:/var/local/www/www.almnck.com/
DEST3 := phoenix:/home/danny/www/www.almnck.com/
.PHONY: live .PHONY: live
live: check-activated live: check-activated
@rsync $(RSYNC_OPTS) $(ALMANACK_ROOT)/web/ $(DEST1) @test -d "$(ALMANACK_ROOT)/web" || (echo "ERROR: web directory not found" && exit 1)
@rsync $(RSYNC_OPTS) $(ALMANACK_ROOT)/web/ $(DEST2) @echo "Dry run preview:"
@rsync $(RSYNC_OPTS) $(ALMANACK_ROOT)/web/ $(DEST3) @$(foreach dest,$(DESTINATIONS),echo "$(BLUE)To $(dest)$(RESET)"; rsync $(RSYNC_OPTS) --dry-run $(ALMANACK_ROOT)/web/ $(dest);)
@read -p "Continue with deployment? (y/N): " confirm && [ "$$confirm" = "y" ]
@$(foreach dest,$(DESTINATIONS),echo "$(BLUE)To $(dest)$(RESET)"; rsync $(RSYNC_OPTS) $(ALMANACK_ROOT)/web/ $(dest);)
.PHONY: test-doc .PHONY: test-doc
test-doc: check-activated test-doc: check-activated

View file

@ -6,7 +6,7 @@ web -- the contents of our (static, public) website.
secrets -- passwords, PII, etc. Assume everything else could be made public. If it would be existentially bad for it to leak, encrypt it, and put it here. secrets -- passwords, PII, etc. Assume everything else could be made public. If it would be existentially bad for it to leak, encrypt it, and put it here.
doc -- documentation of processes, ideas, memos, etc. doc -- documentation of processes, ideas, memos, etc.
llc -- corporate documents, financial ledger, business running. llc -- corporate documents, financial ledger, business running.
venv -- python environment for this whole kiboodle. .venv -- python environment for this whole kiboodle.
To set up an environment that works with these scripts, start a shell To set up an environment that works with these scripts, start a shell
(preferably zsh, though bash should work) in this directory, and type: (preferably zsh, though bash should work) in this directory, and type:

View file

@ -20,13 +20,13 @@ fi
declare -x ALMANACK_ROOT=$(dirname $script_dir) declare -x ALMANACK_ROOT=$(dirname $script_dir)
# Check for the existence of the venv directory # Check for the existence of the venv directory
if [ ! -d "$ALMANACK_ROOT/venv" ]; then if [ ! -d "$ALMANACK_ROOT/.venv" ]; then
echo "The virtual environment directory does not exist. Please run:" echo "The virtual environment directory does not exist. Please run:"
echo "python -m venv $ALMANACK_ROOT/venv --prompt almnck" echo "python -m venv $ALMANACK_ROOT/.venv --prompt almnck"
return 1 2>/dev/null || exit 1 return 1 2>/dev/null || exit 1
fi fi
. $ALMANACK_ROOT/venv/bin/activate . $ALMANACK_ROOT/.venv/bin/activate
PATH=$ALMANACK_ROOT/bin:$PATH PATH=$ALMANACK_ROOT/bin:$PATH
# Default to going to the root of almanack # Default to going to the root of almanack

View file

@ -2,6 +2,7 @@
* Footnotes * Footnotes
** Capitalism ** Capitalism
Capitalism, Effectiveness of: "Capitalism: Good, Bad, Indifferent, or Just More Lombardy Flimflam?", Giovanni Battista Fuggero, Almnck. 1389.
** Communism ** Communism
** Authoritarianism ** Authoritarianism
** Centralization ** Centralization
@ -22,6 +23,11 @@
** Cryptography ** Cryptography
** Privacy ** Privacy
** Surveillance ** Surveillance
** Atheism and Woo
Astrology, Usefulness of, : "Astrology -- Proof At Last", John Dee, Almnck. 1575;
"A Small Correction Regarding The Heavens", Francis Bacon, Almnck. 1605; "No, As You
Were", George Warton, Almnck. 1675.
** The Culture War ** The Culture War
** Americans ** Americans
** Europeans ** Europeans
@ -41,5 +47,5 @@
** St Stallman of Ignutious ** St Stallman of Ignutious
** St Eliezer of Yud ** St Eliezer of Yud
** St Anil of Trott ** St Anil of Trott
** St Thomas of Ptacek
*** ** St Maciej of Maciej