A custom web component built in svelte designed to take a path to a TEI file and display it as HTML.
This repository contains the source code for a custom web component built with Svelte that takes in a path to a TEI file and transforms it into HTML using CETEIcean. The component is designed specifically for Evolving Hands, but is meant to be reusable in other applications by the Newcastle University Library.
- Ian Johnson, Head of Special Collections and Archives, Newcastle University (ian.johnson@ncl.ac.uk)
- Valentina Flex, Special Collections and Archives, Newcastle University (valentina.flex@newcastle.ac.uk)
- Alexandra Healey, Philip Robinson Library, Newcastle University (alexandra.healey@newcastle.ac.uk)
- Scott Bradley, Library systems developer, Philip Robinson Library, Newcastle University (scott.bradley@newcastle.ac.uk)
- Maciej Dudek, Digital Content Developer Academic Services, Newcastle University (maciej.dudek@newcastle.ac.uk)
- John Schoneboom, Research Software Engineer, Newcastle University (john.schoneboom@newcastle.ac.uk)
- Tiago Sousa Garcia, Research Software Engineer, Newcastle University (tiago.sousa-garcia@newcastle.ac.uk)
Tiago Sousa Garcia
RSE Team
Newcastle University
(tiago.sousa-garcia@newcastle.ac.uk)
TBD
Copy the entire dist/TeiConverter
folder to the root of your project (or a suitable folder in the project directory).
- Load
TeiConverter/tei-converter.umd.js
as a script in your HTML:
<script src="./tei-converter.umd.js"></script>
- Place the custom element
<tei-converter>
anywhere in the<body>
of your HTML with a@path
attribute pointing to the location of the TEI file you want to convert, and a@configPath
attribute pointing to the location of the configuration file you want to use (the distribution folder includes an example to use as a base). More details on the config file are available here.
<tei-converter path="PATH/TO/TEI/FILE.xml" configPath="TeiConverter/TeiConverter.config.json"/>
- Start any http server on the root of your project and visit the local address to see the results.
├── project_root
│ ├── index.html
| └── TeiConverter
│ ├── tei-converter.umd.js
│ └── TeiConverter.config.json
<!DOCTYPE html>
<html lang="en">
<head>
<script src="./TeiConverter/tei-converter.umd.js"></script>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>TEI Converter test</title>
</head>
<body>
<tei-converter path="https://raw.githubusercontent.com/NewcastleRSE/beeing-human-tei-data/dev/1623_consolidated.xml" configPath="TeiConverter/TeiConverter.config.json"/>
</body>
</html>
- Styling
- Pagination
- Configuration object
- Adding custom behaviours
- Custom events:
TBD
TDB
TDB
TBD
- Initial Research
- Minimum viable product
- Alpha Release <-- You are Here
- Feature-Complete Release
Protected and can only be pushed to via pull requests. It should be considered stable and a representation of production code.
Should be considered fragile; code should compile and run, but features may be prone to errors.
A branch per feature that is being worked on.