Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
4b7f1da
Started work on generating marker map
tjcouch-sil Sep 3, 2025
8266766
Added some more details and structure to markers.json
tjcouch-sil Sep 3, 2025
aa0dbb0
Added more readme detail
tjcouch-sil Sep 3, 2025
dfac7c7
First pass at generating markers.json
tjcouch-sil Sep 4, 2025
44cc871
Added information about default attributes to the readme
tjcouch-sil Sep 4, 2025
fb57e8a
Added defaultAttribute in markers.json
tjcouch-sil Sep 4, 2025
0a7dce0
List all skipped definitions
tjcouch-sil Sep 4, 2025
bbef506
Added detail to rules for how to get marker name and default attribute
tjcouch-sil Sep 4, 2025
9db7aa4
Slight adjustment to instructions
tjcouch-sil Sep 4, 2025
8d59ed8
More improvements
tjcouch-sil Sep 5, 2025
8467530
Added markers that don't have style
tjcouch-sil Sep 8, 2025
f8ef76e
Fixed running against 3.0.8, fixed other small problems
tjcouch-sil Sep 8, 2025
83583f7
Added table and regex stuff
tjcouch-sil Sep 9, 2025
9d55347
Added markerTypes, usfm, USJ
tjcouch-sil Sep 9, 2025
2729c80
Sorted markers and other misc cleanup
tjcouch-sil Sep 9, 2025
8cdb3f7
Fixed usfm type, fixed sorting
tjcouch-sil Sep 9, 2025
2c90baf
Added few more manual markers
tjcouch-sil Sep 9, 2025
79466d1
Generated typescript model file
tjcouch-sil Sep 9, 2025
aeef8d8
Removed usx.rng from repo
tjcouch-sil Sep 9, 2025
ff3146d
Added generate-markers-map.yml
tjcouch-sil Sep 9, 2025
aaa69f3
Added commit hash to output because apparently multiple verisons of r…
tjcouch-sil Sep 9, 2025
11ae064
Fixed workflow problems
tjcouch-sil Sep 9, 2025
5eb3851
Fixed workflow name
tjcouch-sil Sep 9, 2025
4631d36
Removed markers.json
tjcouch-sil Sep 9, 2025
187ef6d
Added cp as manual marker
tjcouch-sil Sep 9, 2025
8e1f90d
Added unit tests
tjcouch-sil Sep 10, 2025
4321966
Started analyzing how to derive additional important info
tjcouch-sil Sep 15, 2025
07bbe0c
Continued analysis; added some but not all necessary fields to types
tjcouch-sil Sep 15, 2025
12adda1
Added hasStyleAttribute to marker type
tjcouch-sil Sep 16, 2025
bb0b2b8
Include attributes through refs, track attributes to skip output to USFM
tjcouch-sil Sep 16, 2025
e6400b0
Moved skipOutputAttributeToUsfm
tjcouch-sil Sep 16, 2025
8b3c0e7
Ignore usfm:alt defines
tjcouch-sil Sep 16, 2025
8a7c3d4
Implemented skipOutputMarkerToUsfmIfAttributeIsPresent, some other at…
tjcouch-sil Sep 17, 2025
ab6fd4f
Implemented attribute markers
tjcouch-sil Sep 18, 2025
0e1e05e
Implemented hasNewlineBefore
tjcouch-sil Sep 19, 2025
8a9d583
Implemented additional simple marker check - esbe
tjcouch-sil Sep 19, 2025
e086660
Cleaned up additional marker check a bit
tjcouch-sil Sep 19, 2025
620de86
Implemented closing tag properties
tjcouch-sil Sep 19, 2025
3bd3429
Added comments to the markers
tjcouch-sil Sep 22, 2025
1d46c2e
Small refactor
tjcouch-sil Sep 22, 2025
3ae39c5
Implemented text content attributes and leading attributes, other sma…
tjcouch-sil Sep 22, 2025
0099705
Sorted isAttributeMarkerFor
tjcouch-sil Sep 22, 2025
57eb8b5
Fixed merging new properties
tjcouch-sil Sep 23, 2025
2be61bb
Added usfmToolsVersion to be sure of when it was generated
tjcouch-sil Sep 24, 2025
820a437
Fixed working changes check, misc fixes
tjcouch-sil Sep 24, 2025
ed48bc0
Regenerated test data with no working changes
tjcouch-sil Sep 24, 2025
4154cd9
Added some more properties
tjcouch-sil Oct 24, 2025
e425ec3
Added prettier-plugin-jsdoc, formatted everything
tjcouch-sil Oct 24, 2025
4b02700
Generated Paratext version of markers map, deep froze map
tjcouch-sil Oct 24, 2025
6cedb55
Added markers map version
tjcouch-sil Oct 24, 2025
1d89fd7
Lint
tjcouch-sil Oct 24, 2025
bb5d8db
Some adjustments to prepare for merging base markers map
tjcouch-sil Oct 27, 2025
06981ba
Filled out 3.0 with 3.1 base markers map
tjcouch-sil Oct 27, 2025
ae96381
Many additions to markers map to reduce special case stuff, lots of i…
tjcouch-sil Oct 30, 2025
39dc10f
Fixed linking attributes in 3.0.7
tjcouch-sil Oct 31, 2025
7f7d781
Added terms section, cleaned up a bunch of little things
tjcouch-sil Nov 4, 2025
67c8ec5
Tuned up TSDocs and other tweaks
tjcouch-sil Nov 5, 2025
b347585
Reworked closing marker docs and such
tjcouch-sil Nov 12, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
module.exports = {
root: true,
extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended'],
rules: {
'no-null/no-null': 2,
},
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint', 'no-null'],
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
},
env: {
browser: true,
node: true,
},
};
3 changes: 3 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
* @tjcouch-sil @lyonsil
# not package-lock.json
/package-lock.json
71 changes: 71 additions & 0 deletions .github/workflows/generate-markers-map.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: Generate Markers Map

