rxform 0.1.3

Rust implementation of pyxform: convert XLSForm spreadsheets to ODK XForm XML
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
<!doctype html>
<html lang="fr">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>rxform — XLSForm vers ODK XForm, en Rust</title>
<meta name="description" content="rxform convertit les classeurs XLSForm en XML ODK XForm. Une implémentation de pyxform en Rust, validée formulaire par formulaire, avec des erreurs qui indiquent la feuille, la ligne et la colonne.">
<link rel="icon" href="../assets/favicon.svg" type="image/svg+xml">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,600;9..144,700&family=IBM+Plex+Sans:wght@400;500;600&family=IBM+Plex+Mono:wght@400;500&display=swap" rel="stylesheet">
<link rel="stylesheet" href="../assets/site.css">
<meta property="og:title" content="rxform — XLSForm to ODK XForm, in Rust">
<meta property="og:description" content="Spreadsheets in. XForms out. Validated against pyxform, with errors that point at the exact cell.">
<link rel="alternate" hreflang="en" href="https://milkway.github.io/rxform/en/index.html">
<link rel="alternate" hreflang="pt" href="https://milkway.github.io/rxform/pt/index.html">
<link rel="alternate" hreflang="fr" href="https://milkway.github.io/rxform/fr/index.html">
<link rel="alternate" hreflang="es" href="https://milkway.github.io/rxform/es/index.html">
<link rel="alternate" hreflang="x-default" href="https://milkway.github.io/rxform/en/index.html">
</head>
<body class="min-h-screen">

<!-- ======================= nav ======================= -->
<header class="border-b border-(--rule) bg-(--bg)/80 backdrop-blur-sm sticky top-0 z-40">
  <nav class="mx-auto flex max-w-6xl items-baseline gap-6 px-5 py-3.5">
    <a href="#" class="font-display text-xl font-bold tracking-tight">rxform</a>
    <span class="font-mono text-xs text-(--muted) hidden sm:inline">v0.1</span>
    <span class="flex-1"></span>
    <a class="font-mono text-sm text-(--muted) hover:text-(--accent) transition-colors" href="guide.html">guide</a>
    <a class="font-mono text-sm text-(--muted) hover:text-(--accent) transition-colors" href="#install">installer</a>
    <a class="font-mono text-sm text-(--muted) hover:text-(--accent) transition-colors" href="#features">fonctions</a>
    <a class="font-mono text-sm text-(--muted) hover:text-(--accent) transition-colors" href="#how">architecture</a>
    <a class="font-mono text-sm text-(--muted) hover:text-(--accent) transition-colors hidden sm:inline" href="https://docs.rs/rxform">docs.rs</a>
    <a class="font-mono text-sm text-(--muted) hover:text-(--accent) transition-colors" href="https://crates.io/crates/rxform">crates.io</a>
    <a class="font-mono text-sm text-(--muted) hover:text-(--accent) transition-colors" href="https://github.com/milkway/rxform">github</a>
    <span class="flex items-baseline gap-2 border-l border-(--rule) pl-4"><a class="font-mono text-xs uppercase text-(--muted) hover:text-(--accent) transition-colors" href="../en/index.html">en</a><a class="font-mono text-xs uppercase text-(--muted) hover:text-(--accent) transition-colors" href="../pt/index.html">pt</a><a class="font-mono text-xs uppercase text-(--accent) transition-colors" href="../fr/index.html">fr</a><a class="font-mono text-xs uppercase text-(--muted) hover:text-(--accent) transition-colors" href="../es/index.html">es</a></span>
  </nav>
</header>

