Development Guide - Pastafarians/linguine GitHub Wiki
NOTE: Please see this page for Linguine's current version.
This is a guide for adding new functionality to Linguine!
The default corpora that new users will see when logging in for the first time are located in /linguine-node/assets/corpora/
. To add a new corpus, simply copy and paste it into this directory and then follow these steps:
- Open the file
/linguine-node/routes/auth.js
in the text editor of your choice. - On line 32 of this file there is an array of strings:
var files = ['1928 News article', '2015 News article',
'My Bondage and My Freedom excerpt',
'Romeo and Juliet excerpt', 'The Raven',
'Tom Sawyer excerpt'];
- Add the exact filename of your new corpus to this list.
- Repackage the node modules:
sudo node_modules/gulp/bin/gulp.js build
- Restart the node service:
sudo service linguine-node restart
NOTE: Users that have logged into Linguine before will not see new corpora automatically. Their accounts must be removed from the database in order for them to see changes. This can be done with the following set of commands (before Step 4), but make sure the user has copies of the corpora they updated, as all corpora and analyses associated with the user will be deleted.
mongo
> db.users.remove({"dce":"valid_username"})
Coming soon!