Browse Source

More links

master
David Larlet 2 years ago
parent
commit
47cb4cc414

+ 186
- 0
cache/2021/34dbd7a73608c6cde4adf12c4a7084c0/index.html View File

@@ -0,0 +1,186 @@
<!doctype html><!-- This is a valid HTML5 document. -->
<!-- Screen readers, SEO, extensions and so on. -->
<html lang="fr">
<!-- Has to be within the first 1024 bytes, hence before the <title>
See: https://www.w3.org/TR/2012/CR-html5-20121217/document-metadata.html#charset -->
<meta charset="utf-8">
<!-- Why no `X-UA-Compatible` meta: https://stackoverflow.com/a/6771584 -->
<!-- The viewport meta is quite crowded and we are responsible for that.
See: https://codepen.io/tigt/post/meta-viewport-for-2015 -->
<meta name="viewport" content="width=device-width,initial-scale=1">
<!-- Required to make a valid HTML5 document. -->
<title>Batching (archive) — David Larlet</title>
<meta name="description" content="Publication mise en cache pour en conserver une trace.">
<!-- That good ol' feed, subscribe :). -->
<link rel="alternate" type="application/atom+xml" title="Feed" href="/david/log/">
<!-- Generated from https://realfavicongenerator.net/ such a mess. -->
<link rel="apple-touch-icon" sizes="180x180" href="/static/david/icons2/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/static/david/icons2/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/static/david/icons2/favicon-16x16.png">
<link rel="manifest" href="/static/david/icons2/site.webmanifest">
<link rel="mask-icon" href="/static/david/icons2/safari-pinned-tab.svg" color="#07486c">
<link rel="shortcut icon" href="/static/david/icons2/favicon.ico">
<meta name="msapplication-TileColor" content="#f0f0ea">
<meta name="msapplication-config" content="/static/david/icons2/browserconfig.xml">
<meta name="theme-color" content="#f0f0ea">
<!-- Documented, feel free to shoot an email. -->
<link rel="stylesheet" href="/static/david/css/style_2021-01-20.css">
<!-- See https://www.zachleat.com/web/comprehensive-webfonts/ for the trade-off. -->
<link rel="preload" href="/static/david/css/fonts/triplicate_t4_poly_regular.woff2" as="font" type="font/woff2" media="(prefers-color-scheme: light), (prefers-color-scheme: no-preference)" crossorigin>
<link rel="preload" href="/static/david/css/fonts/triplicate_t4_poly_bold.woff2" as="font" type="font/woff2" media="(prefers-color-scheme: light), (prefers-color-scheme: no-preference)" crossorigin>
<link rel="preload" href="/static/david/css/fonts/triplicate_t4_poly_italic.woff2" as="font" type="font/woff2" media="(prefers-color-scheme: light), (prefers-color-scheme: no-preference)" crossorigin>
<link rel="preload" href="/static/david/css/fonts/triplicate_t3_regular.woff2" as="font" type="font/woff2" media="(prefers-color-scheme: dark)" crossorigin>
<link rel="preload" href="/static/david/css/fonts/triplicate_t3_bold.woff2" as="font" type="font/woff2" media="(prefers-color-scheme: dark)" crossorigin>
<link rel="preload" href="/static/david/css/fonts/triplicate_t3_italic.woff2" as="font" type="font/woff2" media="(prefers-color-scheme: dark)" crossorigin>
<script>
function toggleTheme(themeName) {
document.documentElement.classList.toggle(
'forced-dark',
themeName === 'dark'
)
document.documentElement.classList.toggle(
'forced-light',
themeName === 'light'
)
}
const selectedTheme = localStorage.getItem('theme')
if (selectedTheme !== 'undefined') {
toggleTheme(selectedTheme)
}
</script>

<meta name="robots" content="noindex, nofollow">
<meta content="origin-when-cross-origin" name="referrer">
<!-- Canonical URL for SEO purposes -->
<link rel="canonical" href="https://github.com/elm/expectations/blob/master/batching.md#batching">