<!-- ======================= hero ======================= -->
<section class="sheet-grid relative overflow-hidden">
  <!-- worksheet frame decorations -->
  <div aria-hidden="true" class="pointer-events-none absolute inset-y-0 left-0 hidden w-10 border-r border-(--rule) bg-(--surface)/60 lg:flex flex-col items-center pt-28 gap-[15px] font-mono text-[11px] text-(--muted)/60 select-none">
    <span>1</span><span>2</span><span>3</span><span>4</span><span>5</span><span>6</span><span>7</span><span>8</span><span>9</span><span>10</span><span>11</span><span>12</span><span>13</span><span>14</span>
  </div>

  <div class="mx-auto max-w-6xl px-5 pt-20 pb-16 lg:pt-28 lg:pb-24">
    <p class="rise-1 font-mono text-[13px] tracking-[0.18em] uppercase text-(--accent)">A1 &nbsp;·&nbsp; fx&nbsp; =convert(survey)</p>
    <h1 class="rise-2 font-display mt-4 max-w-3xl text-5xl font-semibold leading-[1.04] tracking-tight sm:text-6xl lg:text-7xl">
      Un tableur entre.<br>Un <span class="text-(--accent)">XForm</span> sort.
    </h1>
    <p class="rise-3 mt-6 max-w-2xl text-lg leading-relaxed text-(--muted)">
      <strong class="text-(--text) font-semibold">rxform</strong> convertit les classeurs
      <a class="underline decoration-(--rule) underline-offset-4 hover:decoration-(--accent)" href="https://xlsform.org">XLSForm</a>
      en XML ODK XForm — le format que parlent ODK&nbsp;Collect, Enketo et KoboToolbox.
      Une implémentation de pyxform en Rust : un binaire statique rapide, une sortie vérifiée
      formulaire par formulaire contre l’original, et des messages d’erreur qui pointent la cellule exacte.
    </p>

    <div class="rise-4 mt-9 flex flex-wrap items-center gap-3">
      <button data-copy="cargo install rxform"
        class="group flex items-center gap-3 rounded-md border border-(--rule) bg-(--surface) px-4 py-2.5 font-mono text-[15px] shadow-[0_1px_0_var(--rule)] transition-colors hover:border-(--accent) cursor-pointer">
        <span class="text-(--accent)">$</span> cargo install rxform
        <span class="copy-label text-xs text-(--muted) group-hover:text-(--accent)">copier</span>
      </button>
      <a href="https://github.com/milkway/rxform"
        class="rounded-md border border-transparent px-4 py-2.5 font-mono text-[15px] text-(--muted) underline decoration-(--rule) underline-offset-4 transition-colors hover:text-(--text) hover:decoration-(--accent)">
        code source ↗
      </a>
    </div>

    <!-- transformation vignette -->
    <div class="rise-5 mt-16 grid items-stretch gap-0 lg:grid-cols-[1fr_56px_1fr]">
      <!-- the sheet -->
      <figure class="overflow-hidden rounded-t-lg border border-(--rule) bg-(--surface) lg:rounded-l-lg lg:rounded-tr-none">
        <figcaption class="flex items-center gap-2 border-b border-(--rule) bg-(--cellhead) px-4 py-2 font-mono text-xs text-(--muted)">
          <span class="inline-block h-2.5 w-2.5 rounded-sm bg-(--color-green)"></span> survey.xlsx — sheet <b class="text-(--text)">survey</b>
        </figcaption>
        <div class="overflow-x-auto">
          <table class="w-full border-collapse font-mono text-[13px]">
            <thead>
              <tr class="bg-(--cellhead) text-(--muted)">
                <th class="w-8 border border-(--rule) px-2 py-1.5 font-normal"></th>
                <th class="border border-(--rule) px-3 py-1.5 text-left font-medium">type</th>
                <th class="border border-(--rule) px-3 py-1.5 text-left font-medium">name</th>
                <th class="border border-(--rule) px-3 py-1.5 text-left font-medium">label</th>
              </tr>
            </thead>
            <tbody>
              <tr>
                <td class="border border-(--rule) px-2 py-1.5 text-center text-(--muted)">2</td>
                <td class="border border-(--rule) px-3 py-1.5 text-(--color-blue)">select_one yes_no</td>
                <td class="border border-(--rule) px-3 py-1.5">good_day</td>
                <td class="border border-(--rule) px-3 py-1.5">Bonne journée aujourd’hui ?</td>
              </tr>
              <tr>
                <td class="border border-(--rule) px-2 py-1.5 text-center text-(--muted)">3</td>
                <td class="border border-(--rule) px-3 py-1.5 text-(--color-purple)">begin repeat</td>
                <td class="border border-(--rule) px-3 py-1.5">visit</td>
                <td class="border border-(--rule) px-3 py-1.5">Chaque visite</td>
              </tr>
              <tr>
                <td class="border border-(--rule) px-2 py-1.5 text-center text-(--muted)">4</td>
                <td class="border border-(--rule) px-3 py-1.5 text-(--color-green)">geopoint</td>
                <td class="border border-(--rule) px-3 py-1.5">spot</td>
                <td class="border border-(--rule) px-3 py-1.5">Où êtes-vous ?</td>
              </tr>
            </tbody>
          </table>
        </div>
      </figure>

      <!-- arrow -->
      <div class="flex items-center justify-center py-2 font-mono text-2xl text-(--accent) lg:rotate-0 rotate-90">⟶</div>

      <!-- the xml -->
      <figure class="overflow-hidden rounded-b-lg border border-(--rule) bg-(--color-term) lg:rounded-r-lg lg:rounded-bl-none">
        <figcaption class="flex items-center gap-2 border-b border-white/10 px-4 py-2 font-mono text-xs text-(--color-termtext)/60">
          <span class="inline-block h-2.5 w-2.5 rounded-sm bg-(--color-blue)"></span> form.xml — ODK XForm
        </figcaption>
        <pre class="overflow-x-auto p-4 font-mono text-[13px] leading-relaxed text-(--color-termtext)"><code>&lt;<span class="text-sky-300">select1</span> <span class="text-amber-200/80">ref</span>=<span class="text-emerald-300">"/data/good_day"</span>&gt;
  &lt;<span class="text-sky-300">itemset</span> <span class="text-amber-200/80">nodeset</span>=<span class="text-emerald-300">"instance('yes_no')/root/item"</span>&gt;
    &lt;<span class="text-sky-300">value</span> <span class="text-amber-200/80">ref</span>=<span class="text-emerald-300">"name"</span>/&gt;
  &lt;/<span class="text-sky-300">itemset</span>&gt;
