Quantcast
Viewing all articles
Browse latest Browse all 11144

Use smart phone to convert web page to epub and send to Kobo Touch over WIFI

A smart phone is good to browse your favourite stomping grounds on the web, and select what you want to read. An ebook reader is perhaps where you would like to actually chew the cud at leisure. (This harks back to the original cow-related meaning of 'to browse').

Dotepub.com provides a bookmarklet-based utility that .. "digests :)" .. web articles into epub files. So I have been looking for a good way to implement this route :
[web/html] --> [epub] --> [smart phone] --> [Kobo Touch].

In this post, I have pulled together a set of ideas and tips (none of them is my own, btw) that dovetail nicely to achieve the above goal.

[1] Installing the dotEpub bookmarklet on your smart phone:
DotEpub works through a bookmarklet that you install by drag-and-drop.
Opera, opera mini and chrome for Android (to name some examples) do not support drag and drop setup of a bookmarklet. You have to create one manually by pasting the bookmarklet's javascript code into the bookmark dialog's URL box.

[2] Running the bookmarklet while viewing the page you want:
The browsers named above do not run the bookmarklet within the current document's context if you go through Menu --> Bookmarks --> Click on bookmark. Therefore, nothing happens if you try this. There is a workaround that is good in Chrome. Let's say the bookmarklet is named "dot-epub". Just start typing d..o..t.. in the url box, and the browser will show a suggestion list that should have "dot-epub" right near the top. Click on this, and you will soon see the nice green banner from dotepub.com across the top of the page. You will be able to download the epub to your default download folder.

[3] Preparing the Kobo to receive the epub:
My device has been plagued by Wifi issues (and I believe I am not alone in this situation). So I wanted a solution that did not involve cloud/web access through the built-in toy browser and Nickel's nightmarish wifi setup experience.

I already had USBNET working - activated via the Launcher hack from this forum. I modified the USBNET script so that it would activate Wifi instead, and added the new script to my Launcher menu. This results in a 100% connection success rate, and it avoids the "success.html" problem. The script also starts up dropbear (the sftp server). (See end of this post).

At this point, I had thought of installing the http client 'curl'. But wait - there's a better way :

[4] Preparing the Phone to send the epub to Kobo:
Installed ES File Explorer (which most users would probably want on their phones anyway). Apart from many other useful things, this app can take an SFTP server (e.g. dropbear on kobo) and represent it as virtual folder that you can seamlessly explore in the phone. Next, enable the wifi hotspot in the phone.

.................

To actually transfer an epub to your reader, Dear Reader, all you do is the
following:

[1] Run the Wifi setup script via Launcher and have it connect to the phone's wifi hotspot.

[2] Use the file manager app on the phone to drop files into the Kobo.

Cheers,
Swamp Thing.

Launcher Script to enable wifi:
Spoiler:
#!/bin/sh

root=$ROOT/usbnet


if [ -f /var/run/dropbear.pid ]
then

kill `cat /var/run/dropbear.pid`
msgbox "dbear" "$?"


wlarm_le -i eth0 down
msgbox "wlarm" "$?"

/sbin/ifconfig eth0 down
msgbox "ifcfg" "$?"

/sbin/rmmod sdio_wifi_pwr.ko
/sbin/rmmod dhd
msgbox "WiFi.." "WiFi Stopped!"
else

# You may need to use the freescale drivers instead; see original Launcher script and notes

/sbin/insmod /drivers/ntx508/wifi/dhd.ko
msgbox "dhd" "$?"

/sbin/insmod /drivers/ntx508/wifi/sdio_wifi_pwr.ko
msgbox "wifi" "$?"

# /sbin/ifconfig eth0 192.168.1.50
/sbin/ifconfig eth0 up
msgbox "ifcg" "$?"

wlarm_le -i eth0 up
msgbox "wlarm" "$?"

wpa_supplicant -i eth0 -c /etc/wpa_supplicant/wpa_supplicant.conf -B
sleep 4
erz="$?"
msgbox "wpa" $erz

/sbin/udhcpc -S -i eth0 -s /etc/udhcpc.d/default.script -t15 -T10 -A3 -f -q
aa='dhcp status '

msgbox "dhcp" $aa$?

if [ $erz -ne "0" ] ; then
msgbox "wpa" "error!"
exit 1
fi
[ ! -e /usr/libexec/sftp-server ] && (mkdir -p /usr/libexec; ln -s $root/sftp-server /usr/libexec/sftp-server)
$root/dropbear -E -r $root/host.key.rsa -d $root/host.key.dss > $root/dropbear.log 2>&1
msgbox "dbear" "$?"
fi



Wifi setup file -- /etc/wpa_supplicant/wpa_supplicant.conf:
Spoiler:
ctrl_interface=/var/run/wpa_supplicant
update_config=0

network={
ssid="-- your ssid --"
scan_ssid=1
key_mgmt=WPA-PSK
psk=** key that you create, see here: http://ubuntuforums.org/showthread.php?t=263136 **
}

Viewing all articles
Browse latest Browse all 11144

Trending Articles