-
Notifications
You must be signed in to change notification settings - Fork 1
Home
Thibault Clérice edited this page Jun 23, 2017
·
5 revisions
Welcome to the leipzig_cts wiki!
Login to cts.dh.uni-leipzig.de
# We need to cut the server just in case
/etc/init.d/gunicorn stop
# We go to the capitains APP server
cd /local/www-data/capitains-app
# We flush the database
sudo venvs/bin/python manager.py flush_both
# We parse the inventory
sudo venvs/bin/python manager.py parse
# We can parse the references as well, to speed up the first accesses
sudo venvs/bin/python manager.py process_reffs
# We make sure REDIS saved everything
sudo redis-cli SAVE
# We restart the server
sudo /etc/init.d/gunicorn restart
- Go to https://github.com/OpenGreekAndLatin/leipzig_cts/blob/master/modules/capitains/templates/requirements-py3.txt.erb
- Find the line starting with
-e git+https://github.com/OpenGreekAndLatin/cts_leipzig_ui.git
- In this line, replace the hash. For example,
-e git+https://github.com/OpenGreekAndLatin/cts_leipzig_ui.git@a3a09fc#egg=cts_leipzig_ui
could become-e git+https://github.com/OpenGreekAndLatin/cts_leipzig_ui.git@abcabcf#egg=cts_leipzig_ui
- Commit.
- Go to https://github.com/OpenGreekAndLatin/leipzig_cts/blob/master/data/common.yaml
- In this file, find
capitains::repos:
- name: 'canonical-latinLit'
cibase: 'PerseusDL/canonical-latinLit'
- Add a new line with the following scheme (repositoryName and repositoryOwner refer to github infos)
capitains::repos:
- name: 'repositoryName'
cibase: 'repositoryOwner/repositoryName'
- If this new corpus includes a new namespace, see New namespace
- Open https://github.com/OpenGreekAndLatin/leipzig_cts/blob/master/modules/capitains/templates/app.py.erb . This file is a python script that will be completed for some variable by puppet with Ruby.
- Find the dispatcher function that has the decorator for your collection. If you are dealing with latin litterature, this would be
@dispatcher.inventory("urn:perseus:latinLit")
@dispatcher.inventory("urn:perseus:latinLit")
def dispatchLatinLit(collection, path=None, **kwargs):
if collection.id.startswith("urn:cts:latinLit:"):
return True
return False
- Simply had a statement that will return True. The collection object is a MyCapytain collection object
- Create a new Prototype text inventory following by adding this line at the top of the file but after
tic = TextInventoryCollection()
following the example
fro = PrototypeTextInventory("urn:perseus:froLit", parent=tic)
fro.set_label("Ancient French", "eng")
fro.set_label("Ancien Francais", "fre")
- Create a new Dispatcher filter sending to this PrototypeTextInventory
@dispatcher.inventory("urn:perseus:froLit")
def dispatchFroLit(collection, path=None, **kwargs):
if collection.id.startswith("urn:cts:froLit:"):
return True
return False
cd /local/www-data/capitains-app
# Example : MyCapytain
sudo venvs/bin/pip install --upgrade MyCapytain
#Restart the server
sudo /etc/init.d/gunicorn restart