&lt;/<span class="text-sky-300">select1</span>&gt;
&lt;<span class="text-sky-300">repeat</span> <span class="text-amber-200/80">nodeset</span>=<span class="text-emerald-300">"/data/visit"</span>&gt;…&lt;/<span class="text-sky-300">repeat</span>&gt;
&lt;<span class="text-sky-300">bind</span> <span class="text-amber-200/80">type</span>=<span class="text-emerald-300">"geopoint"</span> <span class="text-amber-200/80">nodeset</span>=<span class="text-emerald-300">"/data/visit/spot"</span>/&gt;<span class="caret-blink text-(--accent)">▌</span></code></pre>
      </figure>
    </div>
  </div>
</section>

<!-- ======================= proof strip ======================= -->
<section class="rule-y bg-(--surface)">
  <div class="mx-auto grid max-w-6xl grid-cols-2 divide-x divide-(--rule) lg:grid-cols-4">
    <div class="px-5 py-6 text-center">
      <p class="font-display text-3xl font-semibold">34<span class="text-(--muted)">/</span>34</p>
      <p class="mt-1 font-mono text-xs text-(--muted)">formulaires de référence identiques à pyxform 4.5.0</p>
    </div>
    <div class="px-5 py-6 text-center">
      <p class="font-display text-3xl font-semibold">100%</p>
      <p class="mt-1 font-mono text-xs text-(--muted)">de la spécification xlsform.org</p>
    </div>
    <div class="px-5 py-6 text-center">
      <p class="font-display text-3xl font-semibold">65</p>
      <p class="mt-1 font-mono text-xs text-(--muted)">tests figeant sortie et diagnostics</p>
    </div>
    <div class="px-5 py-6 text-center">
      <p class="font-display text-3xl font-semibold">1</p>
      <p class="mt-1 font-mono text-xs text-(--muted)">binaire statique — sans Python</p>
    </div>
  </div>
</section>

