SwissGuesser | Read-only mirror of https://github.com/geoadmin/mf-swissguesser — Bundesamt für Landestopografie swisstopo. Issues & pull requests at the source.
  • JavaScript 57.5%
  • CSS 17.1%
  • HTML 10.7%
  • Less 9.6%
  • TypeScript 2.9%
  • Other 2.2%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2015-11-13 15:53:36 +01:00
apache do not cache anything for now 2014-03-26 15:33:01 +01:00
buildout adding missing dir 2014-03-13 13:38:21 +01:00
deploy add new int target 2015-11-13 15:52:41 +01:00
swissguesser update target definition, metadata and config for stormymap9 2015-02-04 15:50:34 +01:00
test Project setup 2013-08-15 15:27:15 +02:00
util Fixing View2d + shorten url address 2015-02-04 09:00:08 +01:00
.editorconfig Initial scaffold 2013-08-15 14:13:13 +02:00
.gitattributes Initial scaffold 2013-08-15 14:13:13 +02:00
.gitignore photos for swissguesser5 2014-09-19 15:10:20 +02:00
.jshintrc Initial scaffold 2013-08-15 14:13:13 +02:00
bootstrap.py add minimal buildout system 2014-03-11 18:25:25 +01:00
buildout.cfg removing all references to grunt, bower and co 2014-03-25 18:05:46 +01:00
buildout_dev.cfg buildout is needed to generate the .ini files 2014-03-25 17:36:04 +01:00
CHANGES.txt add minimal buildout system 2014-03-11 18:25:25 +01:00
package.json downloading missing image from source 2014-03-16 17:29:57 +01:00
README.md Update README.md 2014-09-12 09:51:09 +02:00
setup.py add minimal buildout system 2014-03-11 18:25:25 +01:00
storymap5.cfg configure buildout to do noting on deploy 2014-03-21 11:24:14 +01:00
storymap8.cfg adding storymap8 - Luftseilbahn 2014-03-25 22:23:56 +01:00
storymap9.cfg update target definition, metadata and config for stormymap9 2015-02-04 15:50:34 +01:00
storymap10.cfg configure buildout to do noting on deploy 2014-03-21 11:24:14 +01:00

SwissGuesser

Swissguesser multi-projects. This is a subset of storymaps. For a description of all Storymaps available, see https://github.com/geoadmin/web-storymaps/blob/master/README.md

1/ Install and deploy

If you do not update the data, you may simply clone the project from the repository, copy the images file (see subproject specific below) and deploy it:

cd /var/www/vhosts/mf-swissguesser/private

git clone git@github.com:geoadmin/mf-swissguesser.git swissguesser

cd swissguesser

python bootstrap.py --version 1.5.2 --distribute --download-base http://pypi.camptocamp.net/distribute-0.6.22_fix-issue-227/ --setup-source http://pypi.camptocamp.net/distribute-0.6.22_fix-issue-227/distribute_setup.py

buildout/bin/buildout install template

cat "Include /var/www/mf-swissguesser/private/swissguesser/apache/*.conf" > /var/www/mf-swissguesser/conf/99-swissguesser.conf

sudo apache2ctl graceful

sudo -u deploy deploy -r deploy/deploy.cfg int   # or prod

2/ Updating data

To update a project, you need to install the buildout environment, update the configuration file MetadatenAufnahme.csv and translation file translation.csv, and generate the new project JSON files

cd /var/www/vhosts/mf-swissguesser/private

git clone git@github.com:geoadmin/mf-swissguesser.git swissguesser

python bootstrap.py --version 1.5.2 --distribute --download-base http://pypi.camptocamp.net/distribute-0.6.22_fix-issue-227/ --setup-source http://pypi.camptocamp.net/distribute-0.6.22_fix-issue-227/distribute_setup.py

buildout/bin/buildout -c <project buildout>.cfg

sudo apache2ctl graceful

Subproject specific

Each subproject has two main .csv configurations files, which are used to generate the JSON files used by the application:

  • MetadatenAufnahme.csv, the list of images to display
  • translation.csv, obviously for internationalization of the user interface

These two files are used to generate the base.jsonfor the former, and the files in the localedirectory for the latter. The buildout commands are, respectively with buildout install convert-csvand buildout install translate-csv.

In MetadatenAufnahme.csv, the four Legend columns may contain plain text, html entities or link to an external file. Using the convert-csv buildout part, if you provide a downloadUrlon as an argument, the images will be linked instead of beeing downloaded.

Storymap5 (BAR)

The original one! This GeoAdmin Story Map is an interactive game to guess historical locations from the Swiss National Archive on a Swisstopo map of Switzerland.

http://storymaps.geo.admin.ch/storymaps/storymap5

Storymap8 (BAK)

Switzerland is the cable car country par excellence.

http://storymaps.geo.admin.ch/storymaps/storymap8

  • Use plain MetadatenAufnahmei.csv and translation.csv

  • Images have to be copied to the images\photos directory (original source ?)

  • Generate the project with:

    ./buildout/bin/buildout -c storymap8.cfg install convert-csv
    ./buildout/bin/buildout -c storymap8.cfg install translation-csv
    ./buildout/bin/buildout -c storymap8.cfg install templify
    
  • Commit your changes

Storymap9 (KGS)

Protection of cultural property inventory

http://storymaps.geo.admin.ch/storymaps/storymap9

  • Images are linked to the dav0 server

  • Explanations text and the copyright information are scraped from map.geo.admin.ch htmlPopup and the meta.txt file using the util\kgs_scraper.py script

  • The MetadatenAufnahme.csv has to be generated from the MetadatenAufnahme.csv.template using the util\kgs_scraper.py script

  • Generate the project with:

    ./buildout/bin/python util/kgs_scrapping.py swissguesser/static/storymap9/data/MetadatenAufnahmen.csv.template
    ./buildout/bin/buildout -c storymap9.cfg install convert-csv
    ./buildout/bin/buildout -c storymap9.cfg install translation-csv
    ./buildout/bin/buildout -c storymap9.cfg install templify
    
  • Commit your changes

Storymap10 (LUBIS)

Historic aerial view

http://storymaps.geo.admin.ch/storymaps/storymap10

  • Images have to be copied to static\storymap10\data\photos

  • Explanations are linked to map.geo.admin.ch popup

  • The MetadatenAufnahme.csv has to be generated from the MetadatenAufnahme.csv.template using the util\lubis_scraper.py script

  • Generate the project with:

    ./buildout/bin/python util/lubis_scrapper.py swissguesser/static/storymap10/data/MetadatenAufnahmen.csv.template
    ./buildout/bin/buildout -c storymap10.cfg install convert-csv
    ./buildout/bin/buildout -c storymap10.cfg install translation-csv
    ./buildout/bin/buildout -c storymap10.cfg install templify
    
  • Commit your changes