Giter VIP home page Giter VIP logo

scribeui's Introduction

ScribeUI

ScribeUI is an application to create mapfiles with many scale levels.

To get the latest release, clone this repo and then checkout tags/v0.2

If you are updating from a previous version, please follow the migration instructions at the end of this document before checking out.

Requirements

  • Apache
  • Python (tested with 2.7.3 only)
  • Mod WSGI
  • Flask
  • MapServer (version 6.0 or higher)
  • Sqlite3

You can install them using aptitude and pip:

sudo apt-get install apache2 libapache2-mod-wsgi cgi-mapserver sqlite3
sudo pip install Flask

Configuration

  • Make a copy of the application/runserver.dist.wsgi file as application/runserver.wsgi and edit it. Change the path accordingly.

    cp application/runserver.dist.wsgi application/runserver.wsgi
    vim application/runserver.wsgi
    
  • Make a copy of the config.dist.py file as config.py and edit it. Change the ip variable accordingly.

    cp config.dist.py config.py
    vim config.py
    
  • To reset the sqlite3 database, open a python shell as admin from the the application directory:

    cd application
    sudo python
    

    in the python shell:

    from init import init_db
    init_db()
    
  • Place elfinder-python in your cgi-bin repository (/usr/lib/cgi-bin)

    sudo cp -ap elfinder-python /usr/lib/cgi-bin/
    
  • The owner of the the db folder and the workspace folder must be the current user or www-data if the application is on a server:

    sudo chown -R www-data application/db application/workspaces \
    application/www /usr/lib/cgi-bin/elfinder-python/
    
  • Run the makefile to download the data

    make
    

Apache configuration

In /etc/apache2/sites-enabled/ScribeUI.conf, use the following configuration (change the path):

#ScribeUI     

WSGIScriptAlias /ScribeUI /opt/apps/ScribeUI/application/runserver.py
AddType text/html .py
<Directory /opt/apps/ScribeUI/application/templates>
  Order deny,allow
  Allow from all
</Directory>

Alias /ScribeUI/download/ "/opt/apps/ScribeUI/application/www/"
<Directory "/opt/apps/ScribeUI/application/www/">
  AllowOverride None
  Options Indexes FollowSymLinks Multiviews
  Order allow,deny
  Allow from all
</Directory>

Note: if there are segfaults in the apache error logs after adding this config, it is fixed by restarting apache.

Version Update and Workspace Migration

If you are updating your version of ScribeUI from an earlier version to 0.2, please follow these instructions:

  • Change the owner of the database and workspace folders back to yourself:

      sudo chown -R yourusername application/db application/workspaces 
    
  • Checkout the latest release of ScribeUI

      git checkout tags/v0.2
    
  • Run the update script:

      python application/update.py 
    
  • Change the owner of the database and workspace back to www-data:

      sudo chown -R www-data application/db application/workspaces 
    
  • (optionnal) Restart apache:

      sudo /etc/init.d/apache2 restart
    

If you choose not to restart apache, the new version of ScribeUI might take a while to go live because of mod_wsgi.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.