From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "Dr. Arne Babenhauserheide" Newsgroups: gmane.lisp.guile.user Subject: Re: Static site generator Date: Sat, 14 Jan 2023 00:54:56 +0100 Message-ID: <87y1q6oueq.fsf@web.de> References: Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27531"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.8.11; emacs 28.1 Cc: guile-user@gnu.org To: Sascha Ziemann Original-X-From: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Sat Jan 14 01:03:27 2023 Return-path: Envelope-to: guile-user@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pGU18-0006pa-E3 for guile-user@m.gmane-mx.org; Sat, 14 Jan 2023 01:03:26 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pGU0P-00076l-F8; Fri, 13 Jan 2023 19:02:41 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pGU0D-0006xu-6T for guile-user@gnu.org; Fri, 13 Jan 2023 19:02:30 -0500 Original-Received: from mout.web.de ([212.227.15.14]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pGU0A-0007Am-VF for guile-user@gnu.org; Fri, 13 Jan 2023 19:02:28 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=s29768273; t=1673654543; bh=i7ZO7huxwe+RORxjYgrSUBlthXmRM42aoVLJn/5fmEw=; h=X-UI-Sender-Class:References:From:To:Cc:Subject:Date:In-reply-to; b=uv4vWWU6fZ4UJTX86V/vYe5DTv2s2L8pT27HI8BbCZ4HELr49QCsnKmcLrKB4hKaX 9i3BRNgmBZTJgN7s0r1VlTlVQvgIAMPSryxLWpIcL6rfcZTmkstntoJE2T5il0e6KH YcY0Y9jg091V4NSoOfB6yT/5d7lU0PYDrOCCro96oCZ7hn/yAXSGuN5KbneIcdWUR7 I3RVeG/gTkuNm1BOSUHF0k3KmXnO3kY3fIkUBK5XXiTDPm+IyNEpfxzOsnWI07/64z Tglw0OkxZxL7seNMYAY58cU2qPEkgpIJKYBZuaJJvq5N8EdB5rG0DI5TySKsk9Kkn/ f/UG1LmzJgtlQ== X-UI-Sender-Class: 814a7b36-bfc1-4dae-8640-3722d8ec6cd6 Original-Received: from fluss ([84.165.20.127]) by smtp.web.de (mrweb005 [213.165.67.108]) with ESMTPSA (Nemesis) id 1MdO56-1oh9FX2fvU-00ZMHJ; Sat, 14 Jan 2023 01:02:23 +0100 In-reply-to: X-Provags-ID: V03:K1:Om9D5dJ9oPrHpSnnOCJh2/QGuGsrd5kiorn5s2clSpCs5W/WPe/ AN7hnNNae5i2bnfuExl4sxjP2HjwJE3gfYGSG/nlH09K1b8ud9eBaFLGSttsPiKZJbL7HMp EYVrSpA2aSoMeE3am9/np1zT1IIRFxEMYIQvbMGoDTB1dZekQivWEzyTmYDCThDOlKMJS5k CaJ9XjH5toYlhEC7kEJAQ== UI-OutboundReport: notjunk:1;M01:P0:PqPicpy9Chw=;t0KNMXuT8YwRtL+pV8AGDA5dS7D q8Hsiaxhi9CO3nPnHs4hc1ILdUYzcj/k4E0P0IU2jEYYH7WDAZue0gu14bcJCjgOfQrLkv7Ev 3mlQ3g3h4tHqkoC0xpLZf2Fde6WHGRUjhtHP0PUp2t9ayo/Yu5jz5yHB1WXTW0oc5NTMK1cgi cMnbBg6ES5XGNExcingdKXqKcdmymO/zCfDZ+OqZU48H0qDt/zU3yOq19LzpE+HFxHn2h/whr Z82Ov8IAPCBscNxNo+lFKQBFgJH512bpaz1ypRjpGJzWi1KPdNDUDv9KCCmH+Yc91vRIXrH8c xrXZgFMCworGoKZ7fXN5aKfCJ3exuaazR4T4L6s10A5ElDjaQbujBtLZ7Nl1qfR7psMfN3V7c 26Hq+h9CUcxjeIN6JhRSavXXkgX+A+8tHu6QJc0n2UHTz44nTCeUPlFvjU4ppeoWIVcDzoqQ7 qlRnNEQPz2SSBQvlXqkD5jGjl/HxCena2JrvlHaGjSIXs7OtGV1RPVR8A5bhtK8UB3z1ZWVwh xtxDIoKnBACrhyxtCjFftif78Lsv+ris6YTdtdX2Xx0KL1D4Fya5jsQ99+rcZxhO+fjXevzIL 0teTFbKiOtwKujsuyvYW87bynEnOIhFuVPMcf+puCZVK15SDX4ci/egcLZypVdyS5drzLcl1Z khOOhLXeLl6Oxeo0rfKkhMkUQH2bWb4IrR11KQppCDvxxjor7wrXUh9EisRtyO8hyT0m4jHXY dNViVuWH4K1fGJqE5TpfEBThyfTuQC/eE9/7g62HFwiCHeMVKoQaRwik2F/M5riPcXEae+0c Received-SPF: pass client-ip=212.227.15.14; envelope-from=arne_bab@web.de; helo=mout.web.de X-Spam_score_int: -26 X-Spam_score: -2.7 X-Spam_bar: -- X-Spam_report: (-2.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_SBL_A=0.1 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Original-Sender: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.lisp.guile.user:18870 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Sascha Ziemann writes: > All you need is quasiquote, unquote and a function which formats SXML as = XML. > > (html > `("" I use something like this with Guile: https://hg.sr.ht/~arnebab/guile-freenet/browse/fetchpull-standalone.scm?rev= =3Dtip#L604 (define (website-content port) (define title "Fetch-Pull-Stats re-woven") (sxml->xml `(*TOP* (html (head (title ,title) (meta (@ (charset "utf-8")))) (body (h1 ,title) (p (img (@ (src "fetchpull.png") (alt "fetch-pull-statistics")= ))) (p "created with "=20 (a (@ (href "https://bitbucket.org/ArneBab/freenet-guile/s= rc/default/fetchpull.w") (title "link to project")) "fetchpull.w")) (p "plotted with " (a (@ (href "fetchpull-plot.gnuplot")) "fetchpull-plot.gnuplot"))))) port)) More complex version with more examples for solutions to needs: https://hg.sr.ht/~arnebab/guile-freenet/browse/fetchpull.w?rev=3Dtip#L794 (this one is with wisp: https://www.draketo.de/software/wisp ) define : website-content port _ define title "Fetch-Pull-Stats re-woven" _ sxml->xml _ ` *TOP* _ html _ head : meta : @ (charset "utf-8") _ title ,title _ body : h1 ,title _ p "These are the fetch-pull statistics. They provide an estima= te of lifetimes of real files in Freenet and a somewhat early warning when = network quality should degrade." _ p "Realtime are 80 bytes. Small are 128 kiB. Bulk is 1MiB." _ p "Further details are explained below the diagrams." _ ,@ map : =CE=BB (attributes) : ` p : img ,attributes ;; create= multiple images without unnecessary ceremony _ ' _ @ (src "fetchpull-lifetime-realtime-success-count.png") (a= lt "lifetime plot: successes per month, realtime") _ @ (src "fetchpull-lifetime-small-success-count.png") (alt = "lifetime plot: successes per month, small bulk") _ @ (src "fetchpull-lifetime-bulk-success-count.png") (alt "= lifetime plot: successes per month, large bulk") _ @ (src "fetchpull-get-realtime.png") (alt "fetch-pull real= time download graph") _ @ (src "fetchpull-get-small.png") (alt "fetch-pull small d= ownload graph") _ @ (src "fetchpull-get-bulk.png") (alt "fetch-pull bulk dow= nload graph") _ @ (src "fetchpull-get-failed-realtime.png") (alt "fetch-pu= ll failed realtime download graph") _ @ (src "fetchpull-get-failed-small.png") (alt "fetch-pull = failed small download graph") _ @ (src "fetchpull-get-failed-bulk.png") (alt "fetch-pull f= ailed bulk download graph") _ @ (src "fetchpull-put.png") (alt "fetch-pull upload graph") _ @ (src "fetchpull-put-failed.png") (alt "fetch-pull failed= upload graph") _ @ (src "fetchpull-lifetime-realtime.png") (alt "lifetime p= lot: time per download, realtime") _ @ (src "fetchpull-lifetime-small.png") (alt "lifetime plot= : time per download, small bulk") _ @ (src "fetchpull-lifetime-bulk.png") (alt "lifetime plot:= time per download, large bulk") _ h2 "explanation" _ p "Files uploaded regularly with the download attempted after = some delay.=20 Realtime is uploaded with realtime priority, small and bulk with bulk prior= ity.=20 Details are available in fetchpull.w (see sources)" _ p "Realtime is a raw KSK without any redirect. Size 80 bytes, = Uploaded and downloaded in realtime mode without compression, using all tri= cks to reduce latency. This is the fake chat-message: What you would use fo= r interactive status updates and such." _ p "Small is a KSK splitfile (a KSK that has the links to about= 7 CHKs, needs 3-4). Size 128kiB uncompressed, around 80kiB compressed, Upl= oaded and downloaded in bulk mode." _ p "Bulk is a KSK which forwards to a CHK splitfile that has ar= ound 40 blocks, needs about 20 to download. Size 1MiB uncompressed, around = 650kiB compressed, uploaded and downloaded in bulk mode." _ p "This page is generated by running " : code "./fetchpull.w -= -site fetchpullstats" _ ;; the following is just for fun. Not ready for production= . You have been warned :-) _ . " " ,(> and then ,(string-append "uploaded" " " "with") = freesitemgr (from pyFreenet ,{1 + 2}) as freesite.) _ br _ . "Feel free to create your own version." _ h2 "Sources" _ ul _ li "created with "=20 _ a : @ (href "fetchpull.w") (title "link to exact file wh= ich generated this site") _ . "fetchpull.w" _ li "from project " _ a : @ (href "https://bitbucket.org/ArneBab/freenet-guile= ") (title "link to project") _ . "guile-fcp" _ li "plotted with " _ a : @ (href "fetchpull-plot.gnuplot") (title "plotting s= cript for gnuplot") _ . "fetchpull-plot.gnuplot" _ li "using data from " _ a : @ (href "fetchpull-stats-get.csv") (title "download = stats") _ . "fetchpull-stats-get.csv" _ . " and " _ a : @ (href "fetchpull-stats-put.csv") (title "upload st= ats") _ . "fetchpull-stats-put.csv" _ p _ a : @ (href "/?newbookmark=3DUSK@lwR9sLnZD3QHveZa1FB0dAHge= ck~dFNBg368mY09wSU,0Vq~4FXSUj1-op3QdzqjZsIvrNMYWlnSdUwCl-Z1fYA,AQACAAE/fetc= hpullstats/8/&desc=3Dfetchpullstats&hasAnActivelink=3Dtrue") _ . "bookmark this freesite" _ . port Best wishes, Arne =2D-=20 Unpolitisch sein hei=C3=9Ft politisch sein, ohne es zu merken. draketo.de --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQJEBAEBCAAuFiEE801qEjXQSQPNItXAE++NRSQDw+sFAmPB8Q4QHGFybmVfYmFi QHdlYi5kZQAKCRAT741FJAPD699IEADYMzBg5Gg9XDhORzxMm8vEH90uDHcKR/Gj Gr/rjyaPH2VRFK1RMWW5FxzIunv2/RHJHVghtKA5vhxKens8MX5bhdGxNcdkbGXG 8TOWJH9FIemWnlj3GuiDtgg2TT7p8ZjZbjtDEY4KQBkuSdZP8One0CRxlUM7BzXv ufElqf1yr0o/bQN9PWcc0hI9YbURb2sTJyqk0DzdXmeZl3VhhuJ75Mc+BWgx5U2Q Pd9Rzpc+NW7VJ9tsRamAw9NEfLQer8Tx5prJV4oPn4bJczgs0acXB+7ABOk9iLwL wBrVYqkU9X2nLXjBklOw+EpxzOCKfN4dmFaGD8zygtb4P1Niu2KYFHky4FRDVg5L pu+exT5H1aQT+xPTNQMzM+aFn8/8eTIYo+zxmm+WKANX61nwHqa9Qi4sMQn7tDyf WmRsB9pzTNighipPfedxWOpsGCbZ90BtK2oKEhFbAgS3YDpT7Vj2SpCf6M/5JhKs ZKA93+40VbDq2hI+/sixTBTAcJxvzaQvSYf1eyNxi5CVnK2G3fbi9WbJxf6A8xwx qXBPVoJZkxRPD7KS4/7R04LVBw1ojzEGdvanHG5Gxxz90rEIJRItAEv3YAkelE83 UEj+peXDpzsjOPA63hXo653TAdWYX9qxzvtoffOFySmar0mV2vMui5rjbn+0GsTG 0y1lvwWFSojEBAEBCAAuFiEE3Si95tmHXKvOSosd3M8NswvBBUgFAmPB8Q4QHGFy bmVfYmFiQHdlYi5kZQAKCRDczw2zC8EFSFHRA/9++BPsCQPgztzziS7woIURlWai dJBIVDxln5hguDiw1JtXFCpqJoGzVih8nq7WF7LH/dqFoz0VVxC21m3BxKGFd2uH cc9DvYj1Gj8qSDcDn3ZbNv3ZUcVHPgW7PcS3lr0H3Y53pn5BUZy0sb5c3gwJO3+P MLmADxatfvyrm5nV6Q== =b06q -----END PGP SIGNATURE----- --=-=-=--