https://github.com/terotests/numbot
A configurable parser for text based logs
https://github.com/terotests/numbot
date-fns parser typescript
Last synced: about 1 year ago
JSON representation
A configurable parser for text based logs
- Host: GitHub
- URL: https://github.com/terotests/numbot
- Owner: terotests
- License: mit
- Created: 2022-01-17T16:22:16.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-07-13T20:46:52.000Z (almost 4 years ago)
- Last Synced: 2024-08-08T21:35:01.386Z (almost 2 years ago)
- Topics: date-fns, parser, typescript
- Language: TypeScript
- Homepage:
- Size: 142 KB
- Stars: 2
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Parser for text based logs
NOTE: the API is still a bit unstable.
This is a configurable parser for text based logs. For example
```
Year 2021
Week 1
Mon running 45min
```
Would return a parsed JS Object in format
```javascript
[
{
day: "2021-01-30T00:00:00.000Z",
result: {
move_to_year: "2021",
},
},
{
day: "2021-01-09T00:00:00.000Z",
result: {
move_to_week: "1",
},
},
{
day: "2021-01-04T00:00:00.000Z",
result: {
monday: "Mon",
text: ["running"],
duration_mins: "45",
},
},
];
```
For now, see the test file(s) for example of usage.