<body class="remarkdown h1-underline h2-underline h3-underline em-underscore hr-center ul-star pre-tick">

<article>
<header>
<h1>Batching</h1>
</header>
<nav>
<p class="center">
<a href="/david/" title="Aller à l’accueil"><svg class="icon icon-home">
<use xlink:href="/static/david/icons2/symbol-defs.svg#icon-home"></use>
</svg> Accueil</a> •
<a href="https://github.com/elm/expectations/blob/master/batching.md#batching" title="Lien vers le contenu original">Source originale</a>
</p>
</nav>
<hr>
<p>Work on issues and pull requests happens in periodic batches, not one-by-one as they come in.</p>
<p>This means that a &ldquo;simple&rdquo; issue on <code>elm/core</code> may be blocked by ongoing work on the package website or compiler, but we think this has some important and worthwhile benefits.</p>
<h3>Coherent Design</h3>
<p>Issues that look &ldquo;simple&rdquo; are often much more interconnected than they seem.</p>
<p>Imagine there are 20 suggestions on how to make something better. Taken <em>individually</em>, each one is probably pretty easy to deal with. Taken <em>together</em>, you are talking about quite serious design changes. Does that design have a coherent vision? Is it directed at the needs of your intended users? Do all the parts fit together? Can you find a simpler design that addresses all 20 suggestions in a nicer way?</p>
<p>The major benefit of batching is that the review process is <em>structured</em> for coherent design. By allowing time for folks to share their experiences and suggestions, it becomes possible to consider them all together and better balance their needs. Shifting towards real-time responses on everything would necessarily degrade the overall design quality.</p>
<h3>Focus</h3>
<p>Doing this kind of design work requires focus. Compiler work requires getting deeply immersed in the problems people face and the details of the code. What is needed? What is possible? Same for the package manager, the REPL, the documentation, the core packages, etc. The problem is:</p>
<ol>
<li>It is not possible to be deeply immersed in all of these projects at the same time.</li>
<li>An unfocused process does not tend to produce coherent design.</li>
</ol>
<p>Batching really helps with this. Focusing on high quality work has produced some of the best ideas in Elm. For example, while adding the <code>--output=json</code> flag, we realized that type error messages could really great. No one thought that was possible with ML-family languages before! Even the designer of Elm! Same thing happened with the parser. While improving parser performance, we realized that the parse error messages could be very dramatically improved. The very best parts of Elm have all come from focused exploration, not from rigid scheduling or unstructured online discussion.</p>
<h2>An Example</h2>
<p>I think <a href="https://github.com/elm-lang/elm-package/pull/177">this issue</a> shows what batching and holistic design mean in practice.</p>
<p>It took about a week to revamp all the error messages for <code>elm-package</code>, ultimately leading to the fix in this case. Should <a href="http://elm-lang.org/blog/farewell-to-frp">Elm 0.17</a> have blocked for an extra week for this? Is it smart to have so many changes in a single release? Do these changes fit into the overall narative of the release?</p>
<p>In the year 2017 or 2030, users will only know if things are nice or if they suck. January or July of 2016 makes no difference to them. So waiting a few months feels like a long time to us, but it is not about us!</p>
<p>When a project is going to live for decades, it is better to do things <em>right</em> than to do things <em>right now</em>.</p>
</article>


<hr>

