Skip to content

A custom web component built in svelte designed to take a path to a TEI file and display it as HTML

Notifications You must be signed in to change notification settings

NewcastleRSE/evolving-hands-tei-converter

Repository files navigation

Evolving Hands: TEI Converter

A custom web component built in svelte designed to take a path to a TEI file and display it as HTML.

About

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.

Project Team

RSE Contact

Tiago Sousa Garcia RSE Team
Newcastle University
(tiago.sousa-garcia@newcastle.ac.uk)

Built With

Svelte
CETEIcean

Getting Started

Prerequisites

TBD

Installation

Copy the entire dist/TeiConverter folder to the root of your project (or a suitable folder in the project directory).

Running Locally

  1. Load TeiConverter/tei-converter.umd.js as a script in your HTML:
<script src="./tei-converter.umd.js"></script>
  1. 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"/>
  1. Start any http server on the root of your project and visit the local address to see the results.

Example:

file structure:
├── project_root
│   ├── index.html
|   └──  TeiConverter
│       ├── tei-converter.umd.js
│       └── TeiConverter.config.json
index.html:
<!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>

Documentation

Running Tests

TBD

Deployment

Local

TDB

Production

TDB

Usage

TBD

Roadmap

  • Initial Research
  • Minimum viable product
  • Alpha Release <-- You are Here
  • Feature-Complete Release

Contributing

Main Branch

Protected and can only be pushed to via pull requests. It should be considered stable and a representation of production code.

Dev Branch

Should be considered fragile; code should compile and run, but features may be prone to errors.

Feature Branches

A branch per feature that is being worked on.

https://nvie.com/posts/a-successful-git-branching-model/

License

Citation

Acknowledgements

About

A custom web component built in svelte designed to take a path to a TEI file and display it as HTML

Resources

Stars

Watchers

Forks

Packages

No packages published