Description of iRock requirements
Functionality
iRock is an Free/Libre Open Source Software (FLOSS) standalone Javascript application (in an .html file; possible importing other Javascript libraries, e.g. JQuery, YAML parsing functionality, etc) that can be used to code .rock files (plain text files) using the ROCK conventions. Specifically, it has the following view and control functionality:
- A file can be 'uploaded' to the script (preferably, 'dropable' in a dedicated area, possibly in a modal form opened by a button). This file is then parsed:
- All YAML fragments, as delimited by lines that contain only three dashes (
---
), are parsed (see example below). - The file is displayed to the user in an area that takes up most of the screen.
- All YAML fragments, as delimited by lines that contain only three dashes (
- The YAML fragments can contain 'deductive coding trees'. An example is shown below. This tree is shown (preserving the tree structure) at the right-hand side of the file. The labels are used in this display; when hovering over each label, the identifier and the code is shown (see below).
- Participants can drag codes to the lines in the file. The code's code is then appended to the end of the line, delimited by two opening (
[[
) and two closing (]]
) square brackets. - Participants can then save the file, in which case it's "downloaded" to their computer.
YAML fragment parsing
The YAML fragments can contain objects with different names. This app, for now, can ignore all objects except those called 'codes' or 'dct'. Those are parsed. They can contain four fields of interest:
- id: a unique identifier
- label: a human-readable label
- code: the code to add to the file between the square brackets
-
children: either:
- another code specification (i.e. recursion)
- or one or more single character values, which represent the shorthand for a set of code specifications where the id, label, and code are all the same, and are those single character values.
Example YAML fragment
---
codes:
-
id: expl_model
label: Explanatory Model
code: EM
children: [EM_Psych, EM_Eco, EM_Gen]
-
id: icons
label: Icons
code: IC
children: [IC_Attack, IC_Overl, IC_Punish]
-
id: source
label: Information sources
children: [Source_Net, Source_Doc, Source_FandF]
-
id: attitude
label: Attitude
code: Att
children:
-
id: exp_attitude
code: exp_att
label: Experiential Attitude
children:
-
id: exp_att_expect
label: Expectation
-
id: exp_att_eval
label: Evaluation
---
This fragment represents the following code tree:
levelName
1
2 ¦--expl_model
3 ¦ ¦--EM_Psych
4 ¦ ¦--EM_Eco
5 ¦ °--EM_Gen
6 ¦--icons
7 ¦ ¦--IC_Attack
8 ¦ ¦--IC_Overl
9 ¦ °--IC_Punish
10 ¦--source
11 ¦ ¦--Source_Net
12 ¦ ¦--Source_Doc
13 ¦ °--Source_FandF
14 °--attitude
15 °--exp_attitude
16 ¦--exp_att_expect
17 °--exp_att_eval
This is output by the rock::parse_source
function from the rock
R package in this GitLab repository; it's actually output from the R data.tree
package, that is used by the rock
package.
This code structure is roughly what should be shown at the right-hand side of the application, except that the labels should be shown, while here, the identifiers are shown.
Example coded source fragment
[[cid=1]]
---paragraph-break---
Why did you start using acupuncture? [[Topic1]] [[cid=1]] [[tid=1]]
---<<<B>>>---
---<A>---
5 years ago my hand started hurting, it was harder and harder to use them for everyday tasks. [[IC_Overl]] [[cid=1]]
And I got to the point where they hurt so bad that I went to my family doctor and then that doctor had me do lots of tests and they found nothing wrong, no inflammation in the joints. [[Source_Doc]] [[cid=1]]
At first I thought it was just the bad weather - because I used to feel the weather in my joints. [[EM_Eco]] [[cid=1]]
I inherited the joint problems from my mother. [[EM_Gen]] [[cid=1]]
But my hands just stopped working; it was like I was carrying these really really heavy bags in my hands all the time - it was that kind of feeling...when you put down those heavy bags and - like - your fingers are hard to move and it got to the point where I couldn't actually lift anything. [[IC_Overl]] [[cid=1]]
---<A>---
One time, I was holding this mug of coffee that I got for a Xmas present and I was lifting it to drink from it and I dropped it and spilled hot coffee all over myself. [[cid=1]]
Then maybe two years ago I was diagnosed with erosive arthritis and they prescribed me this really strong medication which didn't work and then I got radiation therapy which didn't work either. [[Source_Doc]] [[cid=1]]
---<A>---
---<<<B>>>---
So a friend of mine told me about this guy who does acupuncture and I decided to try it out. [[Source_FandF]] [[cid=1]]
And I've been here twice and it feels like it's working my hands are easier to move, I feel more free. [[IC_Overl]] [[cid=1]]
---paragraph-break---
In your understanding what caused your illness? [[Topic2]] [[cid=1]] [[tid=2]]