<footer>
<p>
<a href="/david/" title="Aller à l’accueil"><svg class="icon icon-home">
<use xlink:href="/static/david/icons2/symbol-defs.svg#icon-home"></use>
</svg> Accueil</a> •
<a href="/david/log/" title="Accès au flux RSS"><svg class="icon icon-rss2">
<use xlink:href="/static/david/icons2/symbol-defs.svg#icon-rss2"></use>
</svg> RSS</a> •
<a href="http://larlet.com" title="Go to my English profile" data-instant><svg class="icon icon-user-tie">
<use xlink:href="/static/david/icons2/symbol-defs.svg#icon-user-tie"></use>
</svg> Pro</a> •
<a href="mailto:david%40larlet.fr" title="Envoyer un courriel"><svg class="icon icon-mail">
<use xlink:href="/static/david/icons2/symbol-defs.svg#icon-mail"></use>
</svg> Email</a> •
<abbr class="nowrap" title="Hébergeur : Alwaysdata, 62 rue Tiquetonne 75002 Paris, +33184162340"><svg class="icon icon-hammer2">
<use xlink:href="/static/david/icons2/symbol-defs.svg#icon-hammer2"></use>
</svg> Légal</abbr>
</p>
<template id="theme-selector">
<form>
<fieldset>
<legend><svg class="icon icon-brightness-contrast">
<use xlink:href="/static/david/icons2/symbol-defs.svg#icon-brightness-contrast"></use>
</svg> Thème</legend>
<label>
<input type="radio" value="auto" name="chosen-color-scheme" checked> Auto
</label>
<label>
<input type="radio" value="dark" name="chosen-color-scheme"> Foncé
</label>
<label>
<input type="radio" value="light" name="chosen-color-scheme"> Clair
</label>
</fieldset>
</form>
</template>
</footer>
<script>
function loadThemeForm(templateName) {
const themeSelectorTemplate = document.querySelector(templateName)
const form = themeSelectorTemplate.content.firstElementChild
themeSelectorTemplate.replaceWith(form)

form.addEventListener('change', (e) => {
const chosenColorScheme = e.target.value
localStorage.setItem('theme', chosenColorScheme)
toggleTheme(chosenColorScheme)
})

const selectedTheme = localStorage.getItem('theme')
if (selectedTheme && selectedTheme !== 'undefined') {
form.querySelector(`[value="${selectedTheme}"]`).checked = true
}
}

const prefersColorSchemeDark = '(prefers-color-scheme: dark)'
window.addEventListener('load', () => {
let hasDarkRules = false
for (const styleSheet of Array.from(document.styleSheets)) {
let mediaRules = []
for (const cssRule of styleSheet.cssRules) {
if (cssRule.type !== CSSRule.MEDIA_RULE) {
continue
}
// WARNING: Safari does not have/supports `conditionText`.
if (cssRule.conditionText) {
if (cssRule.conditionText !== prefersColorSchemeDark) {
continue
}
} else {
if (cssRule.cssText.startsWith(prefersColorSchemeDark)) {
continue
}
}
mediaRules = mediaRules.concat(Array.from(cssRule.cssRules))
}

// WARNING: do not try to insert a Rule to a styleSheet you are
// currently iterating on, otherwise the browser will be stuck
// in a infinite loop…
for (const mediaRule of mediaRules) {
styleSheet.insertRule(mediaRule.cssText)
hasDarkRules = true
}
}
if (hasDarkRules) {
loadThemeForm('#theme-selector')
}
})
</script>
</body>
</html>

+ 37
- 0
cache/2021/34dbd7a73608c6cde4adf12c4a7084c0/index.md View File

@@ -0,0 +1,37 @@
title: Batching
url: https://github.com/elm/expectations/blob/master/batching.md#batching
hash_url: 34dbd7a73608c6cde4adf12c4a7084c0

Work on issues and pull requests happens in periodic batches, not one-by-one as they come in.

This means that a &ldquo;simple&rdquo; issue on `elm/core` may be blocked by ongoing work on the package website or compiler, but we think this has some important and worthwhile benefits.


### Coherent Design

Issues that look &ldquo;simple&rdquo; are often much more interconnected than they seem.

Imagine there are 20 suggestions on how to make something better. Taken *individually*, each one is probably pretty easy to deal with. Taken *together*, you are talking about quite serious design changes. Does that design have a coherent vision? Is it directed at the needs of your intended users? Do all the parts fit together? Can you find a simpler design that addresses all 20 suggestions in a nicer way?

