I wrote pair of scripts to tranfer small pieces of text information (e.g. URLs) from notebook to phone (Nokia N900) and vice versa.
qrcode - to make QR-code (using Google Chart API) and display it:
if len(sys.argv) == 1:
s = sys.stdin.read()
s = sys.argv
webbrowser.open("http://chart.apis.google.com/chart?chs=300x300&cht=qr&chl=%s" % (urllib.quote(s, safe="")))
I put this script both on the phone and on the notebook.
$ qrcode < file
$ qrcode text
Reading of the QR-code - on the phone I use mBarCode.
On the notebook - qrread:
trap 'xclip /tmp/qr -selection clipboard' 2
zbarcam --raw -q | tee /tmp/qr
I installed "zbar" program, for gentoo it is in "bircoph" overlay.
If you don't want to watch image from camera, you should uncomment "--nodisplay" parameter.
As soon as recognized text appears in console, you should press Ctrl-C, and it will be in clipboard.
I transferred the source of qrcode from phone to notebook using this method, for example.
I will change scripts to not using Google (offline). UPD: Done
is licensed under a
Creative Commons Attribution 3.0 Unported License.
© Anton Novosyolov |
Matthew James Taylor