parse-gym-log
Parse text-based workout log file
Last updated 2 years ago by rane .
ISC · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install parse-gym-log 
SYNC missed versions from official npm registry.

parse-gym-log

Parse text-based workout log file

example

input

20.04.2018
==========

# squat

5 x 100kg
5 x 100kg

# overhead press

5 x 50kg
5 x 50kg
5 x 50kg

# bench press

3 x 5 x 100kg

output

[ { date: '20.04.2018',
    exercises:
     [ { exercise: 'squat',
         sets:
          [ { reps: 5, weight: 100 },
            { reps: 5, weight: 100 } ] },
       { exercise: 'overhead press',
         sets:
          [ { reps: 5, weight: 50 },
            { reps: 5, weight: 50 },
            { reps: 5, weight: 50 } ] },
       { exercise: 'bench press',
         sets:
          [ { reps: 5, weight: 100 },
            { reps: 5, weight: 100 },
            { reps: 5, weight: 100 } ] } ] } ]

usage

const parse = require('parse-gym-log')
parse(input)

cli

Using parse-gym-log on the command-line will output the log in JSON format.

$ npm install -g parse-gym-log
$ < log.txt | parse-gym-log

Current Tags

  • 1.0.0                                ...           latest (2 years ago)

1 Versions

  • 1.0.0                                ...           2 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 0
Last Month 2
Dependencies (1)
Dev Dependencies (6)
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |