Closed digama0 closed 1 year ago
Here are my notes from reading the scripts in this repository. They describe everything that the scripts do, focusing on the clean build case and working up to the complete site layout.
build-website.sh:
~
:= /root
git:metamath-website-scripts
to /root/
$webname = us.metamath.org
/var/www/us.metamath.org/html
is where HTML files will be~/us.metamath.org
to /etc/nginx/sites-available/us.metamath.org
(the nginx config)
/etc/nginx/sites-enabled/us.metamath.org
sshd_config_metamath.conf
to /etc/ssh/sshd_config.d/
local-sysctl.conf
to /etc/sysctl.d/
~/show_status
as a script which pushes status info to
/var/www/us.metamath.org/html/status.txt
generator
is added at /home/generator
/root/regenerate-website.sh
to /home/generator/
/var/www/us.metamath.org/html
/home/generator/regenerate-website.sh
dailyregenerate-website.sh:
~
:= /home/generator
$site = ~/metamathsite
repos
repos/set.mm
repos/set.mm/scripts/download-metamath
git:metamath-website-seed:mpegif/mmbiblio.html
to ~/metamath/mmbiblio.html
git:set.mm:mmbiblio.raw.html
insteadsymbols.tar.bz2
and symbols.tgz
git:symbols:*
to ~/*
git:metamath-website-seed:*
to $site/*
git:symbols:symbols
to $site/symbols
git:set.mm:*.mm
to $site/metamath
git:metamath-exe:*
to $site/metamath
git:metamath-book:narrow.sty
to $site/latex
git:metamath-book:normal.sty
to $site/latex
$site/metamath
$site/mpegif
~/repos/set.mm/scripts/build-metamath
git:metamath-exe:*
to ~/metamath/*
autoreconf; ./configure; make
in ~/metamath
~/bin/metamath
~/metamath/mmbiblio.html
to ~/mmbiblio.html
~/repos/set.mm/*.mm
to $site/metamath
install.sh
from $site
(into $site/install.log
)mmbiblio.html
, mmcomplex.raw.html
and 10 other files
from ~/repos/set.mm
to $site/mpegif
markup
mmbiblio.raw.html
not mmbiblio.html
mmrecent.raw.html
not mmrecent.html
(after set.mm#3524)mmil.raw.html
, mmrecent_IL.html
from ~/repos/set.mm
to $site/ilegif
mm_100.html
from ~/repos/set.mm
to $site
$site
to /var/www/us.metamath.org/html
install.sh:
$site
(see above)$tmp
:= $site/tmpmetamathsite
$site
to $tmp
except .hidden
files(mpe|qle|nfe|hol|ile)(gif|uni)
from $site
to $tmp
$dir
in mpegif qlegif nfegif holgif
:
$site/$dir
to $tmp/$dir
$site/$dir/mm*.html
to $tmp/$dir/mm*.html
$tmp
to $site2 := $site/metamathsite
metamath
from $site/metamath
$db
in mpe qle nfe hol ile
$site2/${db}gif
to $site/${db}gif
$site/favicon.ico
to $site/${db}gif
$site/_nmemail.gif
to $site/${db}gif
$site/mm.gif
to $site/${db}gif
(if $db = mpe
)$site/symbols/$i.gif
to $site/${db}gif
for a large $db
-dependent list of $i
(0.gif
,...)$site/mpegif/$i.gif
to $site/${db}gif
(if $db != mpe
) for a $db
-dependent list of $i
(_scrch.gif
,...)$site/mpegif/xits-math.woff
to $site/${db}gif
(if $db != mpe
)DB
in match db { nfe => [NF], hol => [HOL], ile => [IL], _ => [] }
:$site/${db}gif/mmbiblio_${DB}.html
to $site/${db}gif/mmbiblio.html
mmbiblio.raw.html
$site/${db}gif
to $site/${db}uni
0.gif
,... to ${db}uni
($k,$alt)
in (gif,html)
, (uni,alt_html)
:metamath
in $site/$db$k
:
show statement * /$alt /time
(produces $site/$db$k/$label.html
)write theorem_list /$alt /theorems_per_page 100 /show_lemmas
(produces $site/$db$k/mmtheorems$n.html
)i
in match db { mpe => [mmset mmcomplex mmdeduction mmnatded mmzfcnd mmfrege], nfe => [mmnf], _ => [] }
:markup $i.raw.html $i.html /$alt /symbols /css /labels
(produces $site/$db$k/$i.html
)$db in [mpe nfe hol ile]
write bibliography mmbiblio.html
(edits existing $site/$db$k/mmbiblio.html
)$db in [mpe ile]
write recent_additions mmrecent.html /$alt /limit 100
(produces $site/$db$k/mmrecent.html
)write recent_additions mmrecent.html /$alt /limit 1000
(produces $site/$db$k/mmrecent1000.html
)$dir
in mmsolitaire symbols
:
$site/favicon.ico
to $site/$dir
$site/_nmemail.gif
to $site/$dir
$site/mm.gif
to $site/$dir
$dir = mmsolitaire
$site/symbols/$i.gif
to $site/$dir
for a large list of $i
(bigcap.gif
,...)$site/mpegif/$i.gif
to $site/$dir
for a large list of $i
(_ca.gif
,...)$file
in finiteaxiom megillaward2003 megillaward2004
:
pdflatex $file
in $site/latex
(to produce $site/latex/${file}.pdf
)$site/latex/${file}.pdf
to $site/downloads
$site/rdme-home.txt
to $site/README.TXT
, crlf to $site/__README.TXT
$site/LICENSE.TXT
to $site/metamath/LICENSE.TXT
$site/LICENSE.TXT
to $site/mmsolitaire/LICENSE.TXT
$site/rdme-downloads.txt
to $site/downloads/README.TXT
, crlf to $site/downloads/__README.TXT
$site/rdme-metamath.txt
to $site/metamath/README.TXT
, crlf to $site/metamath/__README.TXT
$site/metamath
to $site/downloads/metamath.tar.bz2
$site/metamath
to $site/downloads/metamath.tar.gz
$site/metamath
to $site/downloads/metamath.zip
$site/metamath/set.mm
to $site/metamath/set.mm.bz2
($db,$i)
in (mpe,mmset) (mpe,mmhil) (mpe,mmmusic) (qle,mmql) (nfe,mmnf)
:
$site/${db}uni/$i.html
to make $site/${db}gif/$i.html
$site/mmsolitaire/mms.html
$dir
in mpeuni qleuni nfeuni holuni ileuni mmsolitaire symbols
:
$site/rdme-$dir.txt
to $site/$dir/README.TXT
, crlf to $site/$dir/__README.TXT
$dir = symbols
, move symbols from mpegif
into symbols
for the zip$site/$dir
to $site/downloads/$dir.tar.bz2
$site/$dir
to $site/downloads/$dir.zip
$site/symbols/symbols.html
to $site2/symbols
$site/rdme-metamathsite.txt
to $site2/README.TXT
, crlf to $site2/__README.TXT
$site2
to $site/downloads/metamathsite.tar.bz2
$site2
to $site/downloads/metamathsite.zip
$site2
Final VM layout:
/root
show_status
<- autogenerated*
<- git:metamath-website-scripts
/etc
nginx
sites-available/us.metamath.org
<- git:metamath-website-scripts
sites-enabled/us.metamath.org
<- git:metamath-website-scripts
ssh/sshd_config.d/sshd_config_metamath.conf
<- git:metamath-website-scripts
sysctl.d/local-sysctl.conf
<- git:metamath-website-scripts
/home/generator
regenerate-website.sh
<- git:metamath-website-scripts
repos/set.mm
*
<- git:set.mm
metamathsite
latex
narrow.sty
<- git:metamath-book
normal.sty
<- git:metamath-book
metamath
*.mm
<- git:set.mm
LICENSE.TXT
<- git:metamath-website-seed:LICENSE.TXT
README.TXT
<- git:metamath-website-seed:rdme-metamath.txt
__README.TXT
<- crlf git:metamath-website-seed:rdme-metamath.txt
set.mm.bz2
<- zipped git:set.mm:set.mm
(not in metamath.zip
)install.log
<- result of install.sh
$db=(mpe|qle|nfe|hol|ile)$k=(gif|uni)
favicon.ico
<- git:metamath-website-seed
_nmemail.gif
<- git:metamath-website-seed
mm.gif
<- git:metamath-website-seed
(if $db = mpe
)0.gif
,... <- git:symbols:symbols
+ git:metamath-website-seed:mpegif
(if $k = gif
)xits-math.woff
<- git:metamath-website-seed:mpegif
mmcomplex.raw.html
<- git:set.mm
(if $db = mpe
)mmdeduction.raw.html
<- git:set.mm
(if $db = mpe
)mmfrege.raw.html
<- git:set.mm
(if $db = mpe
)mmhil.html
<- git:set.mm
(if $db = mpe
)$k = gif
, hacked version of mpeuni/mmhil.html
mmmusic.html
<- git:set.mm
(if $db = mpe
)$k = gif
, hacked version of mpeuni/mmmusic.html
mmnatded.raw.html
<- git:set.mm
(if $db = mpe
)mmrecent.html
<- git:set.mm
(if $db = mpe
)mmset.raw.html
<- git:set.mm
(if $db = mpe
)mmtopstr.html
<- git:set.mm
(if $db = mpe
)mmzfcnd.raw.html
<- git:set.mm
(if $db = mpe
)mm-j-commands.html
<- git:set.mm
(if $db = mpe
)mmil.raw.html
<- git:set.mm
(if $db = ile
)mmcomplex.html
<- markup git:set.mm:mmcomplex.raw.html
(if $db = mpe
)mmdeduction.html
<- markup git:set.mm:mmdeduction.raw.html
(if $db = mpe
)mmfrege.html
<- markup git:set.mm:mmfrege.raw.html
(if $db = mpe
)mmnatded.html
<- markup git:set.mm:mmnatded.raw.html
(if $db = mpe
)mmset.html
<- markup git:set.mm:mmset.raw.html
(if $db = mpe
)$k = gif
, hacked version of mpeuni/mmset.html
mmzfcnd.html
<- markup git:set.mm:mmzfcnd.raw.html
(if $db = mpe
)mmbiblio.html
<- edited from git:set.mm:mmbiblio.raw.html
(if $db = mpe
)mmbiblio.html
<- edited from git:metamath-website-seed:nfegif/mmbiblio_${DB}.html
(if $DB
exists)mmnf.html
<- markup git:metamath-website-seed:nfegif/mmnf.raw.html
(if $db = nfe
)mmrecent.html
<- metamath 100 + git:set.mm:mmrecent_${DB}.raw.html
(if $db in [mpe ile]
)mmrecent1000.html
<- metamath 1000 + git:set.mm:mmrecent_${DB}.raw.html
(if $db in [mpe ile]
)$label.html
<- metamathmmtheorems$n.html
<- metamathREADME.TXT
<- git:metamath-website-seed:rdme-$db$k.txt
(if $k = uni
)__README.TXT
<- crlf git:metamath-website-seed:rdme-$db$k.txt
(if $k = uni
)*
<- git:metamath-website-seed:${db}gif
mmsolitaire
favicon.ico
<- git:metamath-website-seed
_nmemail.gif
<- git:metamath-website-seed
mm.gif
<- git:metamath-website-seed
bigcap.gif
,... <- git:symbols:symbols
+ git:metamath-website-seed:mpegif
LICENSE.TXT
<- git:metamath-website-seed:LICENSE.TXT
README.TXT
<- git:metamath-website-seed:rdme-mmsolitaire.txt
__README.TXT
<- crlf git:metamath-website-seed:rdme-mmsolitaire.txt
*
<- git:metamath-website-seed:mmsolitaire
symbols
favicon.ico
<- git:metamath-website-seed
_nmemail.gif
<- git:metamath-website-seed
mm.gif
<- git:metamath-website-seed
*
<- git:metamath-website-seed:symbols
mm_100.html
<- git:set.mm
symbols
*
<- git:symbols:symbols
downloads
finiteaxiom.pdf
<- built from git:metamath-website-seed:latex
megillaward2003.pdf
<- built from git:metamath-website-seed:latex
megillaward2004.pdf
<- built from git:metamath-website-seed:latex
README.TXT
<- git:metamath-website-seed:rdme-downloads.txt
__README.TXT
<- crlf git:metamath-website-seed:rdme-downloads.txt
metamath.tar.bz2
<- zipped $site/metamath
metamath.tar.gz
<- zipped $site/metamath
metamath.zip
<- zipped $site/metamath
$db$k.zip
<- zipped $site/$db$k
(for $k = uni
, $db in [mpe qle nfe hol ile]
)quantum-logic.zip
<- rezipped git:metamath-website-seed:downloads/quantum-logic.tar.bz2
quantum-logic.tar.gz
<- rezipped git:metamath-website-seed:downloads/quantum-logic.tar.bz2
metamath.tar.bz2
<- zipped $site/metamathsite
metamath.zip
<- zipped $site/metamathsite
*
<- git:metamath-website-seed:downloads
README.TXT
<- git:metamath-website-seed:rdme-home.txt
__README.TXT
<- crlf git:metamath-website-seed:rdme-home.txt
*
<- git:metamath-website-seed
metamath
mmbiblio.html
<- git:metamath-website-seed:mpegif
*
<- git:metamath-exe
bin
metamath
<- built metamath.exemmbiblio.html
<- git:metamath-website-seed:mpegif
*
<- git:symbols
/var/www/us.metamath.org/html
*
<- /home/generator/metamathsite
We need to make sense of the install script, and replicate it without all the baggage, so that we can move forward with site changes and maintenance.