on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
inputs:
schemaVersion:
description: 'Version of `usx.rng` to generate markers map from, e.g. 3.1. For testing, can specify `master` to use latest version from `ubsicap/usx` or `main` to use latest version from `usfm-bible/tcdocs`, but note that the markers map will have this exact string as its version.'
required: true
default: '3.1'

jobs:
build:
runs-on: ubuntu-latest

steps:
# Apparently GitHub doesn't set the inputs to default if you run from other than manual dispatch, so setting defaults here
- name: Make default inputs consistent
id: inputs
run: |
echo "schemaVersion=${{ github.event.inputs.schemaVersion || '3.1' }}" >> "$GITHUB_OUTPUT"

- name: Checkout usfm-tools
uses: actions/checkout@v4

- name: Clone `ubsicap/usx`, checkout the right branch, and move `usx.rng` to root
if: ${{ steps.inputs.outputs.schemaVersion == 'master' || steps.inputs.outputs.schemaVersion < '3.1' }}
run: |
git clone https://github.com/ubsicap/usx.git ../usx
cd ../usx
if [ "${{ steps.inputs.outputs.schemaVersion }}" != "master" ]; then
git checkout "usx${{ steps.inputs.outputs.schemaVersion }}"
fi
mv schema/usx.rng ../usfm-tools/usx.rng
echo "USX_REPO=https://github.com/ubsicap/usx.git" >> "$GITHUB_ENV"
echo "USX_COMMIT=$(git rev-parse HEAD)" >> "$GITHUB_ENV"

- name: Clone `usfm-bible/tcdocs` and checkout the right branch, and move `usx.rng` to root
if: ${{ steps.inputs.outputs.schemaVersion != 'master' && steps.inputs.outputs.schemaVersion >= '3.1' }}
run: |
git clone https://github.com/usfm-bible/tcdocs.git ../tcdocs
cd ../tcdocs
if [ "${{ steps.inputs.outputs.schemaVersion }}" != "main" ]; then
git checkout "${{ steps.inputs.outputs.schemaVersion }}"
fi
mv grammar/usx.rng ../usfm-tools/usx.rng
echo "USX_REPO=https://github.com/usfm-bible/tcdocs.git" >> "$GITHUB_ENV"
echo "USX_COMMIT=$(git rev-parse HEAD)" >> "$GITHUB_ENV"

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Generate markers map
run: npm run generate-markers-map -- --schema usx.rng --version "${{ steps.inputs.outputs.schemaVersion }}" --repo "${{ env.USX_REPO }}" --commit "${{ env.USX_COMMIT }}"

- name: Upload Markers Map
uses: actions/upload-artifact@v4
with:
name: markers-map
path: |
dist/*
retention-days: 90
31 changes: 31 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Test

on:
push:
branches: ['main']
pull_request:
# The branches below should be a subset of the branches above
branches: ['main']

jobs:
test:
name: Build on ${{ matrix.os }}

runs-on: ${{ matrix.os }}

strategy:
matrix:
os: [ubuntu-latest]

steps:
- name: Check out Git repository
uses: actions/checkout@v4

- name: Install packages
run: npm ci

- name: npm unit tests
run: npm test

- name: check JS/TS linting
run: npm run lint
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -137,3 +137,6 @@ dist
# Vite logs files
vite.config.js.timestamp-*
vite.config.ts.timestamp-*

# Local copies of files from other repositories
usx.rng
6 changes: 6 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
node_modules

# generated files
package-lock.json
src/test-data
src/markers-3.1.json
24 changes: 24 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
module.exports = {
printWidth: 100,
tabWidth: 2,
singleQuote: true,
trailingComma: 'es5',
bracketSpacing: true,
bracketSameLine: false,
arrowParens: 'avoid',
proseWrap: 'preserve',
// prettier-plugin-jsdoc options
tsdoc: true,
plugins: ['prettier-plugin-jsdoc'],
overrides: [
{
files: '*.sql',
options: {
parser: 'sql',
language: 'sqlite',
keywordCase: 'upper',
linesBetweenQueries: 1,
},
},
],
};
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2025 Paranext
Copyright (c) 2025 SIL Global and United Bible Societies.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
Loading