<!-- ======================= errors ======================= -->
<section class="mx-auto max-w-6xl px-5 py-20 lg:py-28">
  <div class="grid items-center gap-10 lg:grid-cols-2">
    <div class="reveal">
      <p class="font-mono text-[13px] tracking-[0.18em] uppercase text-(--accent)">B7 · quand le formulaire casse</p>
      <h2 class="font-display mt-3 text-4xl font-semibold tracking-tight">Des erreurs qui nomment<br>la cellule, pas la stack.</h2>
      <p class="mt-5 max-w-md leading-relaxed text-(--muted)">
        Une coquille à la ligne 3 ne devrait pas ressembler à un rapport de crash. Chaque erreur de rxform
        porte la <em>feuille, la ligne et la colonne</em> concernées — plus une cause probable :
        le type de question le plus proche, la liste de choix sans doute visée,
        la ligne du <code class="font-mono text-[0.9em] text-(--text)">begin</code> qu’un
        <code class="font-mono text-[0.9em] text-(--text)">end group</code> égaré a oubliée.
      </p>
      <ul class="mt-6 space-y-2 font-mono text-sm text-(--muted)">
        <li><span class="text-(--color-green)">✓</span> types et ${références} mal écrits → « vouliez-vous dire … ? »</li>
        <li><span class="text-(--color-green)">✓</span> les groupes non fermés pointent leur ligne begin</li>
        <li><span class="text-(--color-green)">✓</span> les noms ambigus détectés au point d’usage</li>
        <li><span class="text-(--color-green)">✓</span> entities, triggers et listes vérifiés en croisé</li>
      </ul>
    </div>
    <figure class="reveal overflow-hidden rounded-lg border border-(--rule) bg-(--color-term) shadow-[0_18px_50px_-24px_rgba(27,42,65,0.5)]">
      <figcaption class="flex items-center gap-1.5 border-b border-white/10 px-4 py-2.5">
        <span class="h-2.5 w-2.5 rounded-full bg-[#f26d5b]"></span>
        <span class="h-2.5 w-2.5 rounded-full bg-[#f2c14b]"></span>
        <span class="h-2.5 w-2.5 rounded-full bg-[#5fc26a]"></span>
        <span class="ml-2 font-mono text-xs text-(--color-termtext)/50">terminal</span>
      </figcaption>
      <pre class="overflow-x-auto p-5 font-mono text-[13.5px] leading-relaxed text-(--color-termtext)"><code><span class="text-emerald-300">$</span> rxform household_survey.xlsx
<span class="text-red-400">error:</span> [sheet 'survey', row 12, column 'type'] unknown question type 'selct_one districts'
  <span class="text-amber-300">probable cause:</span> did you mean 'select_one'?

<span class="text-emerald-300">$</span> rxform household_survey.xlsx
<span class="text-red-400">error:</span> [sheet 'survey', row 48, column 'relevant'] '${distrct}' does not match
the name of any question or group
  <span class="text-amber-300">probable cause:</span> did you mean 'district'?

<span class="text-emerald-300">$</span> rxform household_survey.xlsx
household_survey.xml<span class="caret-blink text-(--accent)">▌</span></code></pre>
    </figure>
  </div>
</section>

