rufuspollock-okfn / openliterature.net Goto Github PK
View Code? Open in Web Editor NEWFor OpenLiterature.net
Home Page: http://openliterature.net/
For OpenLiterature.net
Home Page: http://openliterature.net/
Use elasticsearch + PHP bindings ...
The media uploader explicitly blocks the loading of JSON files via the uploader. We need to find a better way of storing these to load back via the API.
Is it still working? https://github.com/okfn/annotator-wordpress
See this set of slides
Can we integrate with this #4 (full text search)
cf. http://okfnlabs.org/textus/doc/api.html
Base location:
/api/textus/1
The API returns JSON
GET /annotation/text/{text-id}/{start}/{end} # very specific search
GET /annotation/?text=text-id&start=&end= # search
POST /annotation/ # create
POST /annotation/{id} # update
Other items (Not sure we need yet):
GET ol.net/api/textus/1/annotation/{id} # get annotation
GET ol.net/api/textus/1/text/{id}/ # get text
Database table in e.g. wordpress named:
textus_annotation
{
"start" : 300,
"end" : 320,
"type" : "textus:comment",
"userid" : [wordpress-id]
"private": false
"date" : "2010-10-28T12:34Z",
"payload" : {
"lang" : "en"
"text" : "Those twenty characters really blow me away, man..."
}
"start" : 0,
"end" : 3095,
"type" : "textus:source",
"userid" : [wordpress-id]
"date" : "2010-10-28T12:34Z",
"payload" : {
"type" : "textus:scanned-image",
"url" : "http://my.transcription.site/texts/mytext/pages/1.html",
"data-url" : "http://my.transcription.site/texts/mytext/pages/1/image.png" }
Questions:
POST an annotation object but no userid (wordpress will add that) and type will be auto added as textus:comment
{
"start" : 300,
"end" : 320,
"date" : "2010-10-28T12:34Z",
"payload" : {
"lang" : "en"
"text" : "Those twenty characters really blow me away, man..."
}
Will write to DB table
Check that current user id = id of existing annotation
And check that incoming userid = existing
Return format looks like:
{
status: HTML style codes
error: 'string'
total:
results: [
"start" : 300,
"end" : 320,
"type" : "textus:comment",
"userid" : [wordpress-id]
"private": false
"date" : "2010-10-28T12:34Z",
"payload" : {
"lang" : "en"
"text" : "Those twenty characters really blow me away, man..."
} & so on
,
{annotation}
]
}
Here's the repo for it: https://github.com/okfn/textus-wordpress
URL: assets.openliterature.net ...
Basic idea: "Textus" system - that's Wordpress with Textus plugins. For overview and intro see:
http://okfnlabs.org/blog/2013/03/27/next-steps-for-textus.html
This google drawing shows the technical architecture
This drawing shows the overview of how the web app could work
## Components - textus-viewer - textus-formatter - wordpress plugin ## Core planTexts are processed into 2 components
On wordpress page: /shakespeare/hamlet/
In the page we have shortcode:
[textus:url] url = url or raw text url.typography.json = typography formatting
Replace [textus:url] is replaced by
<div id=”raw”>
raw text
</div>
<script src=”textus-viewer.js”></script>
<script type=”text/javascript”>
var textusTypography = typography;
// now boot textus viewer
viewer = new Viewer(rawText, typography);
</script>
</pre>
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.