The major benefit of batching is that the review process is *structured* for coherent design. By allowing time for folks to share their experiences and suggestions, it becomes possible to consider them all together and better balance their needs. Shifting towards real-time responses on everything would necessarily degrade the overall design quality.


### Focus

Doing this kind of design work requires focus. Compiler work requires getting deeply immersed in the problems people face and the details of the code. What is needed? What is possible? Same for the package manager, the REPL, the documentation, the core packages, etc. The problem is:

1. It is not possible to be deeply immersed in all of these projects at the same time.
2. An unfocused process does not tend to produce coherent design.

Batching really helps with this. Focusing on high quality work has produced some of the best ideas in Elm. For example, while adding the `--output=json` flag, we realized that type error messages could really great. No one thought that was possible with ML-family languages before! Even the designer of Elm! Same thing happened with the parser. While improving parser performance, we realized that the parse error messages could be very dramatically improved. The very best parts of Elm have all come from focused exploration, not from rigid scheduling or unstructured online discussion.


## An Example

I think [this issue](https://github.com/elm-lang/elm-package/pull/177) shows what batching and holistic design mean in practice.

It took about a week to revamp all the error messages for `elm-package`, ultimately leading to the fix in this case. Should [Elm 0.17](http://elm-lang.org/blog/farewell-to-frp) have blocked for an extra week for this? Is it smart to have so many changes in a single release? Do these changes fit into the overall narative of the release?

In the year 2017 or 2030, users will only know if things are nice or if they suck. January or July of 2016 makes no difference to them. So waiting a few months feels like a long time to us, but it is not about us!

When a project is going to live for decades, it is better to do things *right* than to do things *right now*.

+ 249
- 0
cache/2021/626841dd876f103a10391b1b841ba5ae/index.html View File

@@ -0,0 +1,249 @@
<!doctype html><!-- This is a valid HTML5 document. -->
<!-- Screen readers, SEO, extensions and so on. -->
<html lang="fr">
<!-- Has to be within the first 1024 bytes, hence before the <title>
See: https://www.w3.org/TR/2012/CR-html5-20121217/document-metadata.html#charset -->
<meta charset="utf-8">
<!-- Why no `X-UA-Compatible` meta: https://stackoverflow.com/a/6771584 -->
<!-- The viewport meta is quite crowded and we are responsible for that.
See: https://codepen.io/tigt/post/meta-viewport-for-2015 -->
<meta name="viewport" content="width=device-width,initial-scale=1">
<!-- Required to make a valid HTML5 document. -->
<title>Host your own wikipedia backup (archive) — David Larlet</title>
<meta name="description" content="Publication mise en cache pour en conserver une trace.">
<!-- That good ol' feed, subscribe :). -->
<link rel="alternate" type="application/atom+xml" title="Feed" href="/david/log/">
<!-- Generated from https://realfavicongenerator.net/ such a mess. -->
<link rel="apple-touch-icon" sizes="180x180" href="/static/david/icons2/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/static/david/icons2/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/static/david/icons2/favicon-16x16.png">
<link rel="manifest" href="/static/david/icons2/site.webmanifest">
<link rel="mask-icon" href="/static/david/icons2/safari-pinned-tab.svg" color="#07486c">
<link rel="shortcut icon" href="/static/david/icons2/favicon.ico">
<meta name="msapplication-TileColor" content="#f0f0ea">
<meta name="msapplication-config" content="/static/david/icons2/browserconfig.xml">
<meta name="theme-color" content="#f0f0ea">
<!-- Documented, feel free to shoot an email. -->
<link rel="stylesheet" href="/static/david/css/style_2021-01-20.css">
<!-- See https://www.zachleat.com/web/comprehensive-webfonts/ for the trade-off. -->
<link rel="preload" href="/static/david/css/fonts/triplicate_t4_poly_regular.woff2" as="font" type="font/woff2" media="(prefers-color-scheme: light), (prefers-color-scheme: no-preference)" crossorigin>
<link rel="preload" href="/static/david/css/fonts/triplicate_t4_poly_bold.woff2" as="font" type="font/woff2" media="(prefers-color-scheme: light), (prefers-color-scheme: no-preference)" crossorigin>
<link rel="preload" href="/static/david/css/fonts/triplicate_t4_poly_italic.woff2" as="font" type="font/woff2" media="(prefers-color-scheme: light), (prefers-color-scheme: no-preference)" crossorigin>
<link rel="preload" href="/static/david/css/fonts/triplicate_t3_regular.woff2" as="font" type="font/woff2" media="(prefers-color-scheme: dark)" crossorigin>
<link rel="preload" href="/static/david/css/fonts/triplicate_t3_bold.woff2" as="font" type="font/woff2" media="(prefers-color-scheme: dark)" crossorigin>
<link rel="preload" href="/static/david/css/fonts/triplicate_t3_italic.woff2" as="font" type="font/woff2" media="(prefers-color-scheme: dark)" crossorigin>
<script>
function toggleTheme(themeName) {
document.documentElement.classList.toggle(
'forced-dark',
themeName === 'dark'
)
document.documentElement.classList.toggle(
'forced-light',
themeName === 'light'
)
}
const selectedTheme = localStorage.getItem('theme')
if (selectedTheme !== 'undefined') {
toggleTheme(selectedTheme)
}
</script>

<meta name="robots" content="noindex, nofollow">
<meta content="origin-when-cross-origin" name="referrer">
<!-- Canonical URL for SEO purposes -->
<link rel="canonical" href="https://dataswamp.org/~solene/2019-11-13-wikimedia-dump.html">

<body class="remarkdown h1-underline h2-underline h3-underline em-underscore hr-center ul-star pre-tick">

<article>
<header>
<h1>Host your own wikipedia backup</h1>
</header>
<nav>
<p class="center">
<a href="/david/" title="Aller à l’accueil"><svg class="icon icon-home">
<use xlink:href="/static/david/icons2/symbol-defs.svg#icon-home"></use>
</svg> Accueil</a> •
<a href="https://dataswamp.org/~solene/2019-11-13-wikimedia-dump.html" title="Lien vers le contenu original">Source originale</a>
</p>
</nav>
<hr>
<h2 id="wikipediaandopenzim">Wikipedia and openzim</h2>

<p>If you ever wanted to host your own wikipedia replica, here is the simplest
way.</p>

<p>As wikipedia is REALLY huge, you don’t really want to host a php wikimedia
software and load the huge database, instead, the project made the <em>openzim</em>
format to compress the huge database that wikipedia became while allowing using
it for fast searches.</p>

<p>Sadly, on OpenBSD, we have no software reading zim files and most software
requires the library openzim to work which requires extra work to get it as a
package on OpenBSD.</p>

<p>Hopefully, there is a python package implementing all you need as pure python
to serve zim files over http and it’s easy to install.</p>

<p>This tutorial should work on all others unix like systems but packages or
binary names may change.</p>

<h2 id="downloadingwikipedia">Downloading wikipedia</h2>

<p>The project Kiwix is responsible for wikipedia files, they create regularly
files from various projects (including stackexchange, gutenberg, wikibooks
etc…) but for this tutorial we want wikipedia:
<a href="https://wiki.kiwix.org/wiki/Content_in_all_languages">https://wiki.kiwix.org/wiki/Content_in_all_languages</a></p>

<p>You will find a lot of files, the language is contained into the filename. Some
filenames will also self explain if they contain everything or categories, and
if they have pictures or not.</p>

<p>The full French file is 31.4 GB worth.</p>

<h2 id="runningtheserver">Running the server</h2>

<p>For the next steps, I recommend setting up a new user dedicated to this.</p>

<p>On OpenBSD, we will require python3 and pip:</p>

<pre><code>$ doas pkg_add py3-pip--
</code></pre>

<p>Then we can use pip to fetch and install dependencies for the zimply software,
the flag <code>--user</code> is rather important as it allows any user to download and
install python libraries in its home folder instead of polluting the whole
system as root.</p>

<pre><code>$ pip3.7 install --user --upgrade zimply
</code></pre>

<p>I wrote a small script to start the server using the zim file as a parameter, I
rarely write python so the script may not be high standard.</p>

<p>File <strong>server.py</strong>:</p>

<pre><code>from zimply import ZIMServer
import sys
import os.path

if len(sys.argv) == 1:
print("usage: " + sys.argv[0] + " file")
exit(1)

if os.path.exists(sys.argv[1]):
ZIMServer(sys.argv[1])
else:
print("Can't find file " + sys.argv[1])
</code></pre>

<p>And then you can start the server using the command:</p>

<pre><code>$ python3.7 server.py /path/to/wikipedia_fr_all_maxi_2019-08.zim
</code></pre>

<p>You will be able to access wikipedia on the url http://localhost:9454/</p>

<p>Note that this is not a “wiki” as you can’t see history and edit/create pages.</p>

<p>This kind of backup is used in place like Cuba or Africa areas where people
don’t have unlimited internet access, the project lead by Kiwix allow more
people to access knowledge.</p>
</article>


<hr>

<footer>
<p>
<a href="/david/" title="Aller à l’accueil"><svg class="icon icon-home">
<use xlink:href="/static/david/icons2/symbol-defs.svg#icon-home"></use>
</svg> Accueil</a> •
<a href="/david/log/" title="Accès au flux RSS"><svg class="icon icon-rss2">
<use xlink:href="/static/david/icons2/symbol-defs.svg#icon-rss2"></use>
</svg> RSS</a> •
<a href="http://larlet.com" title="Go to my English profile" data-instant><svg class="icon icon-user-tie">
<use xlink:href="/static/david/icons2/symbol-defs.svg#icon-user-tie"></use>
</svg> Pro</a> •
<a href="mailto:david%40larlet.fr" title="Envoyer un courriel"><svg class="icon icon-mail">
<use xlink:href="/static/david/icons2/symbol-defs.svg#icon-mail"></use>
</svg> Email</a> •
<abbr class="nowrap" title="Hébergeur : Alwaysdata, 62 rue Tiquetonne 75002 Paris, +33184162340"><svg class="icon icon-hammer2">
<use xlink:href="/static/david/icons2/symbol-defs.svg#icon-hammer2"></use>
</svg> Légal</abbr>
</p>
<template id="theme-selector">
<form>
<fieldset>
<legend><svg class="icon icon-brightness-contrast">
<use xlink:href="/static/david/icons2/symbol-defs.svg#icon-brightness-contrast"></use>
</svg> Thème</legend>
<label>
<input type="radio" value="auto" name="chosen-color-scheme" checked> Auto
</label>
<label>
<input type="radio" value="dark" name="chosen-color-scheme"> Foncé
</label>
<label>
<input type="radio" value="light" name="chosen-color-scheme"> Clair
</label>
</fieldset>
</form>
</template>
</footer>
<script>
function loadThemeForm(templateName) {
const themeSelectorTemplate = document.querySelector(templateName)
const form = themeSelectorTemplate.content.firstElementChild
themeSelectorTemplate.replaceWith(form)

form.addEventListener('change', (e) => {
const chosenColorScheme = e.target.value
localStorage.setItem('theme', chosenColorScheme)
toggleTheme(chosenColorScheme)
})

const selectedTheme = localStorage.getItem('theme')
if (selectedTheme && selectedTheme !== 'undefined') {
form.querySelector(`[value="${selectedTheme}"]`).checked = true
}
}

const prefersColorSchemeDark = '(prefers-color-scheme: dark)'
window.addEventListener('load', () => {
let hasDarkRules = false
for (const styleSheet of Array.from(document.styleSheets)) {
let mediaRules = []
for (const cssRule of styleSheet.cssRules) {
if (cssRule.type !== CSSRule.MEDIA_RULE) {
continue
}
// WARNING: Safari does not have/supports `conditionText`.
if (cssRule.conditionText) {
if (cssRule.conditionText !== prefersColorSchemeDark) {
continue
}
} else {
if (cssRule.cssText.startsWith(prefersColorSchemeDark)) {
continue
}
}
mediaRules = mediaRules.concat(Array.from(cssRule.cssRules))
}

// WARNING: do not try to insert a Rule to a styleSheet you are
// currently iterating on, otherwise the browser will be stuck
// in a infinite loop…
for (const mediaRule of mediaRules) {
styleSheet.insertRule(mediaRule.cssText)
hasDarkRules = true
}
}
if (hasDarkRules) {
loadThemeForm('#theme-selector')
}
})
</script>
</body>
</html>

+ 85
- 0
cache/2021/626841dd876f103a10391b1b841ba5ae/index.md View File

@@ -0,0 +1,85 @@
title: Host your own wikipedia backup
url: https://dataswamp.org/~solene/2019-11-13-wikimedia-dump.html
hash_url: 626841dd876f103a10391b1b841ba5ae

<h2 id="wikipediaandopenzim">Wikipedia and openzim</h2>

<p>If you ever wanted to host your own wikipedia replica, here is the simplest
way.</p>

<p>As wikipedia is REALLY huge, you don’t really want to host a php wikimedia
software and load the huge database, instead, the project made the <em>openzim</em>
format to compress the huge database that wikipedia became while allowing using
it for fast searches.</p>

<p>Sadly, on OpenBSD, we have no software reading zim files and most software
requires the library openzim to work which requires extra work to get it as a
package on OpenBSD.</p>

<p>Hopefully, there is a python package implementing all you need as pure python
to serve zim files over http and it’s easy to install.</p>

<p>This tutorial should work on all others unix like systems but packages or
binary names may change.</p>

<h2 id="downloadingwikipedia">Downloading wikipedia</h2>

<p>The project Kiwix is responsible for wikipedia files, they create regularly
files from various projects (including stackexchange, gutenberg, wikibooks
etc…) but for this tutorial we want wikipedia:
<a href="https://wiki.kiwix.org/wiki/Content_in_all_languages">https://wiki.kiwix.org/wiki/Content_in_all_languages</a></p>

<p>You will find a lot of files, the language is contained into the filename. Some
filenames will also self explain if they contain everything or categories, and
if they have pictures or not.</p>

<p>The full French file is 31.4 GB worth.</p>

<h2 id="runningtheserver">Running the server</h2>

<p>For the next steps, I recommend setting up a new user dedicated to this.</p>

<p>On OpenBSD, we will require python3 and pip:</p>

<pre><code>$ doas pkg_add py3-pip--
</code></pre>

<p>Then we can use pip to fetch and install dependencies for the zimply software,
the flag <code>--user</code> is rather important as it allows any user to download and
install python libraries in its home folder instead of polluting the whole
system as root.</p>

<pre><code>$ pip3.7 install --user --upgrade zimply
</code></pre>

<p>I wrote a small script to start the server using the zim file as a parameter, I
rarely write python so the script may not be high standard.</p>

<p>File <strong>server.py</strong>:</p>

<pre><code>from zimply import ZIMServer
import sys
import os.path

if len(sys.argv) == 1:
print("usage: " + sys.argv[0] + " file")
exit(1)

if os.path.exists(sys.argv[1]):
ZIMServer(sys.argv[1])
else:
print("Can't find file " + sys.argv[1])
</code></pre>

<p>And then you can start the server using the command:</p>

<pre><code>$ python3.7 server.py /path/to/wikipedia_fr_all_maxi_2019-08.zim
</code></pre>

<p>You will be able to access wikipedia on the url http://localhost:9454/</p>

<p>Note that this is not a “wiki” as you can’t see history and edit/create pages.</p>

<p>This kind of backup is used in place like Cuba or Africa areas where people
don’t have unlimited internet access, the project lead by Kiwix allow more
people to access knowledge.</p>

+ 4
- 0
cache/2021/index.html View File

@@ -163,6 +163,8 @@
<li><a href="/david/cache/2021/fe75ef80663602733dbe24cc717f257b/" title="Accès à l’article dans le cache local : The race for coronavirus vaccines: a graphical guide">The race for coronavirus vaccines: a graphical guide</a> (<a href="https://www.nature.com/articles/d41586-020-01221-y" title="Accès à l’article original distant : The race for coronavirus vaccines: a graphical guide">original</a>)</li>
<li><a href="/david/cache/2021/34dbd7a73608c6cde4adf12c4a7084c0/" title="Accès à l’article dans le cache local : Batching">Batching</a> (<a href="https://github.com/elm/expectations/blob/master/batching.md#batching" title="Accès à l’article original distant : Batching">original</a>)</li>
<li><a href="/david/cache/2021/22172cf6d8f4f1e910ed6599b3557c8a/" title="Accès à l’article dans le cache local : Les élevages de visons en Chine à l’origine du Covid-19 ? Les indices s’accumulent">Les élevages de visons en Chine à l’origine du Covid-19 ? Les indices s’accumulent</a> (<a href="https://reporterre.net/Les-elevages-de-visons-en-Chine-a-l-origine-du-Covid-19-Les-indices-s-accumulent" title="Accès à l’article original distant : Les élevages de visons en Chine à l’origine du Covid-19 ? Les indices s’accumulent">original</a>)</li>
<li><a href="/david/cache/2021/809290eb60d9bda55b427919091533f0/" title="Accès à l’article dans le cache local : Which type of novelty-seeking web developer are you?">Which type of novelty-seeking web developer are you?</a> (<a href="https://www.baldurbjarnason.com/2021/which-kind-of-web-developer-are-you/" title="Accès à l’article original distant : Which type of novelty-seeking web developer are you?">original</a>)</li>
@@ -383,6 +385,8 @@
<li><a href="/david/cache/2021/9f3a8d345963dac24bef4df547fef72c/" title="Accès à l’article dans le cache local : Why light text on dark background is a bad idea">Why light text on dark background is a bad idea</a> (<a href="https://tatham.blog/2008/10/13/why-light-text-on-dark-background-is-a-bad-idea/" title="Accès à l’article original distant : Why light text on dark background is a bad idea">original</a>)</li>
<li><a href="/david/cache/2021/626841dd876f103a10391b1b841ba5ae/" title="Accès à l’article dans le cache local : Host your own wikipedia backup">Host your own wikipedia backup</a> (<a href="https://dataswamp.org/~solene/2019-11-13-wikimedia-dump.html" title="Accès à l’article original distant : Host your own wikipedia backup">original</a>)</li>
<li><a href="/david/cache/2021/5243221f38525040d87e7407b08e1ff5/" title="Accès à l’article dans le cache local : log : vol. 11, num. 19, mar. 30 mars 2021, vanuatu">log : vol. 11, num. 19, mar. 30 mars 2021, vanuatu</a> (<a href="http://shl.huld.re/~f6k/log/vol11/19-vanuatu.html" title="Accès à l’article original distant : log : vol. 11, num. 19, mar. 30 mars 2021, vanuatu">original</a>)</li>
<li><a href="/david/cache/2021/d786e761d41716e6074a9345a2610dbf/" title="Accès à l’article dans le cache local : Guillaume Rozier : le chevalier Scraper et sans reproches.">Guillaume Rozier : le chevalier Scraper et sans reproches.</a> (<a href="https://www.affordance.info/mon_weblog/2021/05/guillaume-rozier-chevalier-scraper.html" title="Accès à l’article original distant : Guillaume Rozier : le chevalier Scraper et sans reproches.">original</a>)</li>

Loading…
Cancel
Save