<!-- ======================= feature sheet ======================= -->
<section id="features" class="rule-y sheet-grid">
  <div class="mx-auto max-w-6xl px-5 py-20 lg:py-24">
    <p class="reveal font-mono text-[13px] tracking-[0.18em] uppercase text-(--accent)">C2 · feuille « fonctions »</p>
    <h2 class="reveal font-display mt-3 text-4xl font-semibold tracking-tight">Toute la spec. Sur une feuille.</h2>
    <p class="reveal mt-4 max-w-2xl leading-relaxed text-(--muted)">
      Tout ce que décrit <a class="underline decoration-(--rule) underline-offset-4 hover:decoration-(--accent)" href="https://xlsform.org">xlsform.org</a> se convertit —
      chaque ligne ci-dessous a été vérifiée contre la sortie de pyxform.
    </p>

    <figure class="reveal mt-8 overflow-hidden rounded-lg border border-(--rule) bg-(--surface)">
      <div class="overflow-x-auto">
        <table class="w-full border-collapse font-mono text-[13px]">
          <thead>
            <tr class="bg-(--cellhead) text-(--muted)">
              <th class="w-8 border border-(--rule) px-2 py-2 font-normal"></th>
              <th class="border border-(--rule) px-3 py-2 text-left font-medium">type</th>
              <th class="border border-(--rule) px-3 py-2 text-left font-medium">name</th>
              <th class="border border-(--rule) px-3 py-2 text-left font-medium">label</th>
            </tr>
          </thead>
          <tbody class="[&_td]:border [&_td]:border-(--rule) [&_td]:px-3 [&_td]:py-2 [&_tr:hover]:bg-(--cellhead)/50">
            <tr>
              <td class="text-center! px-2! text-(--muted)">2</td>
              <td class="text-(--color-blue) whitespace-nowrap">select_one spec</td>
              <td>question_types</td>
              <td class="font-body text-(--muted)">Tous les types : texte → tracés géo, ranges, médias, codes-barres, rank, calculate, audit, métadonnées</td>
            </tr>
            <tr>
              <td class="text-center! px-2! text-(--muted)">3</td>
              <td class="text-(--color-purple) whitespace-nowrap">begin repeat</td>
              <td>structure</td>
              <td class="font-body text-(--muted)">Groupes, répétitions (+ compteurs), boucles héritées, table-list, formulaires flat — imbriqués librement</td>
            </tr>
            <tr>
              <td class="text-center! px-2! text-(--muted)">4</td>
              <td class="text-(--color-green) whitespace-nowrap">select_multiple langs</td>
              <td>multilanguage</td>
              <td class="font-body text-(--muted)">label::Langue (code), aides traduites, médias et messages via &lt;itext&gt;, guidance hints</td>
            </tr>
            <tr>
              <td class="text-center! px-2! text-(--muted)">5</td>
              <td class="text-(--color-blue) whitespace-nowrap">select_one_from_file</td>
              <td>external_data</td>
              <td class="font-body text-(--muted)">Selects CSV/XML/GeoJSON, pulldata(), search(), last-saved, select_one_external + itemsets.csv</td>
            </tr>
            <tr>
              <td class="text-center! px-2! text-(--muted)">6</td>
              <td class="text-(--color-purple) whitespace-nowrap">text</td>
              <td>entities</td>
              <td class="font-body text-(--muted)">Créer et mettre à jour des entités : save_to, create_if/update_if, suivi de versions hors ligne</td>
            </tr>
            <tr>
              <td class="text-center! px-2! text-(--muted)">7</td>
              <td class="text-(--color-green) whitespace-nowrap">calculate</td>
              <td>logic</td>
              <td class="font-body text-(--muted)">${refs} → xpaths, choice_filter en cascade, valeurs par défaut dynamiques, actions trigger, randomize</td>
            </tr>
            <tr>
              <td class="text-center! px-2! text-(--muted)">8</td>
              <td class="text-(--color-blue) whitespace-nowrap">note</td>
              <td>settings</td>
              <td class="font-body text-(--muted)">Titres, ids, versions, styles, clés de chiffrement, namespaces, attributs personnalisés, tags SMS</td>
            </tr>
          </tbody>
        </table>
      </div>
    </figure>
  </div>
</section>

<!-- ======================= diagrams ======================= -->
<section id="how" class="mx-auto max-w-6xl px-5 py-20 lg:py-24">
  <p class="reveal font-mono text-[13px] tracking-[0.18em] uppercase text-(--accent)">D4 · sous le capot</p>
  <h2 class="reveal font-display mt-3 text-4xl font-semibold tracking-tight">Un pipeline qu’on peut montrer du doigt.</h2>
  <p class="reveal mt-4 max-w-2xl leading-relaxed text-(--muted)">
    Classeur → cellules normalisées → arbre de questions → validation localisée → XML XForm,
    imprimé selon les conventions de pyxform pour que l’outillage existant retrouve ses repères.
  </p>
  <div class="reveal mt-8 space-y-8">
    <figure class="overflow-x-auto rounded-lg border border-(--rule) bg-(--surface) p-4">
      <img src="../pipeline.svg" alt="rxform pipeline: xlsx workbook through parser, validation and generator to XForm XML" class="mx-auto min-w-[720px] max-w-[980px] w-full">
    </figure>
    <figure class="overflow-x-auto rounded-lg border border-(--rule) bg-(--surface) p-4">
      <img src="../mapping.svg" alt="Mapping from XLSForm sheets to the parts of the generated XForm document" class="mx-auto min-w-[720px] max-w-[980px] w-full">
    </figure>
  </div>
</section>

