root

Sailfish Scanner

ta tool to crop an Image(or camera photo) of a text page.

Written entirely in qml/pyOtherside, it uses wheeled python libraries(numpy,pillow) for the imaging part. It's not as pretty as it could be, but functional ;-)

Source code is up on hub.darcs

Contributions are very Welcome. Possibly this could become a more sophisticated imaging app for Sailfish/Jolla

I used this template to build the app instead of the SailfishOS-IDE: Sailfish-Python

Build Dependencies:

these packages are needed to build/install the Sailfish-Scanner: fpm -- to package a a root tree from a temporary directory to a rpm package

in pyPackages, you need to provide wheeled packages for:

  • numpy - linear equation solving
  • pillow - imaging
  • reportlab - pdf output

build them on the archetecture you want to deploy, and extract them in a Directory with a proper suffix, i.E.:

  • numpy-armv7hl
  • pillow-i686
  • reportlab-i686

the directories should also contain a empty __init__.py so python can import there

Make Commands:

use these make commands to build/install your app for testing:

make make-virt

builds your package, and installs it on your Sailfish Emulator on localhost:2223, considering your Sailfish-SDK is installed at ~/SailfishOS

make make-jolla-wifi [jolla_wifi_ip=jolla]

builds your package, and installs it on your jolla phone, considering your development PC is authorized for root ssh login on the phone and it is found in your dns-space as "jolla"

make make-jolla-usb [jolla_usb_ip=172.28.172.1]

builds your package, and installs it on your jolla phone, considering your development PC is authorized for root ssh login on the phone, and connected via usb for development mode

Adding python Modules:

all python Modules should be placed in pyPackages I like to keep both an armv7l and a x86 version in pyPackages , and package the one with the corresponding $(arch)-suffix at packaging. Select the package version within the qml code. I had success using pip wheel to build these packages directly on the jolla phone(armv7hl)/sailfish emulator(x86) and unpacking them to pyPackages.

Renaming your App:

/renamep.py "my-new-appname"