58 lines
1.2 KiB
Makefile
58 lines
1.2 KiB
Makefile
DATE ?= $(shell date +%F)
|
|
ENTRIES_DIR ?= entries/$(DATE)
|
|
OUT ?= dist/$(DATE).html
|
|
LIMIT ?= 10
|
|
|
|
PROVIDER ?=
|
|
API_BASE ?=
|
|
MODEL ?=
|
|
TEMP ?=
|
|
|
|
LLM_FLAGS :=
|
|
ifneq ($(strip $(PROVIDER)),)
|
|
LLM_FLAGS += --llm-provider $(PROVIDER)
|
|
endif
|
|
ifneq ($(strip $(API_BASE)),)
|
|
LLM_FLAGS += --llm-api-base $(API_BASE)
|
|
endif
|
|
ifneq ($(strip $(MODEL)),)
|
|
LLM_FLAGS += --llm-model $(MODEL)
|
|
endif
|
|
ifneq ($(strip $(TEMP)),)
|
|
LLM_FLAGS += --temperature $(TEMP)
|
|
endif
|
|
|
|
.PHONY: init ingest stubs build draft build-db draft-db sync-db clean
|
|
|
|
init:
|
|
python scripts/db_cli.py init
|
|
|
|
ingest:
|
|
python scripts/ingest_list.py --list inbox.txt
|
|
|
|
stubs:
|
|
python scripts/ingest_list.py --list inbox.txt --fetch --stubs --date $(DATE) --sleep 0.5
|
|
|
|
build:
|
|
python build.py $(ENTRIES_DIR) --out $(OUT) $(LLM_FLAGS)
|
|
|
|
draft:
|
|
python build.py $(ENTRIES_DIR) --out $(OUT) --publish $(LLM_FLAGS)
|
|
|
|
build-db:
|
|
python scripts/build_from_db.py --limit $(LIMIT) --out $(OUT) $(LLM_FLAGS)
|
|
|
|
draft-db:
|
|
python scripts/build_from_db.py --limit $(LIMIT) --out $(OUT) --publish $(LLM_FLAGS)
|
|
|
|
sync-db:
|
|
python scripts/sync_entries_to_db.py --dir $(ENTRIES_DIR)
|
|
|
|
clean:
|
|
rm -rf dist/*
|
|
|
|
|
|
# Dry run: generate summaries and print HTML to stdout (no file write, no publish)
|
|
dry-run:
|
|
python build.py $(ENTRIES_DIR) --dry-run $(LLM_FLAGS)
|