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) /hyp//(focus|edit)= 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: {attach_id: wikitext} _attachments: {} in_wikipedia: 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: FOREIGN_KEY("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: http://sourceforge.net/projects/kiwix/files/0.9_rc2/kiwix-server-0.9-rc2-linux-armv5tejl.tar.bz2/download nginx can be used as a proxy /etc/nginx/sites-available/hyperopia.localhost server { listen 80; server_name hyperopia.localhost; location / { proxy_pass http://127.0.0.1:6986/hyper/_design/hyperopia/_rewrite/; 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" interface=wlan0 driver=rtl871xdrv ssid=HYPEROPIA hw_mode=g channel=6 macaddr_acl=0 auth_algs=1 ignore_broadcast_ssid=0 wpa=2 wpa_passphrase=hyperopia wpa_key_mgmt=WPA-PSK wpa_pairwise=TKIP rsn_pairwise=CCMP use adafruit hostapd wget http://www.adafruit.com/downloads/adafruit_hostapd.zip apt-get install dnsmasq /etc/dnsmasq.conf interface=wlan0 dhcp-range=10.0.0.2,10.0.0.99,255.255.255.0,12h /etc/network/interfaces auto lo iface lo inet loopback iface eth0 inet dhcp iface wlan0 inet static address 10.0.0.1 netmask 255.255.255.0 broadcast 255.0.0.0 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 Change: dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait to: 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