User:Tancre/Special Issue 8/The new annotating reader

From XPUB & Lens-Based wiki

The new annotated reader

I've added:

  • a reader sample to show you the system to do the thing we talked about last time. right now the css is in the html but later we can do the style.css file
  • an home page (only gramsci's link is working redirecting you to the reader sample). this is without css right now
  • a folder with the txt files of the texts formatted and ready to be translated in html with line number structure
  • a sketch of the #Process to format the text with explanations and further comments
  • some stuff to add to the bot to translate the comments #From chat to html properly and its #usage from the chat
  • you can read some stuff I'm writing and researching related to the annotated reader


Formatting text

The text's formatting process is the translation of a text (pdf,html,epub,txt) into an html page with the text in a line numbered strucutre.
1. copy the text in a txt file
2. actual formattation of the text needed to convert it in a structured html

  • first line as tile/author + empty line
  • subtitles as emptyline/line/emptyline
  • body of the text in lines with 60-70 charachters maximum.

3. the txt formatted is translated in html with a line numbered structure
4. the html with the line numbered structure is inserted in the body of an html template


To resume:


  • original text > txt (manual process) //maybe this process can be automatized by giving a link
  • txt > txt formatted (python script) //apparently this is the difficultest part, we need a set of tools to help this process
  • txt formatted > line number structure (python script) //we need to add: -first line become h1 - if emptyline/line/emptyline become h2
  • line number structure > html (python script + html template) //probably the html template can be inserted in the python script

If the 2. works, everything can be inserted in one script. Otherwise we need to keep separate 2. but we can merge 3. and 4.

Comments process

The comment process works thanks to a python bot that communicate with the xmpp chatroom. All kind of comment are admitted (img,text,pdf,audio) if it cannot be visualized, the link as a text is provided.

From chat to html

the line numbered structure works fine but it is important to:

  • insert the comment div after the closing tag sentence (it can be created a tag comment) >> see the html code of this
  • we need to add a class related to the content (text, img, video) >> see the html and css code of this
  • what happen if there are too many comments in a line?

Usage

We need to decide how can be chosed the text to comment and how to know the line (for example if I'm reading the text from a pdf or an actual book). I was thinking at those three different usages and commands to address them:

  • I want to knwo which texts are presents

command(titles) > number(X) + author + title + date
titles > 1 Gramsci - On Ideology - 1930 / 2 Marx, Engels - The Ruling Ideas - 1883 / ...

  • I want to know the line which contain this text 'text to search'

X(number of the text you want to search in) + text to search > line number(Y) or numbers
1 groups of States > 11

  • I want to comment the text x at line number y

X + Y + comment > add your comment to the chosen line
2 27 ciaociaociao > the comment is added