<!-- ======================= quick start ======================= -->
<section class="rule-y bg-(--surface)">
  <div class="mx-auto max-w-6xl px-5 py-20 lg:py-24">
    <p class="reveal font-mono text-[13px] tracking-[0.18em] uppercase text-(--accent)" id="install">E9 · démarrage rapide</p>
    <h2 class="reveal font-display mt-3 text-4xl font-semibold tracking-tight">CLI ou crate. À vous de voir.</h2>
    <p class="reveal mt-4 max-w-2xl leading-relaxed text-(--muted)">
      Des binaires précompilés pour chaque plateforme accompagnent chaque
      <a class="underline decoration-(--rule) underline-offset-4 hover:decoration-(--accent)" href="https://github.com/milkway/rxform/releases/latest">release GitHub</a> —
      Linux (musl statique + <code class="font-mono text-[0.9em]">.deb</code>), macOS et Windows.
    </p>

    <div class="reveal mt-8 grid gap-4 sm:grid-cols-2 lg:grid-cols-4">
      <div class="rounded-lg border border-(--rule) bg-(--bg) p-4">
        <p class="font-mono text-xs uppercase tracking-[0.15em] text-(--muted)">macOS · Homebrew</p>
        <button data-copy="brew install milkway/tap/rxform" class="group mt-3 w-full text-left font-mono text-[13px] cursor-pointer">
          <span class="text-(--accent)">$</span> brew install milkway/tap/rxform
          <span class="copy-label block pt-1 text-xs text-(--muted) group-hover:text-(--accent)">copier</span>
        </button>
      </div>
      <div class="rounded-lg border border-(--rule) bg-(--bg) p-4">
        <p class="font-mono text-xs uppercase tracking-[0.15em] text-(--muted)">Debian · Ubuntu</p>
        <p class="mt-3 font-mono text-[13px]"><span class="text-(--accent)">$</span> sudo dpkg -i rxform_*.deb</p>
        <a class="block pt-1 font-mono text-xs text-(--muted) underline decoration-(--rule) underline-offset-4 hover:text-(--accent)" href="https://github.com/milkway/rxform/releases/latest">obtenir le .deb ↗</a>
      </div>
      <div class="rounded-lg border border-(--rule) bg-(--bg) p-4">
        <p class="font-mono text-xs uppercase tracking-[0.15em] text-(--muted)">Windows · Scoop</p>
        <button data-copy="scoop bucket add milkway https://github.com/milkway/scoop-bucket; scoop install rxform" class="group mt-3 w-full text-left font-mono text-[13px] cursor-pointer">
          <span class="text-(--accent)">&gt;</span> scoop install rxform
          <span class="copy-label block pt-1 text-xs text-(--muted) group-hover:text-(--accent)">copier (ajoute le bucket)</span>
        </button>
      </div>
      <div class="rounded-lg border border-(--rule) bg-(--bg) p-4">
        <p class="font-mono text-xs uppercase tracking-[0.15em] text-(--muted)">Partout · Cargo</p>
        <button data-copy="cargo install rxform" class="group mt-3 w-full text-left font-mono text-[13px] cursor-pointer">
          <span class="text-(--accent)">$</span> cargo install rxform
          <span class="copy-label block pt-1 text-xs text-(--muted) group-hover:text-(--accent)">copier</span>
        </button>
      </div>
    </div>

    <div class="reveal mt-8 grid gap-6 lg:grid-cols-2">
      <figure class="overflow-hidden rounded-lg border border-(--rule) bg-(--color-term)">
        <figcaption class="border-b border-white/10 px-4 py-2 font-mono text-xs text-(--color-termtext)/60">ligne de commande</figcaption>
        <pre class="overflow-x-auto p-5 font-mono text-[13.5px] leading-relaxed text-(--color-termtext)"><code><span class="text-slate-500"># installer une fois</span>
<span class="text-emerald-300">$</span> cargo install rxform

<span class="text-slate-500"># convertir — écrit survey.xml à côté du fichier</span>
<span class="text-emerald-300">$</span> rxform survey.xlsx

<span class="text-slate-500"># ou choisir la destination / imprimer sur stdout</span>
<span class="text-emerald-300">$</span> rxform survey.xlsx -o out/form.xml
<span class="text-emerald-300">$</span> rxform survey.xlsx --stdout</code></pre>
      </figure>
      <figure class="overflow-hidden rounded-lg border border-(--rule) bg-(--color-term)">
        <figcaption class="border-b border-white/10 px-4 py-2 font-mono text-xs text-(--color-termtext)/60">bibliothèque — docs.rs/rxform</figcaption>
        <pre class="overflow-x-auto p-5 font-mono text-[13.5px] leading-relaxed text-(--color-termtext)"><code><span class="text-slate-500">// cargo add rxform</span>
