Hyperopia, your free encyclopedia memex thing

'''Hyperopia''' is a device based on the transitive [[principle]] that '''Reading is Writing''' and that if whole is comprised of parts then the parts should stay connected to the whole: look at something closely enough and the truth of the universe is [[Joseph Jacotot|manifest in its every detail]]. The name ''hyperopia'' refers to a (supposed) defect of vision commonly known as farsightedness.

Inspirations trace by way of [[rmo|the author's]] '''InterLace''' video studies back through the [[Memex]] and [[Project Xanadu]], weaving around [[Hypertext]], [[Ward Cunningham|wikis]], the [[World Wide Web]], and with the deepest respects paid to [[Aaron Swartz|Infogami]]. And of course the project is uniquely enabled by [[Wikipedia]].

== Local State (URL Scheme)


The focus/edit node is superimposed on top of each parent of the chain to the root, each one ever so slightly smaller as if the apex of a great pyramid.

== Global State (Document schema)

type: "wikipage" id: (|) title: wikitext: captions: {attachid: wikitext} attachments: {} inwikipedia:

type: "point" wikipage: FOREIGN_KEY("wikipage") time: parent: FOREIGN_KEY("point"|"highlight"|wikipage") link_idx:

type: "highlight" wikipage: FOREIGN_KEY("wikipage") parent: FOREIGN_KEY("point"|"highlight"|"wikipage") time: start: duration: text:

type: "image" wikipage: FOREIGN_KEY("wikipage") parent: FOREIGN_KEY("point"|"highlight"|"wikipage") time: url: im_idx:

id: printer status: (IDLE|REQUEST|PRINTING) source: FOREIGNKEY("wikipage")

== Configuration notes

mkdir hdb KIWIX_BIN=/path/to/kiwix-serve KIWIX_LIB_PATH=/path/to/kiwix/lib.xml python hyperopia.py hdb

will run the server.

[os_daemons] kiwix_serve = kiwix-serve --library --port=8000 /PATH/TO/data/library/wikipedia_en_all_nopic_01_2012.zim.xml

=== deployment

if you want to use .local domains

sudo apt-get install avahi-daemon

there's an ARM version of kiwix-serve:


nginx can be used as a proxy


server { listen 80;

 server_name hyperopia.localhost;

 location / {
     proxy_set_header Host $host;


some packages may come in handy

For the printer: sudo apt-get install python-serial python-imaging python-unidecode

& For the server sudo apt-get install python-couchdb

Captive portal

apt-get install hostapd

modify /etc/default/hostapd. The DAEMON_CONF variable was not configured, so I pointed it to a configuration file that I was about to create. DAEMON_CONF="/etc/hostapd/hostapd.conf"


use adafruit hostapd wget http://www.adafruit.com/downloads/adafruit_hostapd.zip

apt-get install dnsmasq


interface=wlan0 dhcp-range=,,,12h


auto lo

iface lo inet loopback iface eth0 inet dhcp

iface wlan0 inet static address netmask broadcast

The serial port on the Raspberry Pi's GPIO header is normally configured for console cable use. But now we want to use this port for the thermal printer instead, so we'll need to disable this default behavior.

sudo nano /boot/cmdline.txt


dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait


dwc_otg.lpm_enable=0 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait

sudo nano /etc/inittab

Comment out or delete the last line. i.e. change this:

T0:23:respawn:/sbin/getty -L ttyAMA0 115200 vt100

== See also

http://www.kiwix.org/wiki/Kiwix-serve http://learn.adafruit.com/mini-thermal-receipt-printer http://learn.adafruit.com/setting-up-a-raspberry-pi-as-a-wifi-access-point

git clone git://git.numm.org/hyperopia-thing

snapshot: hyperopia-thing.zip