perseids-project / digital_milliet Goto Github PK
View Code? Open in Web Editor NEWThe Digital Milliet
Home Page: https://digmill.perseids.org
The Digital Milliet
Home Page: https://digmill.perseids.org
Should be able to cross reference between commentaries.
if you edit an entry which doesn't have images, you get a nice ui to add one, but this adds an annotation to the images [] set for the record which has an empty body (it has a dc:publisher with an empty string)
Should validate the image annotation on save and only add it if it's populated.
Reported by Spiros:
So I logged in to review entry 289 last night around 2 o'clock in the morning, and I did it successfully in terms of correcting and amending the commentary, the bibliography and the French translation. But when I tried to correct the English translation, which, by the way, was only an e-mail address to Perseus I think and not the text of the translation, the system blogged and I received the following message:
βThe server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator at [email protected] to inform them of the time this error occurred, and the actions you performed just before this error.β
Looking at the database, the entry for the english translation did not conform to the correct structure. The code assumes that if the hasBody of a translation is text then it will be a CTS URN and if not, then it will be an object with chars and lang attributes. This was neither -- it was the text of the translation Spiros entered. It should not be possible for the edit form to save an invalid data structure, so this needs to be investigated.
Also noted that some of the annotation ids seem a little weird - i.e. invalid english translation had an id of digmilann.5404602 rather than a full CITE URN.
when PerseusDL/canonical-greekLit#112 and PerseusDL/canonical-greekLit#113 are done and available in the digmill inventory we need to update the annotations that refer to these texts to use the newer CTS version
it would be good to be able to delete annotation documents from the edit ui
for easier distribution and packaging, we should to refactor the app as a flask extension
as perseus.org does not support ssl, we need to direct to the https://digmill.perseids.org address for working with features that require login. This isn't handled quite right currently.
should include digital_milliet + perseids-client-apps + mongo
Where in the model would you like me to add the link between an annotation and the model ?
[{
"@context": "http://iiif.io/api/presentation/2/context.json",
"@type": "oa:Annotation",
"motivation": [
"oa:commenting"
],
"_id": {
"$oid": "591ad46c87407e232f03fb97"
},
"on": [
{
"@type": "oa:SpecificResource",
"full": "http://gallica.bnf.fr/iiif/ark:/12148/btv1b8304485j/canvas/f1",
"selector": {
"@type": "oa:Choice",
"default": {
"@type": "oa:FragmentSelector",
"value": "xywh=5355,1538,1607,1329"
},
"item": {
"@type": "oa:SvgSelector",
"value": "<svg xmlns='http://www.w3.org/2000/svg'><path xmlns=\"http://www.w3.org/2000/svg\" d=\"M5355.44812,1625.14423l803.31731,1241.49038l803.31731,-861.74038l-686.47115,-467.38462l-920.16346,43.81731l0,87.63462l861.74038,1197.67308\" data-paper-data=\"{"strokeWidth":1,"editable":true,"deleteIcon":null,"annotation":null}\" id=\"rough_path_04b19925-49d8-4d3f-b4bf-050bd885017d\" fill=\"none\" fill-rule=\"nonzero\" stroke=\"#00bfff\" stroke-width=\"1\" stroke-linecap=\"butt\" stroke-linejoin=\"miter\" stroke-miterlimit=\"10\" stroke-dasharray=\"\" stroke-dashoffset=\"0\" font-family=\"none\" font-weight=\"none\" font-size=\"none\" text-anchor=\"none\" style=\"mix-blend-mode: normal\"/></svg>"
}
},
"within": {
"@type": "sc:Manifest",
"@id": "http://iiif.biblissima.fr/manifests/ark:/12148/btv1b8304485j/manifest.json"
}
}
],
"resource": [
{
"@type": "dctypes:Text",
"format": "text/html",
"chars": "<p>Test 2</p>"
}
]
}]
commit 22d7a4b improved language handling but we need to make a tweak to make sure the active tab gets set to the right language
Eg. if an entry has only a french translation and not an english, the english tab is active even though it's the french that is displayed.
probably a minor javascript fix is all that's required.
Different from tags, just general terminology that some people might not know. Link to from words
(Much of this will need to happen on the input side, in perseids_client_apps, https://github.com/annakrohn/perseids-client-apps)
Since there aren't as many TEI texts in the repo that show up in the CTS service, will need to collect and save the text of the passages in the json, so the display is nice and doesn't look like it is completely broken and can't pull texts.
I would even dare to say to their own damn collection :)
now that it's a single service, we should deploy the app at the root path of the server.
release as a package on pypi
Perhaps put together quick system for this as stop-gap until we can get it working in Perseids.
only a small portion of the template strings are in the messages file - the annotation entry form strings. should move the rest in and ask Valerie to provide translations.
-bibliography especially, need to add new lines at ; that end a citation, ;\s[A-Z]
-need to handle markdown
-unicode issues?
we need unit tests for all methods and routes
requested by @Marie-ClaireBeaulieu add an input element to the edit page to be able to add contributors manually to annotations.
Items to be documented:
The edit page should offer the option to edit the cts version referenced in annotation targets and annotation bodies.
the digital milliet app should use oauth2 to protect the edit and save routes.
See http://perseids-project.github.io/integrations-cookbook/clients/#oauth-explanation
It looks like the RAUTH lib for flask might be the best one to use here.
would include
dependent on #19
We should add the provenance for the annotations into the model
Author records are now stored in the db collected named according to the AUTHORS_COLLECTION
config file setting. It would be nice to externalize the names of the commentaries and mirador collections as well.
The Phase 2 work has the following main goals:
Assuming we continue with current plans for the CapiTaiNs Nemo application in Perseids, the immediate term vision for the digital milliet application would be for it (and perseids-client-apps), to be refactored as a Nemo plugins. However, given that most of the work has to take place in July and that the Nemo plugin docs need further work before they can efficiently guide developers unfamiliar with the code, we need to do this refactoring in stages.
I've setup 3 milestones in the issues list which cover goals 1 and 2, and suggest we proceed in this order:
Milestone 1: Fix outstanding bugs, add unit tests of all existing functionality and framework for documentation
Milestone 2: Refactor as Flask Extension, add missing routes, and move CTS passage retrieval from client to server.
Milestone 3: Document, package, deploy
The work in Milestones 1 and 2 will lay the groundwork to ease the eventual refactoring as a Nemo plugin without tying us to that approach in the short term.
Image support will come after Milestone 3, as will continued integration with the Perseids and CapiTaiNs infrastructure. The latter will bring along user authentication and semantic annotation, both of which are actively being worked on through Perseids in parallel with Milestones 1-3 here.
due to a change mid development, commentary targets in the data take any of the following forms
The code now always creates the last of these whenever a new commentary is added, or an existing commentary is edited.
We should clean up the data so that it's consistent, and insert the URNs when they are known.
perhaps save additional mongo docs that are just author name, works, and ids? or do I add to the current mongo docs?
Create a quick means of editing submitted entries.
we aggregate tag and semantic tag values in the input/edit form into a single input elements but selecting existing values from the typeahead overwrites multiple entries. not sure what it will take to fix this.
it would be nice if the image viewer gave some indication of whether multiple manifests are available. I can't see anyway to determine this other than by clicking on add slot
if possible it would be good to hide or remove the "Add new object from URL" option from the Mirador viewer, since we don't allow editing of the manifests in this view.
If these require changes in Mirador code, we they can be postponed to a later phase, just noting them for now.
it seems its possible for invalid cite urns to be assigned to commentary items. For example, we have this:
urn:cite:perseus:digmil.76a.c1
which was causing the app to fail in process_comm. I've caught the error now (see 78cbe7f) but we need to investigate how this occurs and prevent it.
We should add an api route to retrieve the raw data of the annotations (serialized as OA)
Bug #49 caused some duplicate entries to get inserted. Bug is fixed but the data needs to be cleaned up now.
Suggested by @PonteIneptique
add valerie's user information to pre-existing digital milliet entries
the perseids-client-apps should not include mongodb code for committing annotations -- this should be a route in the digital milliet app that the perseids-client-apps does a POST/PUT to
(e.g. this code needs to move
https://github.com/perseids-project/perseids-client-apps/blob/digmill-deployed/app/views.py#L61-L87)
might be a bug introduced by the mirador branch
it would be nice if we could hide or remove the ability for users to create new annotations on images in the mirador viewer if they aren't logged in. It seems the ability edit or delete existing annotations is alreayd triggered by that, but the new annotation features are still there. saving doesn't do anything but it also doesn't warn the user that it won't.
javascript on enter annotation page needs to work on https
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.