This is an experimental interface for viewing variant text. Development was begun at the Huygens Institute in early 2016 in the context of a design sprint centred around the concept of "text-as-graph", particularly as used in the Stemmaweb tools.
This fork has updated the original proof of concept to use live data, and reworked it to be supported by the Create React App infrastructure.
Within the root directory, install dependencies required to run the application:
npm install
-
Within the root directory, create a new file named
.env. It is highly recommended that this file be git-ignored in order to avoid committing sensitive data into version control. -
In the newly created
.envfile, add the following environment variables:
PUBLIC_URL- Ex:
PUBLIC_URL=enter_url_here_with_no_spaces_or_quotes
- Ex:
REACT_APP_MAPBOX_TOKEN- Ex:
REACT_APP_MAPBOX_TOKEN=enter_token_here_with_no_spaces_or_quotes - A Mapbox token can be obtained from the Mapbox website - see the "Access tokens" section of your Mapbox account page.
- Ex:
REACT_APP_HOMEPATH- Ex:
REACT_APP_HOMEPATH=/ChronicleME/
- Ex:
-
Within the
/scriptdirectory, create a new file namedlemma-html-config.json. It is highly recommended that this file be git-ignored in order to avoid committing sensitive data into version control - this is why we provide an example file (lemma-html-config.json.example), rather than the file itself, on GitHub. -
In the newly created
lemma-html-config.jsonfile, add a JSON object with the following keys (be sure to update with your own values):
{
"options": {
"repository": "repository URL goes inside these quotes",
"tradition_id": "tradition ID goes inside these quotes"
},
"auth": {
"username": "API auth username goes inside these quotes",
"password": "API auth password goes inside these quotes"
}
}
Note - an example file, lemma-html-config.json.example, has been provided as an example.
Note - order matters here, as some scripts rely on files generated in other scripts. The first script requires Python 3, as well as API authorization data (these are the same values added to the lemma-html-config.json file in the step above). Scripts may take several minutes to run.
Within the /script directory, run the following commands (in order):
python3 generate_svgs.py -r "https://api.editions.byzantini.st/ChronicleME/stemmarest" -u [enter API username in quotes] -p [enter API password in quotes] -t [tradition ID with NO quotes] -v
node generateDates.js
node generateManuscriptHtml.js
node generateStore.js
node generateLocationData.js
node generateAllWitnessLunrData.js
node generateLunrData.js
Run the application locally:
yarn start
Within the project root directory:
yarn build
zip -r <buildID> build
scp <buildID>.zip [email protected]:.
On the server:
unzip <buildID>
rm -rf www/*
cp -r build/* www