Code Monkey home page Code Monkey logo

openliterature.net's People

Contributors

rufuspollock avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

openliterature.net's Issues

Migrate over texts from openshakespeare.org (copy and paste?)

  • Migrate content from WP: http://blog.openshakespeare.org/ to openliterature.net
  • hmmm: some more recent blog posts not copied across - need to complete …
  • Set up word of the day
    • Make it look nice in the sidebar ...
  • Migrate across plays (see url structure)
    • We just take the main version for the present (forget all the alternate versions?)
  • Sort out front page
    • Main authors with a nice image (shakespeare, milton)
  • Get images in assets.okfn.org (and use them)
  • Change theme
  • Boot assets.openliterature.net - #10
  • Move across pdfs to there #11
  • Google analytics
  • Redirects
  • Shut down old system

Play migration

  • Shakespeare
  • Milton
  • Philosophers (??)

New url structure

  • URL structure: /{author}/{work}/
    • e.g. /shakespeare/hamlet/
    • alternative editions /{author}/{work}_version/ e.g. /shakespeare/hamlet_folio/

JSON typography files

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.

Write Vision / Overview and put in README

Vision for OpenLiterature

  • A deployment of Textus designed for hosting lots of public domain texts
  • Find, view, explore, annnotate public domain texts

Vision for Textus

See this set of slides

  • Componentized system for working with texts (especially more static texts)
  • Specifications
  • Implementation of a
    • Viewer (JS + HTML)
    • Annotation backend
    • Flat-file or more elaborate storage for texts and markup
    • Integration with Wordpress - one-click install of the above

OpenLiterature API

Can we integrate with this #4 (full text search)


API spec from Jan 2014 Sprint

API [Annotation]

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

Data Structure

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:

  • Replace user userid pointing to wordpress id?
  • Privacy and wordpress integration
    • private: false [default] / true
  • Only owner (and site administrators) can view
  • permissions - For later - but more general (so i can share with X people, with a group ...)

POST /annotation/ # create

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

POST /annotation/{id} # update

Check that current user id = id of existing annotation
And check that incoming userid = existing

GET /annotation/text/{text-id}/{start}/{end} # very specific search

  • Return all public annotations in that range
  • Return all private annotaitons in that range where userid of annotation = current user id (or user is adminstrator)

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}
]

    }

[super] The new setup: Wordpress + Textus

Step-by-Step Plan

Anticipated Basic Workflow

Tech Overview

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

Details

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 plan

Texts are processed into 2 components

  • raw text
  • syntax formatting (paragraphs, strong, em etc etc)
  • NO annotation atm

Wordpress

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>

Appendix

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.