commit a93adca996fd36363cda3df2a94bc0e3bcab3251 Author: squid Date: Thu Nov 12 17:18:33 2026 +0100 feat: add kmalloc.org website generator, manifesto and logo sources Static site generator (plain HTML, no JavaScript) with the English and Italian manifesto 1.0, the Terminess subset font, the W3C badges and the shrike logo set. diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a81134f --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +preview/ +__pycache__/ +*.pyc diff --git a/MANIFESTO.en.md b/MANIFESTO.en.md new file mode 100644 index 0000000..7013045 --- /dev/null +++ b/MANIFESTO.en.md @@ -0,0 +1,140 @@ +# kmalloc.org — Manifesto + +> **Free Your Mind… and Your Ass Will Follow.** +> — Funkadelic, *Free Your Mind… and Your Ass Will Follow* (1970) + +**Allocate freedom.** + +## Preamble — We don't ask permission to think + +kmalloc.org starts from a simple conviction: freedom cannot be a subscription service, a favor granted by those in power, or a checkbox buried at the end of a contract. + +We are hackers by culture, antifascists by conviction, libertarian in our pursuit of autonomy, and independent in our choices. We defend free software, an open Internet, privacy, and dignity at work. We believe in entrepreneurship and individual initiative, not abuse, monopoly, or exploitation. + +We are not looking for followers. We want people willing to question even what is written here. + +## 01 — Antifascist. No ambiguity. + +We reject fascism, racism, discrimination, the cult of the leader, and authoritarianism. No one should lose their dignity in the name of force, identity, or obedience. + +For us, antifascism is not decoration. It means actively defending pluralism, dissent, and equal rights. + +**Independence does not mean neutrality in the face of oppression.** + +## 02 — The Internet must remain free + +The Internet does not belong to platforms. We defend a network that is open, accessible, interoperable, and decentralized, built on protocols anyone can implement. + +We oppose arbitrary censorship, mass surveillance, walled gardens, and manufactured dependencies. Net neutrality and the ability to publish, communicate, and migrate without arbitrary permission are conditions of digital freedom. + +**The Internet is not a shopping mall with a single owner.** + +## 03 — Privacy first. Always. + +Privacy is a right, not a privilege or a premium feature. We do not need something to hide to expect our communications and habits to remain private. + +We support strong encryption, data minimization, the right to anonymity, and the ability to use services without systematic tracking. + +Security cannot be a blanket excuse for indiscriminate surveillance. + +**Those who collect our data must justify why they need it.** + +## 04 — Our data is not your business model + +We challenge the business model of many major technology platforms that derive part of their power from extensive data collection, profiling, and behavioral advertising. We reject manipulative interfaces, opaque consent, and practices that make tracking difficult to avoid. + +We do not claim every use of data by every large company is unlawful. We reject the notion that commercial surveillance is inevitable, or that users must accept it to take part in digital life. + +Businesses can create value without turning every interaction into a personal dossier. + +**Your business model is not our consent.** + +## 05 — Free software is freedom in practice + +We defend the freedom to run, study, modify, and share software. Code is knowledge, and those who control code have power over what others can do. + +We prefer free, open, auditable alternatives. We are not demanding ideological purity: we want tools that people can actually use, document, maintain, and sustain. When an alternative does not exist, we try to build one. + +**Rejecting lock-in is not enough. We must make leaving possible.** + +## 06 — Technology belongs to its users + +People who buy devices should be able to repair, maintain, modify, and — where technically feasible — install alternative operating systems on them. We defend the right to repair, open standards, and the ability to export personal data. + +We reject forced obsolescence and dependence on a single vendor. + +**If you cannot leave, you are not truly free to choose.** + +## 07 — Power must be accountable + +We do not reject every hierarchy. Expertise, coordination, and responsibility can require different roles. But no hierarchy is legitimate merely because it exists. + +Decision-makers must explain their choices, accept criticism, and answer for the consequences. Dissent is not automatically insubordination. + +**Authority without accountability is abuse.** + +## 08 — Work is not servitude + +We believe in doing good work, professionalism, and the freedom to build businesses. But a paycheck does not buy a person's dignity. We reject coercion, humiliation, imposed unpaid labor, and the demand for constant availability as proof of loyalty. + +We also believe collaborators have obligations: honor commitments, recognize others' contributions, and do not exploit trust. Responsibilities are not symmetrical: those with greater power have greater duties. + +**Respect cannot be bought with a paycheck or demanded through a title.** + +## 09 — Free enterprise, not monopolies + +We do not see profit as a sin or business as an enemy. We defend the freedom to innovate, compete, and earn fair compensation. + +We oppose monopolies, entrenched privilege, and practices that undermine choice, competition, or interoperability. Success does not grant the right to trap customers, workers, or competitors. + +**One person's economic freedom must not erase another's.** + +## 10 — Knowledge grows when shared + +Hacker culture means curiosity, study, experimentation, and sharing. We judge ideas by their merits and people by their actions, not credentials, rank, or allegiance. + +We document mistakes, publish solutions where we can, and make room for learners. Reasoned dissent is a contribution, not a threat. + +**We don't demand obedience. We ask for critical thinking.** + +## 11 — Independent, not indifferent + +We owe no unconditional loyalty to parties, companies, leaders, communities, or ideologies. We can share a cause and still criticize those who claim to represent it. No idea, including this manifesto, is beyond discussion. + +Changing your mind when the evidence changes is not weakness. + +**Integrity matters more than belonging.** + +## 12 — Building is a form of resistance + +Pointing out what is broken is not enough. We want to write code, maintain services, support independent projects, publish documentation, and make tools that return control to people. + +An alternative nobody can use is not enough. Freedom takes maintenance, time, people, and infrastructure. + +**Build, don't just complain.** + +## Our commitments + +At kmalloc.org, these principles must hold in practice: + +- No advertising trackers or behavioral advertising. +- No selling or monetizing visitors' personal data. +- Minimal collection of technical data, with explicit purposes and retention periods. +- No mandatory Big Tech account to read public content. +- A preference for free software, open standards, and independent services wherever practical. +- Transparency about dependencies, funding, conflicts of interest, and the limits of our choices. +- Respect for contributors: no discrimination, intimidation, or abuse of power. + +## Epilogue — Free your mind + +We don't want an Internet that knows everything about us. We want an Internet that leaves us free. + +We don't want work that buys our dignity. We want respect, competence, and accountability. + +We don't want technology that decides for us. We want to understand it, change it, and be able to leave it behind. + +Freedom does not begin with a product, an operating system, or a platform. It begins with thinking for yourself — and continues through the choices you are willing to defend. + +**Free Your Mind… and Your Ass Will Follow.** + +*kmalloc.org — Allocate freedom.* diff --git a/MANIFESTO.it.md b/MANIFESTO.it.md new file mode 100644 index 0000000..63cf4aa --- /dev/null +++ b/MANIFESTO.it.md @@ -0,0 +1,140 @@ +# kmalloc.org — Manifesto + +> **Free Your Mind… and Your Ass Will Follow.** +> — Funkadelic, *Free Your Mind… and Your Ass Will Follow* (1970) + +**Allocate freedom.** + +## Preambolo — Non chiediamo il permesso di pensare + +kmalloc.org nasce da una convinzione semplice: la libertà non può essere un servizio in abbonamento, una concessione del potere o una casella da spuntare in fondo a un contratto. + +Siamo hacker nella cultura, antifascisti nei valori, libertari nell'aspirazione all'autonomia e indipendenti nelle scelte. Difendiamo il software libero, un Internet aperto, la privacy e la dignità nel lavoro. Crediamo nell'impresa e nell'iniziativa individuale, non nell'abuso, nel monopolio o nello sfruttamento. + +Non cerchiamo seguaci. Vogliamo persone capaci di mettere in discussione anche ciò che scriviamo qui. + +## 01 — Antifascisti. Senza ambiguità. + +Rifiutiamo il fascismo, il razzismo, la discriminazione, il culto del capo e l'autoritarismo. Nessuno dovrebbe essere privato della propria dignità in nome della forza, dell'identità o dell'obbedienza. + +L'antifascismo per noi non è un ornamento: è la difesa concreta del pluralismo, del dissenso e dell'uguaglianza dei diritti. + +**Indipendenti non significa neutrali davanti ai soprusi.** + +## 02 — Internet deve restare libero + +Internet non è proprietà delle piattaforme. Difendiamo una rete aperta, accessibile, interoperabile e decentralizzata, fondata su protocolli che chiunque possa implementare. + +Ci opponiamo alla censura arbitraria, alla sorveglianza di massa, ai giardini recintati e alle dipendenze artificiali. La neutralità della rete e la possibilità di pubblicare, comunicare e migrare senza autorizzazioni arbitrarie sono condizioni della libertà digitale. + +**Internet non è un centro commerciale con un solo proprietario.** + +## 03 — Privacy first. Always. + +La privacy è un diritto, non un privilegio e nemmeno una funzione premium. Non dobbiamo avere qualcosa da nascondere per pretendere che le nostre comunicazioni e abitudini rimangano riservate. + +Sosteniamo la crittografia robusta, la minimizzazione dei dati, il diritto all'anonimato e la possibilità di utilizzare servizi senza essere tracciati sistematicamente. + +La sicurezza non può essere una scusa universale per la sorveglianza indiscriminata. + +**È chi raccoglie i nostri dati che deve giustificarne la necessità.** + +## 04 — I nostri dati non sono il vostro modello di business + +Contestiamo il modello di molte grandi piattaforme tecnologiche che fonda parte del proprio potere sulla raccolta estesa di dati, sulla profilazione e sulla pubblicità comportamentale. Rifiutiamo interfacce manipolative, consensi opachi e pratiche che rendono difficile sottrarsi al tracciamento. + +Non sosteniamo che ogni uso dei dati da parte di ogni grande azienda sia illecito: contestiamo l'idea che la sorveglianza commerciale sia inevitabile e che l'utente debba pagarne il prezzo per partecipare alla vita digitale. + +Le imprese possono creare valore senza trasformare ogni interazione in un dossier personale. + +**Your business model is not our consent.** + +## 05 — Il software libero è libertà concreta + +Difendiamo la libertà di eseguire, studiare, modificare e condividere il software. Il codice è conoscenza e chi controlla il codice esercita potere sulle possibilità degli altri. + +Preferiamo alternative libere, aperte e verificabili. Non chiediamo purezza ideologica: vogliamo progetti realmente utilizzabili, documentati, mantenuti e sostenibili. Quando un'alternativa non esiste, proviamo a costruirla. + +**Non basta rifiutare il lock-in. Bisogna rendere possibile uscirne.** + +## 06 — La tecnologia appartiene a chi la usa + +Chi acquista un dispositivo dovrebbe poterlo riparare, mantenerlo, modificare e — dove tecnicamente possibile — installare un sistema alternativo. Difendiamo il diritto alla riparazione, gli standard aperti e la possibilità di esportare i propri dati. + +Rifiutiamo l'obsolescenza imposta e la dipendenza da un singolo fornitore. + +**Se non puoi andartene, non sei davvero libero di scegliere.** + +## 07 — Il potere deve rispondere delle proprie azioni + +Non rifiutiamo ogni gerarchia. Competenza, coordinamento e responsabilità possono richiedere ruoli diversi. Ma nessuna gerarchia è legittima solo perché esiste. + +Chi decide deve spiegare le proprie scelte, accettare le critiche e rispondere delle conseguenze. Il dissenso non è insubordinazione automatica. + +**L'autorità senza responsabilità è abuso.** + +## 08 — Il lavoro non è servitù + +Crediamo nel lavoro ben fatto, nella professionalità e nel diritto di creare imprese. Uno stipendio, però, non compra la dignità di una persona. Rifiutiamo ricatti, umiliazioni, lavoro non retribuito imposto e disponibilità permanente pretesa come prova di lealtà. + +Crediamo anche nella correttezza di chi collabora: rispettare gli impegni, riconoscere il contributo degli altri e non approfittarsi della fiducia ricevuta. Le responsabilità non sono identiche: chi ha più potere ha maggiori obblighi. + +**Il rispetto non si compra con uno stipendio e non si pretende con un titolo.** + +## 09 — Libera impresa, non monopoli + +Non consideriamo il profitto una colpa né l'impresa un nemico. Difendiamo la possibilità di innovare, competere e ottenere un giusto compenso. + +Contestiamo monopoli, rendite di posizione e pratiche che impediscono scelta, concorrenza o interoperabilità. Il successo non autorizza a imprigionare clienti, lavoratori o concorrenti. + +**La libertà economica di qualcuno non può cancellare quella degli altri.** + +## 10 — La conoscenza cresce quando circola + +La cultura hacker è curiosità, studio, sperimentazione e condivisione. Valutiamo le idee per la loro qualità e le persone per il loro comportamento, non per titoli, gerarchie o appartenenze. + +Documentiamo gli errori, rendiamo pubbliche le soluzioni quando possiamo e lasciamo spazio a chi sta imparando. Il dissenso ragionato è un contributo, non una minaccia. + +**Non chiediamo obbedienza. Chiediamo pensiero critico.** + +## 11 — Indipendenti, non indifferenti + +Non dobbiamo fedeltà incondizionata a partiti, aziende, leader, comunità o ideologie. Possiamo condividere una causa e criticare chi la rappresenta. Nessuna idea, nemmeno questo manifesto, è immune dalla discussione. + +Cambiare opinione davanti a prove migliori non è debolezza. + +**La coerenza conta più dell'appartenenza.** + +## 12 — Costruire è una forma di resistenza + +Non ci basta denunciare ciò che non funziona. Vogliamo scrivere codice, mantenere servizi, sostenere progetti indipendenti, produrre documentazione e rendere accessibili strumenti che restituiscano controllo alle persone. + +Un'alternativa che nessuno riesce a usare non basta. La libertà richiede manutenzione, tempo, persone e infrastrutture. + +**Build, don't just complain.** + +## I nostri impegni + +Per kmalloc.org questi principi devono valere anche nella pratica: + +- Niente tracker pubblicitari o pubblicità comportamentale. +- Nessuna vendita o monetizzazione dei dati personali dei visitatori. +- Raccolta minima dei dati tecnici, con finalità e tempi di conservazione espliciti. +- Nessun account Big Tech obbligatorio per leggere i contenuti pubblici. +- Preferenza per software libero, standard aperti e servizi indipendenti, quando praticabile. +- Trasparenza su dipendenze, finanziamenti, conflitti di interesse e limiti delle nostre scelte. +- Rispetto per chi partecipa: niente discriminazioni, intimidazioni o abusi di potere. + +## Epilogo — Libera la mente + +Non vogliamo un Internet che sappia tutto di noi. Vogliamo un Internet che ci lasci liberi. + +Non vogliamo un lavoro che compri la nostra dignità. Vogliamo rispetto, competenza e responsabilità. + +Non vogliamo una tecnologia che decida al posto nostro. Vogliamo capirla, modificarla e poterla abbandonare. + +La libertà non comincia da un prodotto, un sistema operativo o una piattaforma. Comincia dalla capacità di pensare con la propria testa — e continua nelle scelte concrete che siamo disposti a difendere. + +**Free Your Mind… and Your Ass Will Follow.** + +*kmalloc.org — Allocate freedom.* diff --git a/README.md b/README.md new file mode 100644 index 0000000..3b2eb19 --- /dev/null +++ b/README.md @@ -0,0 +1,11 @@ +# kmalloc.org + +Sources of the kmalloc.org website: plain static HTML, no JavaScript, valid HTML5 and CSS. + +- `build.py` generates the pages: `python3 build.py `. +- `MANIFESTO.en.md` and `MANIFESTO.it.md` are the manifesto texts, version 1.0. +- `fonts/terminess.woff2` is Terminess (Terminus), SIL Open Font License, subset to Latin. +- `badges/` holds the official W3C badges, served from our own site. +- `logo/` holds the shrike logo: SVG and PNG exports, `build_logo.py` and the original PNG. + +I check every page with the Nu HTML Checker before publishing, then copy the output to the web root. diff --git a/badges/w3c-css.png b/badges/w3c-css.png new file mode 100644 index 0000000..edab466 Binary files /dev/null and b/badges/w3c-css.png differ diff --git a/badges/w3c-html5.png b/badges/w3c-html5.png new file mode 100644 index 0000000..b703d60 Binary files /dev/null and b/badges/w3c-html5.png differ diff --git a/build.py b/build.py new file mode 100644 index 0000000..1fdb012 --- /dev/null +++ b/build.py @@ -0,0 +1,548 @@ +#!/usr/bin/env python3 +"""Build the kmalloc.org static site (plain HTML, no JavaScript) from the manifesto sources. +Usage: build.py (writes index.html, manifesto.html, it/index.html, it/manifesto.html)""" +import html, os, re, sys + +HERE = os.path.dirname(os.path.abspath(__file__)) +OUT = sys.argv[1] + +CSS = """@font-face { + font-family: "Terminess"; + src: url("/fonts/terminess.woff2") format("woff2"); + font-display: swap; +} + +:root { + --bg: #F9F7ED; + --surface: #F1EDE0; + --border: #D9D3C2; + --text: #111417; + --muted: #5b564a; + --accent: #D9480F; + --link: #b13a0b; +} + +@media (prefers-color-scheme: dark) { + :root { + --bg: #111417; + --surface: #1b1f23; + --border: #5b564a; + --text: #F9F7ED; + --muted: #8a8473; + --link: #f0683a; + } +} + +body { + margin: 0 auto; + max-width: 40em; + padding: 1em; + background-color: var(--bg); + color: var(--text); + font-family: system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; + line-height: 1.6; +} + +h1, h2, h3 { + margin: 2em 0 .5em; + font-family: "Terminess", ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace; + font-weight: normal; + line-height: 1.25; +} + +a { + color: var(--link); +} + +a:visited { + color: var(--muted); +} + +a:hover, header a[aria-current] { + color: var(--text); +} + +a:focus-visible { + outline: 2px solid var(--accent); + outline-offset: 2px; +} + +header { + border-bottom: 1px solid var(--border); + line-height: 2; +} + +header a[aria-current] { + text-decoration: none; +} + +footer { + margin-top: 3em; + border-top: 1px solid var(--border); + color: var(--muted); + font-size: .875em; +} + +blockquote { + margin: 1.5em 0; + padding: 0 1em; + border-left: 4px solid var(--accent); +} + +code { + background-color: var(--surface); + color: var(--text); + font-family: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace; + font-size: .9375em; + overflow-wrap: anywhere; +} + +.hero { + margin: .5em 0 .4em; + font-size: 3em; + line-height: 1.1; +} + +@media (max-width: 30em) { + .hero { + font-size: 2em; + } +} + +.logo { + width: 7em; + height: auto; +} + +@media print { + :root { + --bg: #fff; + --border: #000; + --text: #000; + --muted: #000; + --link: #000; + } + + header, .badges { + display: none; + } + + a[href^="http"]::after { + content: " <" attr(href) ">"; + } + + h1, h2, h3 { + page-break-after: avoid; + } +}""" + +SERVICES = [ + # (url, name, en, it) + ("https://git.kmalloc.org/", "git", "code hosting (Forgejo)", "repository di codice (Forgejo)"), + ("https://social.kmalloc.org/@squid", "social", "Mastodon, accounts on approval", "Mastodon, account su approvazione"), + ("https://lists.kmalloc.org/", "lists", "mailing lists (Mailman 3)", "liste di posta (Mailman 3)"), + ("https://chat.kmalloc.org/", "chat", "XMPP, web client", "XMPP, client web"), + ("https://element.kmalloc.org/", "matrix", "Matrix, Element web client", "Matrix, client web Element"), + ("https://meet.kmalloc.org/", "meet", "video conferences (Jitsi Meet)", "videoconferenze (Jitsi Meet)"), + ("https://webmail.kmalloc.org/", "webmail", "email on our own server", "posta sul nostro server"), +] + + + +MANIFESTO_VERSION = "1.0" +CONTACT = "squid@kmalloc.org" +CONTACT_SHOWN = CONTACT.replace("@", " (at) ") # shown instead of a mailto link, against address harvesters +BTC = "bc1qsj5qadrzlqmfwcru4fwuqvftg833te5f9mja2c" + +SERVICE_PAGES = [ + # id, name, url, EN text, IT text + ("mail", "Email", "https://webmail.kmalloc.org/", + "An address @kmalloc.org on our own mail server, with webmail and support for any standard mail client. IMAP: mail.kmalloc.org, port 993 (TLS). SMTP submission: mail.kmalloc.org, port 465 (TLS). Outgoing mail is signed with DKIM and protected by SPF and DMARC.", + "Un indirizzo @kmalloc.org sul nostro server di posta, con webmail e supporto per qualsiasi client di posta standard. IMAP: mail.kmalloc.org, porta 993 (TLS). Invio SMTP: mail.kmalloc.org, porta 465 (TLS). La posta in uscita è firmata con DKIM e protetta da SPF e DMARC."), + ("lists", "Mailing lists", "https://lists.kmalloc.org/", + "Mailing lists with web archives (Mailman 3). Lists live under @lists.kmalloc.org. If you need one, ask.", + "Liste di posta con archivi consultabili sul web (Mailman 3). Le liste stanno sotto @lists.kmalloc.org. Se te ne serve una, chiedila."), + ("git", "Git", "https://git.kmalloc.org/", + "Code hosting with Forgejo: repositories, issues and pull requests. Git over SSH uses port 2222. Reading public repositories needs no account.", + "Hosting di codice con Forgejo: repository, issue e pull request. Git via SSH usa la porta 2222. Per leggere i repository pubblici non serve un account."), + ("social", "Mastodon", "https://social.kmalloc.org/", + "A Mastodon server. Your address is @name@social.kmalloc.org. You can ask for an account on the site itself: requests are approved by hand.", + "Un server Mastodon. Il tuo indirizzo è @nome@social.kmalloc.org. L'account si può chiedere direttamente sul sito: le richieste si approvano a mano."), + ("chat", "XMPP chat", "https://chat.kmalloc.org/", + "Instant messaging with XMPP: address name@kmalloc.org, group rooms on conference.kmalloc.org, file sharing, and audio and video calls through our own TURN server. Use the web client or any XMPP app (server kmalloc.org, port 5222).", + "Messaggistica con XMPP: indirizzo nome@kmalloc.org, stanze di gruppo su conference.kmalloc.org, condivisione di file e chiamate audio e video con un nostro server TURN. Usa il client web o qualsiasi app XMPP (server kmalloc.org, porta 5222)."), + ("matrix", "Matrix", "https://element.kmalloc.org/", + "A Matrix homeserver: address @name:kmalloc.org. Use the Element web client or any Matrix app with homeserver matrix.kmalloc.org.", + "Un homeserver Matrix: indirizzo @nome:kmalloc.org. Usa il client web Element o qualsiasi app Matrix con homeserver matrix.kmalloc.org."), + ("meet", "Video conferences", "https://meet.kmalloc.org/", + "Video conferences with Jitsi Meet. Anyone with the link can join a room; creating a room needs an account.", + "Videoconferenze con Jitsi Meet. Chiunque abbia il link può entrare in una stanza; per crearne una serve un account."), +] + +PEOPLE = [ + # handle, display name (empty = handle only), bio EN, bio IT, links (label, url) + ("squid", "", + "I'm squid. I run kmalloc.org, write code and maintain the services on this site. I have been into computers since I was ten, when I got an IBM PS/2 with a 486DX and played Gorilla, a QBasic game: ever since, I have been taking things apart to understand how they work. Outside of work: retro computing, science fiction and extreme metal.", + "Sono squid. Gestisco kmalloc.org, scrivo codice e mantengo i servizi di questo sito. Mi appassionano i computer da quando, a dieci anni, ebbi un IBM PS/2 con un 486DX e giocai a Gorilla, un gioco in QBasic: da allora smonto le cose per capire come funzionano. Fuori dal lavoro: retrocomputing, fantascienza ed extreme metal.", + [("Mastodon", "https://social.kmalloc.org/@squid"), ("git", "https://git.kmalloc.org/squid")]), +] + +T = { + "en": dict( + lang="en", other="it", other_name="Italiano", other_home="/it/", other_man="/it/manifesto.html", home="/", home_link="/?lang=en", man="/manifesto.html", ppl="/people.html", other_ppl="/it/persone.html", svc="/services.html", other_svc="/it/servizi.html", + title="kmalloc.org: Technology. Freedom. Dissent.", + desc="kmalloc.org is an independent hacker space that promotes free software, privacy and an open Internet.", + tagline="Technology. Freedom. Dissent.", + identity="kmalloc.org is a hacker, antifascist, ethical space.", + intro="kmalloc.org is an independent hacker space that promotes free software, privacy and an open Internet, defending freedom of thought, the dignity of work and the right of people not to be controlled, exploited or subordinated to arbitrary powers.", + manifesto_h="Manifesto", manifesto_p="What we believe, in twelve points and a few commitments:", manifesto_a="read the manifesto", + services_h="Services", services_p="Run on our own server, with free software. Accounts are created by hand.", + nojs="This page uses no JavaScript, cookies or trackers.", back="home", toc="Contents", + man_title="kmalloc.org: Manifesto", man_desc="The kmalloc.org manifesto: free software, privacy, an open Internet, dignity at work.", + people_h="People", people_p="Who is behind kmalloc.org.", people_a="meet the people", people_title="kmalloc.org: People", people_desc="The people behind kmalloc.org.", links="Links", sections="Sections", version="Version", + svc_title="kmalloc.org: Services", svc_desc="The services run by kmalloc.org: email, git, Mastodon, XMPP, Matrix, mailing lists and video conferences. Free, by request.", + svc_intro="These services run on our own server, with free software, for people who want an alternative to the big platforms.", + at_hint="replace (at) with @", free_h="Get an account", free_p1="The services are free of charge. To ask for an account, write to", free_p2="telling us which services you want and the username you would like.", + donate_h="Support kmalloc.org", donate_p="Donations are welcome and help keep the server running. Bitcoin address:", donate_a="send a donation", + terms_h="Good to know", terms_p="Everything is run by one person on one server, with nightly encrypted backups and no guarantees of availability. Be respectful: the manifesto explains what we stand for.", + open_a="open", + ), + "it": dict( + lang="it", other="en", other_name="English", other_home="/", other_man="/manifesto.html", home="/it/", home_link="/it/", man="/it/manifesto.html", ppl="/it/persone.html", other_ppl="/people.html", svc="/it/servizi.html", other_svc="/services.html", + title="kmalloc.org: Technology. Freedom. Dissent.", + desc="kmalloc.org è uno spazio hacker indipendente che promuove il software libero, la privacy e un Internet aperto.", + tagline="Technology. Freedom. Dissent.", + identity="kmalloc.org è uno spazio hacker, antifascista, etico.", + intro="kmalloc.org è uno spazio hacker indipendente che promuove il software libero, la privacy e un Internet aperto, difendendo la libertà di pensiero, la dignità del lavoro e il diritto delle persone a non essere controllate, sfruttate o subordinate a poteri arbitrari.", + manifesto_h="Manifesto", manifesto_p="Quello in cui crediamo, in dodici punti e qualche impegno:", manifesto_a="leggi il manifesto", + services_h="Servizi", services_p="Girano sul nostro server, con software libero. Gli account si creano a mano.", + nojs="Questa pagina non usa JavaScript, cookie né tracker.", back="home", toc="Indice", + man_title="kmalloc.org: Manifesto", man_desc="Il manifesto di kmalloc.org: software libero, privacy, un Internet aperto, dignità nel lavoro.", + people_h="Persone", people_p="Chi c'è dietro kmalloc.org.", people_a="conosci le persone", people_title="kmalloc.org: Persone", people_desc="Le persone dietro kmalloc.org.", links="Link", sections="Sezioni", version="Versione", + svc_title="kmalloc.org: Servizi", svc_desc="I servizi di kmalloc.org: posta, git, Mastodon, XMPP, Matrix, liste di posta e videoconferenze. Gratuiti, su richiesta.", + svc_intro="Questi servizi girano sul nostro server, con software libero, per chi vuole un'alternativa alle grandi piattaforme.", + at_hint="sostituisci (at) con @", free_h="Richiedi un account", free_p1="I servizi sono gratuiti. Per chiedere un account scrivi a", free_p2="indicando quali servizi vuoi e il nome utente che preferisci.", + donate_h="Sostieni kmalloc.org", donate_p="Le donazioni sono benvenute e aiutano a tenere acceso il server. Indirizzo Bitcoin:", donate_a="fai una donazione", + terms_h="Da sapere", terms_p="Tutto è gestito da una persona su un solo server, con backup notturni cifrati e nessuna garanzia di disponibilità. Siate rispettosi: il manifesto spiega in cosa crediamo.", + open_a="apri", + ), +} + + +def badges(url): + q = url.replace(":", "%3A").replace("/", "%2F") + return f"""