<span class="text-sky-300">use</span> std::path::Path;

<span class="text-sky-300">let</span> conversion = rxform::<span class="text-amber-200">convert</span>(Path::new(<span class="text-emerald-300">"survey.xlsx"</span>))?;
std::fs::<span class="text-amber-200">write</span>(<span class="text-emerald-300">"form.xml"</span>, &amp;conversion.xml)?;

<span class="text-sky-300">if let</span> Some(csv) = conversion.itemsets_csv {
    std::fs::<span class="text-amber-200">write</span>(<span class="text-emerald-300">"itemsets.csv"</span>, csv)?; <span class="text-slate-500">// selects externes</span>
}</code></pre>
      </figure>
    </div>
  </div>
</section>

<!-- ======================= footer ======================= -->
<footer class="mx-auto max-w-6xl px-5 py-14">
  <div class="grid gap-8 sm:grid-cols-3">
    <div>
      <p class="font-display text-lg font-semibold">rxform</p>
      <p class="mt-2 text-sm leading-relaxed text-(--muted)">
        Open source sous <a class="underline decoration-(--rule) underline-offset-4 hover:decoration-(--accent)" href="https://github.com/milkway/rxform/blob/main/LICENSE">licence BSD-2-Clause</a> —
        la même que <a class="underline decoration-(--rule) underline-offset-4 hover:decoration-(--accent)" href="https://github.com/xlsform/pyxform">pyxform</a>,
        dont il réimplémente le comportement et réutilise les formulaires de test.
      </p>
    </div>
    <div class="font-mono text-sm">
      <p class="text-(--muted) uppercase tracking-[0.15em] text-xs">links</p>
      <ul class="mt-3 space-y-1.5">
        <li><a class="hover:text-(--accent)" href="https://github.com/milkway/rxform">github.com/milkway/rxform</a></li>
        <li><a class="hover:text-(--accent)" href="https://crates.io/crates/rxform">crates.io/crates/rxform</a></li>
        <li><a class="hover:text-(--accent)" href="https://docs.rs/rxform">docs.rs/rxform</a></li>
        <li><a class="hover:text-(--accent)" href="guide.html">guide XLSForm</a></li>
        <li><a class="hover:text-(--accent)" href="https://github.com/milkway/rxform/releases/latest">releases et binaires</a></li>
        <li><a class="hover:text-(--accent)" href="https://doi.org/10.5281/zenodo.21894015">zenodo DOI</a></li>
        <li><a class="hover:text-(--accent)" href="https://xlsform.org">xlsform.org</a></li>
      </ul>
    </div>
    <div class="text-sm">
      <p class="font-mono text-(--muted) uppercase tracking-[0.15em] text-xs">cite</p>
      <p class="mt-3 leading-relaxed text-(--muted)" id="cite">
        Leite, A. <em>rxform: a Rust implementation of pyxform.</em>
        Métadonnées de citation dans <a class="underline decoration-(--rule) underline-offset-4 hover:decoration-(--accent)" href="https://github.com/milkway/rxform/blob/main/CITATION.cff">CITATION.cff</a> ·
        archivé sur Zenodo : <a class="underline decoration-(--rule) underline-offset-4 hover:decoration-(--accent)" href="https://doi.org/10.5281/zenodo.21894015">doi:10.5281/zenodo.21894015</a>
      </p>
    </div>
  </div>
  <p class="mt-12 border-t border-(--rule) pt-6 font-mono text-xs text-(--muted)">
    © 2026 André Leite · fabriqué à Caruaru 🌵 · ligne 14 sur 14 — fin de feuille
  </p>
</footer>

<script>
// copy-to-clipboard pills
for (const btn of document.querySelectorAll("[data-copy]")) {
  btn.addEventListener("click", async () => {
    try {
      await navigator.clipboard.writeText(btn.dataset.copy);
      const label = btn.querySelector(".copy-label");
      if (label) { label.textContent = "copied!"; setTimeout(() => (label.textContent = "copy"), 1600); }
    } catch {}
  });
}
// scroll reveals
const io = new IntersectionObserver(
  (entries) => entries.forEach((e) => e.isIntersecting && e.target.classList.add("in")),
  { threshold: 0.12 }
);
document.querySelectorAll(".reveal").forEach((el) => io.observe(el));
</script>
</body>
</html>