Automated receipt organisation

So I’m the kind of massive nerd that scans every receipt and archives it for posterity. For the past four years I’ve been doing this manually but I’ve recently set up a system that watches a folder for any scanned documents, OCR’s them and then archives them appropriately.

The OCR step is vital because it allows me to then index the contents, making all my receipts for the last four years fully searchable. Nice! Now all that’s left for me to do is feed paper through the scanner roughly once a week.

I also scan my other mail and important documents but this is more ad-hoc (since most things come in electronically these days) so are more easily manually organised. That said you could easily use the principles for any document management system.

The other change I made from the article above is that I use pydio for central document management.

Booksonic: setting up on linux

I’ve been running booksonic for a few months now. I have had it running under a docker container as I wanted to get some experience with docker and this wasn’t really a critical application so I could deal with it being a bit buggy. Fast forward to today and I have been unhappy with the reliability of the docker setup and I’m relying more on the booksonic platform for audiobooks. I haven’t yet migrated podcasts on there but there is potential and it offers some advantages over iTunes.

All this is to say that I recently removed the docker container and set up booksonic natively through tomcat. The installation process was surprisingly easy but there is not a lot of detail about the process elsewhere online so I figured I should document the steps.


Step 1: Install tomcat

Using your package manager, install the tomcat server.

~$ sudo apt-get install tomcat8

Step 2: Prepare filesystem for booksonic

Create the booksonic folder, change ownership and permissions.

~$ sudo mkdir /var/booksonic; sudo chown tomcat8:tomcat8 /var/booksonic; sudo chmod 755 /var/booksonic

Step 3: Download booksonic package

Wget is your friend here. Make sure you check the GitHub for the latest release.

~$ cd /var/lib/tomcat8/webapps
~$ sudo wget

Step 4: Get started

All that is left is to get tomcat started and browse to the booksonic web interface. The rest of the configuration is handled through the web UI which is straightforward and documented elsewhere. I also assume that you can set up the relevant firewall rules if you are exposing the service to the internet.

~$ sudo systemctl start tomcat8

Step 5: Updates

For reference, the process for updates is essentially the same as above but without the file system changes.

~$ sudo systemctl stop tomcat8
~$ sudo rm -rf /var/lib/tomcat8/webapps/booksonic; sudo rm -rf /var/lib/tomcat8/webapps/booksonic.war
~$ sudo wget -P /var/lib/tomcat8/webapps
~$ sudo systemctl start tomcat8

Red Hat/CentOS

Step 1: Install tomcat

~$ sudo yum install tomcat

Step 2: Prepare filesystem for booksonic

~$ sudo mkdir /var/booksonic; sudo chown tomcat:tomcat /var/booksonic; sudo chmod 755 /var/booksonic

Step 3: Download booksonic package

Wget is your friend here. Make sure you check the GitHub for the latest release.

~$ cd /var/lib/tomcat/webapps
~$ sudo wget

Step 4: Get started

~$ sudo tomcat start

Step 5: Updates

~$ sudo tomcat stop
~$ sudo rm -rf /var/lib/tomcat/webapps/booksonic; sudo rm -rf /var/lib/tomcat/webapps/booksonic.war
~$ sudo wget -P /var/lib/tomcat/webapps
~$ sudo tomcat start