August 2, 2020

SikuliX on Linux - vision based automation

http://sikulix.com

It's a vision based automation tool, you give an image, it will find a match and do automation.  It's a great open source tool.

I used this on Windows, and now my main OS is Ubuntu, and this is some information and note on it.  It uses OpenCV and Tesseract OCR.

https://avleonov.com/wp-content/uploads/2017/02/script_window.png

Install On Ubuntu 20.04

Installing and using SikuliX on Window is simple and straightforward.  On Linux (Ubuntu 20.04 for my case), it needs little bit more work.

Requirements
  • OpenCV
  • Tesseract OCR
  • Java 11 or later

1. Download SikuliX

Download it from https://raiman.github.io/SikuliX1/downloads.html
or do
$ wget https://launchpad.net/sikuli/sikulix/2.0.4/+download/sikulixide-2.0.4.jar

2. Install Java 11 or later
  • This will not work with Java8. 
  • OpenJDK works fine.
  • Dealing with multiple Java versions: I have Java 8, 11, 14, and Oracle JDK8 as well.  My default Java is set to 8.  To run this software with Java 14, I used bash script, and added using Alacarte (https://en.wikipedia.org/wiki/Alacarte)
3. Install/Set up OpenCV, Tesseract OCR

$ sudo apt-get install libopencv4.2-java libopencv4.2-jni
$ sudo apt-get install tesseract-ocr

$ cd /usr/lib/jni/
$ sudo ln -s libopencv_java420.so libopencv_java.so


4. Bash script

#!/usr/bin/bash
JAVA_HOME=/usr/lib/jvm/java-14-openjdk-amd64
SIKULIX_HOME=/opt/sikulix
SIKULIX_JAR=sikulixide-2.0.4.jar
LOG=$SIKULIX_HOME/sikulix.log
$JAVA_HOME/bin/java -jar $SIKULIX_HOME/$SIKULIX_JAR >> $LOG 2>&1


SikuliX Resources

Other Resources

Other opensource or free automation tools

July 29, 2020

[dev note] anaconda and uwsgi

conda search doesn't show uwsgi, and pip install fails with various python versions.

Finally found the solution after a couple of days of frustration --
https://anaconda.org/conda-forge/uwsgi

conda install -c conda-forge uwsgi

July 27, 2020

Joplin - Onenote, Evernote replacement

About 10 years or so ago, I wrote a posting on Evernote when it was new and shiny.  Back then it was revolutionary, before Onenote added feature for sharing across multiple devices.

After it started to charge more than I'm willing to pay, and limiting storage spaces, I stopped using it.  And OneNote started to offer the same features and I had/still have license for it.  OneNote is free now, I believe.  I stopped using it as well -- I didn't like some of its features and how it works.

Since then I've been using just text editor and share the note via cloud services, gave up finding alternative solutions.

There is Joplin - https://joplinapp.org/
Open Source, free, available for all OS and mobile devices, and sync via cloud services.  I like that I have the control how/where my notes are stored/sync'd.

Joplin Adds Experimental WYSIWYG Editor



Some notes on Ubuntu


If Joplin is installed through SNAP, due to SNAP's security model, it has some limitation where notes are stored/backed up for directory sync.

Notes are stored in /home/$USER/snap/joplin-james-carroll/13/.config/joplin-desktop
(See this by going to Tools > General)  I don't think this location can be changed -- at least I haven't found how.

If sync to directory, due to SNAP model, this directory cannot be outside of user home directory.  Sym link won't work.



Installer versions

If preferred, use Desktop installer version.  There is no restriction which directory you want to sync (backup).

wget -O - https://raw.githubusercontent.com/laurent22/joplin/master/Joplin_install_and_update.sh | bash

Installer version stores the notes in, ~/.config/joplin-desktop

For terminal version of Joplin, https://joplinapp.org/terminal/

$ NPM_CONFIG_PREFIX=~/.joplin-bin npm install -g joplin
$ sudo ln -s ~/.joplin-bin/bin/joplin /usr/bin/joplin


Terminal version stores the notes in, ~/.config/joplin

Removing Installer version

Desktop version
$ rm ~/.joplin
$ rm ~/.local/share/applications/appimagekit-joplin.desktop

Remove note files and configuration
$ rm ~/.config/joplin-desktop

Terminal version,
$ sudo rm /usr/bin/joplin
$ rm -rf ~/.joplin-bin

To remove note files,
$ rm ~/.config/joplin


Warning on Desktop Joplin on Ubuntu 20.04

This is for both SNAP and installer versions for Desktop Joplin.

Tools > Options > Application, there is "Show tray icon".  This doesn't work for me.  If checked, and close the Joplin window by click on "X" button, it disappears but stay in memory.  Only way to get it back is run Joplin again.  You have to File > Quit to properly quit the application.  If "Show tray icon" is not checked off, closing Joplin window by clicking on "X" button will quit the application.