+Valid HTML5 +Valid CSS +

""" + + +def nav(t, other_url, current): + """Site menu at the top of every page: sections plus the language switch.""" + cur = lambda k: ' aria-current="page"' if k == current else "" + if current == "home" and t["lang"] == "it": + other_url = "/?lang=en" + return f"""
+ +
""" + +def page(t, title, desc, body, alt_url, here_url): + other = T[t["other"]] + return f""" + + + + + + + + + + + + + +{html.escape(title)} + + +{body} + + +""" + +def home(t): + li = "\n".join( + f'
  • {n}: {html.escape(t["lang"] == "en" and en or it)}
  • ' + for (u, n, en, it) in SERVICES) + body = f"""{nav(t, t['other_home'], 'home')} + +

    + +

    + +

    Technology.
    Freedom.
    Dissent.

    + +

    +{html.escape(t['identity'])} +

    + +

    +{html.escape(t['intro'])} +

    + +

    +Allocate freedom. +

    + +

    {t['manifesto_h']}

    + +

    +{t['manifesto_p']} +{t['manifesto_a']} ({t['version'].lower()} {MANIFESTO_VERSION}). +

    + +

    {t['people_h']}

    + +

    +{t['people_p'].rstrip('.')}: +{t['people_a']}. +

    + +

    {t['services_h']}

    + +

    +{t['services_p']} +{t['free_h'].lower()}. +

    + +
      +{li} +
    + +
    +

    +Free Your Mind… and Your Ass Will Follow. +

    +

    +{t['nojs']} +

    +{badges("https://kmalloc.org" + t["home"])} +
    """ + return page(t, t["title"], t["desc"], body, t["other_home"], t["home"]) + + +def no_em_dash(md): + """Replace every em dash: headings 'NN — Title' -> 'NN. Title', 'Word — Title' -> 'Word: Title', + attribution lines lose the dash, parenthetical dashes become commas.""" + md = re.sub(r"^(#+ )(\d\d) — ", r"\1\2. ", md, flags=re.M) + md = re.sub(r"^(#+ [^\d\n][^—\n]*?) — ", r"\1: ", md, flags=re.M) + md = re.sub(r"^> — ", "> ", md, flags=re.M) + for a, b in ((" — where technically feasible — ", ", where technically feasible, "), + (" — dove tecnicamente possibile — ", ", dove tecnicamente possibile, "), + (" — and continues", ", and continues"), + (" — e continua", ", e continua")): + md = md.replace(a, b) + md = md.replace("kmalloc.org — ", "kmalloc.org: ") + assert "—" not in md, [l for l in md.splitlines() if "—" in l] + return md + +def inline(s): + s = html.escape(s, quote=False) + s = re.sub(r"\*\*(.+?)\*\*", r"\1", s) + s = re.sub(r"(?\1", s) + return s + +def slug(heading): + m = re.match(r"(\d\d)\b", heading) + if m: return m.group(1) + h = heading.lower() + if h.startswith(("preamble", "preambolo")): return "preamble" + if h.startswith(("our commitments", "i nostri impegni")): return "commitments" + if h.startswith(("epilogue", "epilogo")): return "epilogue" + return re.sub(r"[^a-z0-9]+", "-", h).strip("-") + +def md_to_html(md): + lines = md.splitlines() + out, toc = [], [] + para, quote, items = [], [], [] + def flush(): + nonlocal para, quote, items + if para: + out.append("

    \n" + "\n".join(para) + "\n

    \n"); para = [] + if quote: + out.append("
    \n

    \n" + "\n".join(quote) + "\n

    \n
    \n"); quote = [] + if items: + out.append("
      \n" + "\n".join(f"
    • {i}
    • " for i in items) + "\n
    \n"); items = [] + title = "" + for raw in lines: + line = raw.rstrip("\n") + br = line.endswith(" ") + s = line.strip() + if not s: + flush(); continue + if s.startswith("# "): + flush(); title = s[2:]; continue + if s.startswith("## "): + flush(); h = s[3:]; sl = slug(h); toc.append((sl, h)) + out.append(f'

    {inline(h)}

    \n'); continue + if s.startswith("> "): + if para or items: flush() + quote.append(inline(s[2:]) + ("
    " if br else "")); continue + if s.startswith("- "): + if para or quote: flush() + items.append(inline(s[2:])); continue + if quote or items: flush() + para.append(inline(s)) + flush() + return title, toc, "".join(out) + +def manifesto(t): + src = open(os.path.join(HERE, f"MANIFESTO.{t['lang']}.md"), encoding="utf-8").read() + title, toc, body_html = md_to_html(no_em_dash(src)) + toc_html = "\n".join(f'
  • {inline(h)}
  • ' for sl, h in toc) + body = f"""{nav(t, t['other_man'], 'man')} + +

    {html.escape(title)}

    + +

    +{t['version']} {MANIFESTO_VERSION} +

    + +

    {t['toc']}

    + +
      +{toc_html} +
    + +{body_html} +
    +

    +{t['back']} +

    +

    +{t['nojs']} +

    +{badges("https://kmalloc.org" + t["man"])} +
    """ + return page(t, t["man_title"], t["man_desc"], body, t["other_man"], t["man"]) + + +def people_page(t): + cards = [] + for handle, name, en, it, links in PEOPLE: + bio = en if t["lang"] == "en" else it + title = html.escape(name) + " (" + html.escape(handle) + ")" if name else html.escape(handle) + li = "\n".join(f'
  • {html.escape(l)}
  • ' for l, u in links) + cards.append(f"""

    {title}

    + +

    +{html.escape(bio)} +

    + +
      +{li} +
    +""") + body = f"""{nav(t, t['other_ppl'], 'ppl')} + +

    {t['people_h']}

    + +

    +{t['people_p']} +

    + +{"".join(cards)} +
    +

    +{t['back']} +

    +

    +{t['nojs']} +

    +{badges("https://kmalloc.org" + t["ppl"])} +
    """ + return page(t, t["people_title"], t["people_desc"], body, t["other_ppl"], t["ppl"]) + + +def services_page(t): + en = t["lang"] == "en" + secs = [] + for sid, name, url, d_en, d_it in SERVICE_PAGES: + secs.append(f"""

    {html.escape(name)}

    + +

    +{html.escape(d_en if en else d_it)} +{t['open_a']}. +

    +""") + body = f"""{nav(t, t['other_svc'], 'svc')} + +

    {t['services_h']}

    + +

    +{html.escape(t['svc_intro'])} +

    + +

    {t['free_h']}

    + +

    +{t['free_p1']} +{CONTACT_SHOWN} +({t['at_hint']}), +{t['free_p2']} +

    + +{"".join(secs)} + + +

    +{t['donate_p']} +{BTC} +

    + +

    {t['terms_h']}

    + +

    +{html.escape(t['terms_p'])} +

    + +
    +

    +{t['back']} +

    +

    +{t['nojs']} +

    +{badges("https://kmalloc.org" + t["svc"])} +
    """ + return page(t, t["svc_title"], t["svc_desc"], body, t["other_svc"], t["svc"]) + +os.makedirs(os.path.join(OUT, "it"), exist_ok=True) +os.makedirs(os.path.join(OUT, "fonts"), exist_ok=True) +import shutil +os.makedirs(os.path.join(OUT, "badges"), exist_ok=True) +for b in ("w3c-html5.png", "w3c-css.png"): + shutil.copy(os.path.join(HERE, "badges", b), os.path.join(OUT, "badges", b)) +shutil.copy(os.path.join(HERE, "fonts", "terminess.woff2"), os.path.join(OUT, "fonts", "terminess.woff2")) +for lang, prefix in (("en", ""), ("it", "it/")): + t = T[lang] + open(os.path.join(OUT, prefix + "index.html"), "w", encoding="utf-8").write(home(t)) + open(os.path.join(OUT, prefix + "manifesto.html"), "w", encoding="utf-8").write(manifesto(t)) + open(os.path.join(OUT, prefix + ("people.html" if lang == "en" else "persone.html")), "w", encoding="utf-8").write(people_page(t)) + open(os.path.join(OUT, prefix + ("services.html" if lang == "en" else "servizi.html")), "w", encoding="utf-8").write(services_page(t)) +open(os.path.join(OUT, "robots.txt"), "w", encoding="utf-8").write("User-agent: *\nDisallow: /\n") +print("built:", sorted(os.listdir(OUT)), sorted(os.listdir(os.path.join(OUT, "it")))) diff --git a/fonts/terminess.woff2 b/fonts/terminess.woff2 new file mode 100644 index 0000000..780b3da Binary files /dev/null and b/fonts/terminess.woff2 differ diff --git a/logo/build_logo.py b/logo/build_logo.py new file mode 100644 index 0000000..2f0b8d4 --- /dev/null +++ b/logo/build_logo.py @@ -0,0 +1,76 @@ +"""Build the kmalloc logo set: bird traced from the Ideogram PNG, wordmark from Terminess (Terminus, SIL OFL).""" +import os,sys +import numpy as np, potrace +from PIL import Image +from fontTools.ttLib import TTFont +from fontTools.pens.svgPathPen import SVGPathPen +from fontTools.pens.transformPen import TransformPen +from fontTools.pens.boundsPen import BoundsPen +OUT=sys.argv[1]; os.makedirs(OUT,exist_ok=True) +SRC=os.path.expanduser("~/Downloads/high-level-description-a-flat-vector-log_DrBVA7_jUzqgIXurP--M_g_M3vw3_xUQ0qxWmHjABJb2Q_cover.png") +FONT=os.path.expanduser("~/.local/share/fonts/nerd-fonts/Terminus/TerminessNerdFont-Bold.ttf") +INK_L,INK_D,CREAM,DARK,RUST="#111417","#F9F7ED","#F9F7ED","#111417","#D9480F" +# ---- bird: trace from the PNG, rows below the branch are the old wordmark and are dropped +a=np.asarray(Image.open(SRC).convert("RGB")).astype(int) +lum=0.2126*a[...,0]+0.7152*a[...,1]+0.0722*a[...,2] +orange=((a[...,0]-a[...,2])>90)&(a[...,0]>140) +dark=(lum<120)&(~orange) +CUT=644 +dark[CUT:]=False; orange[CUT:]=False +ys,xs=np.where(dark|orange); x0,x1,y0,y1=xs.min()-6,xs.max()+7,ys.min()-6,ys.max()+7 +S=4 +def prep(m): + im=Image.fromarray((m[y0:y1,x0:x1]*255).astype("uint8")).resize(((x1-x0)*S,(y1-y0)*S),Image.BICUBIC) + return np.asarray(im)>127 +def trace(mask): + pl=potrace.Bitmap(~mask).trace(turdsize=30,turnpolicy=potrace.POTRACE_TURNPOLICY_MINORITY,alphamax=1.0,opticurve=True,opttolerance=0.5) + parts=[] + for c in pl: + p=c.start_point; d=[f"M{p.x/S:.2f},{p.y/S:.2f}"] + for sg in c.segments: + if sg.is_corner: d.append(f"L{sg.c.x/S:.2f},{sg.c.y/S:.2f}L{sg.end_point.x/S:.2f},{sg.end_point.y/S:.2f}") + else: d.append(f"C{sg.c1.x/S:.2f},{sg.c1.y/S:.2f} {sg.c2.x/S:.2f},{sg.c2.y/S:.2f} {sg.end_point.x/S:.2f},{sg.end_point.y/S:.2f}") + d.append("Z"); parts.append("".join(d)) + return "".join(parts) +bird=trace(prep(dark)); thorn=trace(prep(orange)) +W=x1-x0; MH=y1-y0 +# ---- wordmark from Terminess Bold outlines +f=TTFont(FONT); gs=f.getGlyphSet(); cm=f.getBestCmap() +def word_paths(text,scale,tx,ty): + d=[]; x=0 + for ch in text: + g=cm[ord(ch)]; pen=SVGPathPen(gs,ntos=lambda v:f"{v:.2f}") + gs[g].draw(TransformPen(pen,(scale,0,0,-scale,tx+x*scale,ty))); d.append(pen.getCommands()); x+=f["hmtx"][g][0] + return "".join(d) +bp=BoundsPen(gs); x=0 +xmin=1e9;xmax=-1e9;ymin=1e9;ymax=-1e9 +for ch in "kmalloc": + g=cm[ord(ch)]; b=BoundsPen(gs); gs[g].draw(b); bx0,by0,bx1,by1=b.bounds + xmin=min(xmin,x+bx0); xmax=max(xmax,x+bx1); ymin=min(ymin,by0); ymax=max(ymax,by1); x+=f["hmtx"][g][0] +GAP=26 +scale=(W-8)/(xmax-xmin) +tx=(W-(xmax-xmin)*scale)/2-xmin*scale +top=MH+GAP; ty=top+ymax*scale +word=word_paths("kmalloc",scale,tx,ty) +H=round(top+(ymax-ymin)*scale+8) +print("bird",W,MH,"| total",W,H,"| font scale",round(scale,4),"| text height",round((ymax-ymin)*scale,1)) +def svg(ink_c,vb,bg=None,css=False,with_word=True): + X,Y,w,h=vb + r=f'' if bg else "" + st=f'' if css else "" + cls=' class="i"' if css else f' fill="{ink_c}"' + d=bird+(word if with_word else "") + return (f'{st}{r}' + f'') +full=(0,0,W,H); mark=(0,0,W,MH) +files={"logo-light.svg":svg(INK_L,full),"logo-dark.svg":svg(INK_D,full),"logo-auto.svg":svg(None,full,css=True), + "mark-light.svg":svg(INK_L,mark,with_word=False),"mark-dark.svg":svg(INK_D,mark,with_word=False),"mark-auto.svg":svg(None,mark,css=True,with_word=False)} +pad=40; s=max(W,MH)+2*pad; ox=(s-W)/2; oy=(s-MH)/2 +def icon(ink_c,bg): + return (f'' + f'') +files["icon-light.svg"]=icon(INK_L,CREAM); files["icon-dark.svg"]=icon(INK_D,DARK) +files["favicon-auto.svg"]=(f'' + f'') +for n,c in files.items(): open(os.path.join(OUT,n),"w").write(c) +print(sorted(files)) diff --git a/logo/kmalloc-logo-original.png b/logo/kmalloc-logo-original.png new file mode 100644 index 0000000..7b848f4 Binary files /dev/null and b/logo/kmalloc-logo-original.png differ diff --git a/logo/png/icon-dark-512.png b/logo/png/icon-dark-512.png new file mode 100644 index 0000000..e519366 Binary files /dev/null and b/logo/png/icon-dark-512.png differ diff --git a/logo/png/icon-light-512.png b/logo/png/icon-light-512.png new file mode 100644 index 0000000..88c8261 Binary files /dev/null and b/logo/png/icon-light-512.png differ diff --git a/logo/png/logo-dark.png b/logo/png/logo-dark.png new file mode 100644 index 0000000..7bc822a Binary files /dev/null and b/logo/png/logo-dark.png differ diff --git a/logo/png/logo-light.png b/logo/png/logo-light.png new file mode 100644 index 0000000..57eebb4 Binary files /dev/null and b/logo/png/logo-light.png differ diff --git a/logo/png/mark-dark.png b/logo/png/mark-dark.png new file mode 100644 index 0000000..05bf36b Binary files /dev/null and b/logo/png/mark-dark.png differ diff --git a/logo/png/mark-light.png b/logo/png/mark-light.png new file mode 100644 index 0000000..6b97d34 Binary files /dev/null and b/logo/png/mark-light.png differ diff --git a/logo/svg/favicon-auto.svg b/logo/svg/favicon-auto.svg new file mode 100644 index 0000000..c325774 --- /dev/null +++ b/logo/svg/favicon-auto.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/logo/svg/icon-dark.svg b/logo/svg/icon-dark.svg new file mode 100644 index 0000000..99d2bdd --- /dev/null +++ b/logo/svg/icon-dark.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/logo/svg/icon-light.svg b/logo/svg/icon-light.svg new file mode 100644 index 0000000..0d4d1da --- /dev/null +++ b/logo/svg/icon-light.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/logo/svg/logo-auto.svg b/logo/svg/logo-auto.svg new file mode 100644 index 0000000..0862690 --- /dev/null +++ b/logo/svg/logo-auto.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/logo/svg/logo-dark.svg b/logo/svg/logo-dark.svg new file mode 100644 index 0000000..23f2637 --- /dev/null +++ b/logo/svg/logo-dark.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/logo/svg/logo-light.svg b/logo/svg/logo-light.svg new file mode 100644 index 0000000..f622294 --- /dev/null +++ b/logo/svg/logo-light.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/logo/svg/mark-auto.svg b/logo/svg/mark-auto.svg new file mode 100644 index 0000000..3089a49 --- /dev/null +++ b/logo/svg/mark-auto.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/logo/svg/mark-dark.svg b/logo/svg/mark-dark.svg new file mode 100644 index 0000000..669b5ff --- /dev/null +++ b/logo/svg/mark-dark.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/logo/svg/mark-light.svg b/logo/svg/mark-light.svg new file mode 100644 index 0000000..f02b4aa --- /dev/null +++ b/logo/svg/mark-light.svg @@ -0,0 +1 @@ + \ No newline at end of file