Installing ChemSpider Plugin for LabTrove
The ChemSpider plugin for LabTrove is designed to scan the content of a blog post to extract keywords (using OSCAR), which it then sends off to ChemSpider to retrieve information about each keyword. This is then displayed as a list of keywords underneath the blog post that when clicked display ChemSpider information about that keyword in page.
- Install Java.
sudo apt-get install openjdk-6-jre
- Download OSCAR to /usr/local/bin/.
sudo wget http://maven.ch.cam.ac.uk/m2repo/uk/ac/cam/ch/wwmm/oscar/oscar4-all/4.1.2/oscar4-all-4.1.2-with-dependencies.jar -O /usr/local/bin/oscar4-all-4.1.2-with-dependencies.jar
- From the LabTrove base directory, import the MySQL tables for the ChemSpider plugin.
mysql -u root -p labtrove < install/sql/update-chemspider.sql
- Enable ChemSpider plugin in config.php by adding chemspider to $ct_config['plugins']. If you decide to download to a location other than /usr/local/bin/ or download a different version of OSCAR, you will need to adjust $ct_config['chemspider']['oscar_path'] and/or $ct_config['chemspider']['oscar_jar'] appropriately.
- Register for an account on ChemSpider: http://www.chemspider.com/controls/Login/RegForm.aspx
- Once your account is enabled login and go to: http://www.chemspider.com/UserProfile.aspx
On this page there should be a field labelled Security token, copy this down.
- Edit config.php once again and enter the security token copied previously into $ct_config['chemspider']['security_token'].
Using the ChemSpider Plugin
PROPOSED: When you create a new blog you can choose whether by default you want posts to be examined for keywords that are then looked up in ChemSpider. For each blog post you can decide whether to use the ChemSpider plugin when you publish a post. The ChemSpider plugin only sends the keywords it has extracted locally to the remote ChemSpider service. However, if you are concerned about even a list of keywords being sent to an external service you should opt not to use ChemSpider plugin for these posts.
When you publish a post that has been set to use the ChemSpider plugin. The post should save and be displayed almost immediately. However, the ChemSpider Info section takes a while to be generated, so this will initially appear empty. If you wait 30 seconds or so and refresh the page the ChemSpider Info section should display the keywords extracted and the accompanying ChemSpider properties for each keyword.