@wendig/qtei
QTEI is based on two core components: the browser, as one of the most comprehensive software packages for handling XML, is widely used and easy to maintain by end users. And JS is often part of the solution for rendering TEI/XML anyway, so with QTEI we created a framework that can fully implement the TEI web presence with this technology.
Science Score: 44.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (16.1%) to scientific vocabulary
Keywords
Repository
QTEI is based on two core components: the browser, as one of the most comprehensive software packages for handling XML, is widely used and easy to maintain by end users. And JS is often part of the solution for rendering TEI/XML anyway, so with QTEI we created a framework that can fully implement the TEI web presence with this technology.
Basic Info
Statistics
- Stars: 4
- Watchers: 5
- Forks: 0
- Open Issues: 0
- Releases: 0
Topics
Metadata Files
README.md
QTEI
Quick TEI (QTEI) - Visualize your TEI documents easily.
https://github.com/ieg-dhr/QTEI/assets/506366/6ace95aa-fcfc-463d-a684-ef9faefae5de
Getting started
QTEI works as a ES6 module, can be used with the browser directly and ships a development environment:
ES6 module
Add QTEI to your javascript project with npm
npm install @wendig/qtei -D
And then use it like this
import QTei from '@wendig/qtei'
const qtei = new QTei.Viewer(...)
Directly with the browser
Include it in your page with simple html tags
<html>
<head>
...
<link
rel="stylesheet"
type="text/css" href="https://unpkg.com/@wendig/qtei/dist/qtei.min.css"
/>
...
</head>
<body>
...
<script src="https://unpkg.com/@wendig/qtei/dist/qtei.min.js"></script>
...
</body>
</html>
Development environment
This repository also ships with a development environment. This is how you set it up:
First, install git and nodejs on your workstation. Then open a terminal and clone the repository
git clone https://github.com/ieg-dhr/QTEI.git
Rename your TEI file to content.xml and move it into the data directory.
Now install all dependencies and run the development server:
cd QTEI
npm install
npm run dev
At this point, you should see your TEI file rendered at http://localhost:4000. Use whatever editor you prefer to make modifications to the viewer itself or to the TEI content, the page will immediately reflect the changes.
Usage
In general, the QTEI library can be used in two ways:
- use the integrated viewer (shows TEI XML source along rendered text with a facsimile and potentially a map). It provides a pagination, column controls and some styling but it isn't as customizable
- use just some parts of the library to build your own and integrate into your own systems
This is a example of a full html page making use of QTEI:
~~~html <!DOCTYPE html>
<!-- when using the viewer widget, also include bootstrap to provide a default look, otherwise, just write your own css -->
<!-- include the css for highlighting the XML TEI source (highlight.js) -->
<link
rel="stylesheet"
type="text/css"
href="https://unpkg.com/@highlightjs/cdn-assets@11.6.0/styles/github.min.css"
/>
<link
rel="stylesheet"
type="text/css" href="https://unpkg.com/@wendig/qtei/dist/qtei.min.css"
/>
<!-- include these if you intend to use the map component -->
<link
rel="stylesheet" href="https://unpkg.com/leaflet@1.9.1/dist/leaflet.css"
/>
<script src="https://unpkg.com/leaflet@1.9.1/dist/leaflet.js"></script>
<script src="https://unpkg.com/@wendig/qtei/dist/qtei.min.js"></script>
<script>
function renderFacsimile(data) {
// write the code here to extract the facsimile from the current page's
// xml, data.content is a reference to the XML DOM. Have a look at the
// src/app.js file for an example implementation
}
function mappify(data) {
// write the code here to extract geo location data from your pages to
// be rendered within the leaflet map. Have a look at the src/app.js
// file for an example implementation
}
var qtei = new QTei.Viewer('[is=qtei-viewer', {
src: "url/to/your/tei.xml",
processors: [
QTei.processors.wrapAll('persName', 'person-fill', 'person'),
QTei.processors.wrapAll("rs[type='person']", 'person-fill', 'person'),
QTei.processors.wrapAll('placeName', 'geo-alt-fill', 'place'),
QTei.processors.wrapAll("rs[type='artwork']", 'palette-fill', 'artwork'),
QTei.processors.renderXmlTo('#raw'),
QTei.processors.highlightXml('#raw'),
QTei.processors.renderContentTo('#content')
]
})
</script>
~~~
Licenses
- https://freesvg.org/black-book-with-many-pages
- https://freesvg.org/tilted-grayscale-book
Owner
- Name: Leibniz Institute of European History – IEG
- Login: ieg-dhr
- Kind: organization
- Email: digital@ieg-mainz.de
- Location: Mainz, Germany
- Website: https://www.ieg-mainz.de
- Repositories: 12
- Profile: https://github.com/ieg-dhr
Citation (CITATION.cff)
cff-version: 1.2.0
message: "If you use this software, please cite it as below."
authors:
- family-names: Schepp
given-names: Moritz
orcid: "https://orcid.org/https://orcid.org/0000-0003-4237-816X"
- family-names: Wuebbena
given-names: Thorsten
orcid: "https://orcid.org/https://orcid.org/0000-0001-8172-6097"
title: "QTEI"
keywords:
- tei
- xml
- web-components
version: 0.7.0
date-released: 2022-10-31
GitHub Events
Total
Last Year
Committers
Last synced: almost 3 years ago
All Time
- Total Commits: 30
- Total Committers: 2
- Avg Commits per committer: 15.0
- Development Distribution Score (DDS): 0.267
Top Committers
| Name | Commits | |
|---|---|---|
| Moritz Schepp | m****p@g****m | 22 |
| Thorsten Wübbena | w****a@p****m | 8 |
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 0
- Total pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Total issue authors: 0
- Total pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- npm 5 last-month
- Total dependent packages: 1
- Total dependent repositories: 0
- Total versions: 3
- Total maintainers: 1
npmjs.org: @wendig/qtei
Visualize your TEI documents easily.
- Homepage: https://github.com/ieg-dhr/QTEI#readme
- License: SEE LICENSE IN LICENSE
-
Latest release: 0.6.2
published over 3 years ago
Rankings
Maintainers (1)
Dependencies
- 487 dependencies
- @babel/core ^7.17.8 development
- @babel/preset-env ^7.16.11 development
- @popperjs/core ^2.10.2 development
- @riotjs/cli ^6.1.0 development
- @riotjs/compiler ^6.3.2 development
- @rollup/plugin-babel ^5.3.1 development
- @rollup/plugin-commonjs ^22.0.2 development
- @rollup/plugin-node-resolve ^14.1.0 development
- @wendig/lib git+https://git.wendig.io/git/js-lib.git#f498a838 development
- bootstrap ^5.2.0 development
- bootstrap-icons ^1.9.1 development
- chokidar-cli ^3.0.0 development
- concurrently ^7.4.0 development
- dotenv ^16.0.3 development
- ejs ^3.1.8 development
- feather-icons ^4.29.0 development
- highlight.js ^11.6.0 development
- live-server ^1.2.2 development
- riot ^7.0.4 development
- rollup ^2.79.1 development
- rollup-plugin-dotenv ^0.4.0 development
- rollup-plugin-riot ^6.0.0 development
- sass ^1.45.0 development
- xml-formatter ^2.6.1 development