Skip to content

Commit

Permalink
Adding new import scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
garbit committed Oct 23, 2015
1 parent 33491e9 commit 58a2c66
Show file tree
Hide file tree
Showing 184 changed files with 27,133 additions and 2,098 deletions.
17 changes: 0 additions & 17 deletions .editorconfig

This file was deleted.

13 changes: 6 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
tmp/*
[Cc]onfig/core.php
[Cc]onfig/database.php
app/tmp/*
app/[Cc]onfig/core.php
app/[Cc]onfig/database.php
!empty
app/webroot/img/artefacts/*
*.vagrant

.vagrant/machines/default/virtualbox/private_key
app/tmp

18 changes: 18 additions & 0 deletions .htaccess
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^$ app/webroot/ [L]
RewriteRule (.*) app/webroot/$1 [L]
</IfModule>
<IfModule mod_expires.c>
ExpiresActive on
ExpiresDefault "access plus 1 month"
ExpiresByType text/cache-manifest "access plus 0 seconds"
ExpiresByType image/gif "access plus 1 month"
ExpiresByType image/png "access plus 1 month"
ExpiresByType image/jpg "access plus 1 month"
ExpiresByType image/jpeg "access plus 1 month"
ExpiresByType video/ogg "access plus 1 month"
ExpiresByType audio/ogg "access plus 1 month"
ExpiresByType video/mp4 "access plus 1 month"
ExpiresByType video/webm "access plus 1 month"
</IfModule>
73 changes: 73 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# How to contribute

CakePHP loves to welcome your contributions. There are several ways to help out:
* Create an [issue](https://github.com/cakephp/cakephp/issues) on GitHub, if you have found a bug
* Write test cases for open bug issues
* Write patches for open bug/feature issues, preferably with test cases included
* Contribute to the [documentation](https://github.com/cakephp/docs)

There are a few guidelines that we need contributors to follow so that we have a
chance of keeping on top of things.

## Getting Started

* Make sure you have a [GitHub account](https://github.com/signup/free).
* Submit an [issue](https://github.com/cakephp/cakephp/issues), assuming one does not already exist.
* Clearly describe the issue including steps to reproduce when it is a bug.
* Make sure you fill in the earliest version that you know has the issue.
* Fork the repository on GitHub.

## Making Changes

* Create a topic branch from where you want to base your work.
* This is usually the master branch.
* Only target release branches if you are certain your fix must be on that
branch.
* To quickly create a topic branch based on master; `git branch
master/my_contribution master` then checkout the new branch with `git
checkout master/my_contribution`. Better avoid working directly on the
`master` branch, to avoid conflicts if you pull in updates from origin.
* Make commits of logical units.
* Check for unnecessary whitespace with `git diff --check` before committing.
* Use descriptive commit messages and reference the #issue number.
* Core test cases should continue to pass. You can run tests locally or enable
[travis-ci](https://travis-ci.org/) for your fork, so all tests and codesniffs
will be executed.
* Your work should apply the [CakePHP coding standards](http://book.cakephp.org/2.0/en/contributing/cakephp-coding-conventions.html).

## Which branch to base the work

* Bugfix branches will be based on master.
* New features that are backwards compatible will be based on next minor release
branch.
* New features or other non backwards compatible changes will go in the next major release branch.

## Submitting Changes

* Push your changes to a topic branch in your fork of the repository.
* Submit a pull request to the repository in the cakephp organization, with the
correct target branch.

## Test cases and codesniffer

CakePHP tests requires [PHPUnit](http://www.phpunit.de/manual/current/en/installation.html)
3.7, version 4 is not compatible. To run the test cases locally use the following command:

./lib/Cake/Console/cake test core AllTests --stderr

To run the sniffs for CakePHP coding standards:

phpcs -p --extensions=php --standard=CakePHP ./lib/Cake

Check the [cakephp-codesniffer](https://github.com/cakephp/cakephp-codesniffer)
repository to setup the CakePHP standard. The [README](https://github.com/cakephp/cakephp-codesniffer/blob/master/README.mdown) contains installation info
for the sniff and phpcs.

# Additional Resources

* [CakePHP coding standards](http://book.cakephp.org/2.0/en/contributing/cakephp-coding-conventions.html)
* [Existing issues](https://github.com/cakephp/cakephp/issues)
* [Development Roadmaps](https://github.com/cakephp/cakephp/wiki#roadmaps)
* [General GitHub documentation](https://help.github.com/)
* [GitHub pull request documentation](https://help.github.com/send-pull-requests/)
* #cakephp IRC channel on freenode.org
Empty file modified README
100644 → 100755
Empty file.
48 changes: 27 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,13 @@
#Past Paths Project
The Past Paths project has developed a web platform and novel search engine encouraging people to search and discover museum objects. It has been produced by Tyne & Wear Archives & Museums, Newcastle University and Microsoft Research.

The search model for museum collections is often designed to support audiences who know broadly what they are looking for and how to look for it. This project is designed for the casual browser and delivers content that provokes unexpected discovery.

Explore Tyne & Wear Archives & Museums collection using this codebase here -http://collectionsdivetwmuseums.org.uk

Objects are presented based on how you use the site. The more you explore certain artefacts, the more related the content will be. The faster you scroll, the more random the results.

The system also provokes audiences to explore across a wide range of collections by exposing the shared metadata that connects objects.

This documentation and codebase is freely available for cultural heritage organisations to use. Commercial reuse and exploitation of this system is prohibited.

Any reuse of this codebase should credit and hyperlink ‘Powered by Past Paths discovery engine’.

Please contact john.coburn@twmuseums.org.uk with any questions about reuse.

This project is supported by the Digital R&D Fund for the Arts: Nesta, Arts and Humanities Research Council and public funding by the National Lottery through Arts Council England
The Past Paths Project is currently developing a web platform and novel search engine encouraging people to search and discover museum objects. It will creatively connect objects to rich web content and inspire new public explorations of online collections.

It will transform searching online object catalogues into a playful museum experience that connects object records to diverse online content (text, images, multimedia) from across the web and social media. Engaging, content-rich experiences will be developed that place museum objects at their core.

The search model for museum collections is traditionally designed for research audiences who know what they are looking for. This project will design for the casual browser and deliver content that provokes unexpected discovery.

Another benefit of this development will be the transformation of a static data collection into a living, evolving digital archive. User-centered systems will be developed to capture audience interaction with collections. The object record will expand to incorporate associated web content that audience search has deemed relevant and engaging. The search engine will refine its understanding of what web content and search results are most likely to encourage a user journey through museum collections.

Past Paths was one of 12 schemes selected for funding through the Digital R&D Fund for the Arts, which supports collaboration between organisations with arts projects, technology providers and researchers. The fund is a The Fund is a three way partnership between Arts Council England, the Arts and Humanities Research Council (AHRC) and innovation charity Nesta.

## How to install
You will require:
Expand All @@ -25,17 +17,31 @@ You will require:
- MongoDb + PHP MongoDB drivers
- Apache

###Vagrant
This project has a Vagrant file allowing you to automate the installation of required packages (https://www.vagrantup.com/).

Once Vagrant is installed open a terminal and head into the working directory and type vagrant up. The server will install all packages required.

Your server will be available on localhost:2200

###Importing data
You will require xml dumps from Culture Grid, place these within the app/webroot/files/artefact_xml_exports folder before running the import scripts.

After the server is live;
- Add your Alchemy API key in the bootstrap file (app/config/bootstrap.php Line 76)
- Place the LidoXML files in app/webroot/files/artefact_xml_exports
- Visit /import to import the data into mongodb, run keywords through Alchemy API, and create neo4j graph of keywords + artefacts
- Visit /import_images which will download images specified in the LidoXML and place them under app/webroot/img/artefacts/{medium, large}/{Lido Record Id}/{0..*.jpeg}
- Congratulations, the engine should be up and running. Visit localhost:2200 to start browsing.

###Data
Working collection of artefacts - Available from Culture Grid (http://www.culturegrid.org.uk)

###API Keys
- Culture Grid API Key
- Alchemy API - Available from http://www.alchemyapi.com
- Open Calais API - Available from http://www.opencalais.com


###Importing Data
You will require xml dumps from Culture Grid, place these within the app/webroot/files/artefact_xml_exports folder.
You will need to edit your alchemy API key in the bootstrap.php file (app/config/bootstrap.php Line 76)

####Images
The folder structure is as follows: /app/webroot/img/artefacts/(large/medium/small)/lidoRecID
Expand Down
34 changes: 34 additions & 0 deletions Vagrantfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Vagrant file for provisioning Bootlegger Server Dev Environment
# Run:
# vagrant up
#
# Website will be accessible on port localhost:8080
# Mongo is accessible on port 27018
#
# You will need to edit your AWS, Google and Facebook credentials in
# /vagrant/config/local.js
#
# To restart server:
# vagrant ssh
# pm2 restart app


# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure(2) do |config|
config.vm.hostname = "Past Paths Dev"
config.vm.box = "ubuntu/trusty64"
config.vm.hostname ="past-paths-dev"
config.vm.provider "virtualbox" do |v|
v.memory = 2048
end
config.vm.network "forwarded_port", guest: 80, host: 2200, auto_correct:true
config.vm.network "forwarded_port", guest: 7474, host: 7575, auto_correct:true
config.vm.network "forwarded_port", guest: 27017, host: 27018, auto_correct:true
config.ssh.shell = "bash -c 'BASH_ENV=/etc/profile exec bash'"
config.vm.provision :shell, path: "bootstrap.sh"
config.vm.synced_folder ".", "/vagrant", owner: "www-data", group: "www-data"

config.vm.post_up_message = "Past Paths Server Development Environment Started. View the README.md file for more information."
end

5 changes: 5 additions & 0 deletions app/.htaccess
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^$ webroot/ [L]
RewriteRule (.*) webroot/$1 [L]
</IfModule>
4 changes: 2 additions & 2 deletions app/Config/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@
*
*/

Configure::write('open_calais_api_key', 'ENTER YOUR API KEY');
Configure::write('alchemy_api_key', 'ENTER YOUR API KEY');
Configure::write('open_calais_api_key', 'ENTER_OPEN_CALAIS_API_KEY');
Configure::write('alchemy_api_key', 'ENTER_ALCHEMY_API_KEY');

Configure::write('db_name', 'pastpaths');

Expand Down
Loading

0 comments on commit 58a2c66

Please sign in to comment.