Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yanishoss/tml-js
The official TML parser for JS
https://github.com/yanishoss/tml-js
Last synced: 1 day ago
JSON representation
The official TML parser for JS
- Host: GitHub
- URL: https://github.com/yanishoss/tml-js
- Owner: yanishoss
- License: mit
- Created: 2020-06-09T12:38:39.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-01-06T08:25:00.000Z (almost 2 years ago)
- Last Synced: 2024-10-12T03:27:17.380Z (about 1 month ago)
- Language: TypeScript
- Size: 460 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Training Markup Language
> *TML* stands for *Training Markup Language*. *TML* is a markup language aiming at providing a simple and clean way to describe a training/workout with the exercises and the performances.
## Example
```tml
I really enjoyed my workout because of my TML logs!# Squat
150kg x 5 @ 7
160kg x 5 @ 8
160kg x 5 @ 8
160kg x 5 @ 9
my squat session felt really great! I hit my RPEs seamlessly!# Deadlift
150kg x 5 @ 7
160kg x 5 @ 8
160kg x 5 @ 8
160kg x 5 @ 9
my deadlift session felt really great! I hit my RPEs seamlessly!# Push ups
25 x 4
it felt really hard, trust me!
```## Installation
```shell script
npm i --save tml-parser
```## Parsing in JS
```ts
import * as tml from "tml-parser";const input = `I really enjoyed my workout because of my TML logs!
# Squat
150kg x 5 @ 7
160kg x 5 @ 8
160kg x 5 @ 8
160kg x 5 @ 9
my squat session felt really great! I hit my RPEs seamlessly!
# Deadlift
150kg x 5 @ 7
160kg x 5 @ 8
160kg x 5 @ 8
160kg x 5 @ 9
my deadlift session felt really great! I hit my RPEs seamlessly!
# Push ups
25 x 4
it felt really hard, trust me!
`;const workout = tml.parse(input);
console.log(workout);
}
```## [Language Specification](https://github.com/yanishoss/tml/blob/master/SPECIFICATION.md "TML Specification")
## Acknowledgments
### [weightroom.uk](https://weightroom.uk/ "Weightroom")
I have gotten this idea from [weightroom.uk](https://weightroom.uk/ "Weightroom") as I was using their app to track my Powerlifting progression.