PySQMWeb is a simple Ruby/Sinatra (web) application to display image and data files generated by PySQM. This web app is built with awesome idea of two projects: web-intro-project and tutsplus-build-an-image-gallery-in-ruby.
-
Let's suppose your working directory right now is your user home directory, so clone the repository:
$ cd $ git clone https://github.com/andisugandi/pysqmweb.git
-
Change working directory to
pysqmweb
:$ cd pysqmweb
-
Make
public/pictures
andpublic/data
directory:$ mkdir public/pictures $ mkdir public/data
-
If your SQM image and data files generated by PySQM are in
$HOME/PySQM/data/daily_plots/
and$HOME/PySQM/data/daily_data/
respectively, then make symbolic link to$HOME/pysqmweb/public/pictures/
and$HOME/pysqmweb/public/data/
respectively:$ ln -s $HOME/PySQM/data/daily_plots/* $HOME/pysqmweb/public/pictures/ $ ln -s $HOME/PySQM/data/daily_data/* $HOME/pysqmweb/public/data/
-
Install Ruby Gems dependencies and start the web server:
$ bundle install $ bundle exec rackup
-
Using a browser, go to
http://localhost:9292
and you'll see the application running.