1.1.9 • Published 4 years ago

tml-parser v1.1.9

Weekly downloads
2
License
MIT
Repository
github
Last release
4 years ago

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

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

npm i --save tml-parser

Parsing in JS

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

Acknowledgments

weightroom.uk

I have gotten this idea from weightroom.uk as I was using their app to track my Powerlifting progression.

1.1.9

4 years ago

1.1.8

4 years ago

1.1.7

4 years ago

1.1.6

4 years ago

1.1.5

4 years ago

1.1.4

4 years ago

1.1.3-exceptions

4 years ago

1.1.3

4 years ago