Files
cnx_vinyl/site/build.sh
T
grabowski 7af5d89dd0
Deploy test site / deploy (push) Successful in 44s
Steam and cooling plant for the five-press fleet; utilities re-based
New page docs/steam-cooling.html (site /demos/steam-cooling/): the
utility plant as a clickable process diagram. Steam side: raw water,
softener and dosing, feed tank with heat-pump feedwater recovery, feed
pumps, a bank of two 500 kg/h boilers (third for N+1 as an option),
separator and metering, optional accumulator, blowdown, the 10 bar
header with a valved, metered branch and trap per press, drip legs and
condensate return. Cooling side: Newbilt's press outlets are open (max.
2 bar), so returns drain to a warm tank, pass the heat pump, an optional
dry cooler and a plate heat exchanger to a cold buffer tank, and VFD
pumps feed the 20 to 25 C header at ~10 bar to every press, the
extruders and the central hydraulic oil cooler; the chiller loop
(three 250 kW air-cooled modules at 40 C ambient, fourth as option) stays
closed and clean. Galvanics cooling (12 to 20 C) is a separate circuit.
Operating cases (launch, Duplex system 1, five presses, one module down)
show demand against installed capacity; design basis with sources,
equipment schedule, RFQ questions. Static SVG, no per-frame work.

Design basis at Newbilt's per-machine figures: steam 750 to 900 kg/h,
cooling 652.5 kW (625 presses, 15 extruders, 12.5 hydraulics), 305 to
540 l/min circulating. Also found: Newbilt's 53 l/min at ~60 C out is
~140 kW, above its 125 kW peak; listed as a re-quote question.

Re-based in the same commit:
- scale.md: electrical table (chiller bank ~210 to 325 kW electrical,
  plant peak ~430 to 700 kW, ~950 to 1,330 kW with electric steam),
  grid 800 to 1,000 kVA (1,250 to 1,600 with electric steam, Schedule
  4 past 1,000 kW), tariff 4.5M to 6.8M THB/yr, battery ~1 h of chiller
  peak, boiler and chiller banks, biomass up to ~550 t/yr at 1.5 M
  records, utilities money line.
- sustainability.md, biomass.md: same figures; electric steam 5.2M to
  6.0M THB/yr mature, 1.6M to 1.8M early; fuel saving 4.0M to 5.4M.
- utilities CSV: boiler bank, chiller bank with HX and tanks, softener
  and loop treatment re-sized; baseline 23.98M-41.63M -> 30.07M-51.33M.
- total-investment.md: re-size as an added-scope row (+185k / +294k
  USD); headline 4.7M to 8.9M unchanged until the investment re-base.
- pressing-line, equipment-suppliers, facility-security, fleet
  calculator (boiler 1000 kg/h, chiller 750 kW), plant page detail
  texts; README, landing page, build.sh.
2026-10-14 09:58:27 +07:00

60 lines
2.0 KiB
Bash

#!/usr/bin/env bash
# Assemble the cnxvinyl.lol web root in site/dist.
#
# site/public/ copied verbatim: landing page, robots.txt, and any static
# site dropped in as its own directory (site/public/<name>/)
# DEMOS below pages copied out of docs/, so docs/ stays their one source
#
# Run locally with `bash site/build.sh`, then open site/dist/index.html.
# CI (.gitea/workflows/deploy-site.yml) runs the same script and deploys
# site/dist as it is.
set -euo pipefail
cd "$(dirname "$0")/.."
out=site/dist
rm -rf "$out"
mkdir -p "$out"
cp -R site/public/. "$out/"
# "<source in the repo> <path under the web root>"
DEMOS=(
"docs/plant-operation.html demos/plant-operation/index.html"
"docs/fleet-calculator.html demos/fleet-calculator/index.html"
"docs/steam-cooling.html demos/steam-cooling/index.html"
)
for entry in "${DEMOS[@]}"; do
read -r src dst <<<"$entry"
mkdir -p "$out/$(dirname "$dst")"
cp "$src" "$out/$dst"
done
# The deploy job reads this back from the server to confirm what is live.
git rev-parse HEAD >"$out/version.txt" 2>/dev/null || echo unknown >"$out/version.txt"
# Fail on a dead internal link: every href/src in every page that points
# inside the site must resolve to a file in dist.
dead=0
while IFS= read -r page; do
dir=$(dirname "$page")
while IFS= read -r ref; do
# shellcheck disable=SC2016 # literal ${ and {{ mark JS/template strings
case "$ref" in
'' | '#'* | http:* | https:* | mailto:* | tel:* | data:* | javascript:* | *'${'* | *'{{'*) continue ;;
esac
ref=${ref%%#*}
ref=${ref%%\?*}
case "$ref" in
/*) target="$out$ref" ;;
*) target="$dir/$ref" ;;
esac
[ -d "$target" ] && target="${target%/}/index.html"
if [ ! -f "$target" ]; then
echo "dead link in ${page#"$out"/}: $ref" >&2
dead=1
fi
done < <(grep -o -E '(href|src)="[^"]*"' "$page" | sed -E 's/^(href|src)="//; s/"$//')
done < <(find "$out" -name '*.html')
[ "$dead" -eq 0 ] || exit 1
echo "built $out: $(find "$out" -type f | wc -l | tr -d ' ') files"