πŸ•‘ A personal git log and MacJournal output parser, written in rust.

Related tags

Parsing timesheet
Overview

πŸ•‘ git log and MacJournal export parser

A personal project, written in rust.

WORK IN PROGRESS; NOT READY

This repo consolidates daily activity from two different sources and produces one consolidated line per day.

Background

When I track project time and tasks, I use git log reports, and ad-hoc daily notes kept in (the most excellent) MacJournal. I merge these two sources to create one spreadsheet cell per day.

This is a tedious manual process.

automate-all-the-things

Raw output from git log

The git command looks like this...

git log --pretty="format:%cd %s" --since="60 days ago" --date="short" >> "gitoutput.txt"

... which produces output like this:

2021-12-01 0.13.6
2021-12-01 Issue #2971 and #2951: assessing the sorry-ass state of our data pipeline.
2021-12-01 Issue #3341: check the weekend schedule, why is there is no Saturday schedule this week.
2021-12-01 Issue #404: fix β€” promote the Job screen to the main menu, and rename it "Upcoming Jobs".
2021-12-01 Issue curation.
2021-12-01 Afternoon coordination meeting with QA.
2021-12-01 Issue 405: refactor β€” reorganise this long query to make it easier to deconstruct.
2021-12-01 After hours β€” update test/dev data.

Raw output from MacJournal export

Date: 1 December 2021 at 12:15
Topic: Tasks today

Morning call with the Dev team.
Final testing of version 0.13.6.
Release version 0.13.6 to userland.
Issue #3138: adjust a part production report, and regenerate it.
Issue #3138: delete all the void entries from the production parts table.
Issue #3140: new issue about making reworked parts easy to move and merge.
Issue #3141: sales dept reports parts are missing in new estimates, so investigating that.
After hours β€” update test/dev data.

What I need

All the above input consolidated on one line per day that looks like this:

2021-12-01 Version 0.10.27 built, tested, and rolled out. After hours ... etc...

Details

The following refinements (should) apply:

Git tags (status: 🟒 )

Lines with raw git tags look like this: "0.13.6".

They should become the sentence "Version 0.13.6 built, texted, and rolled out."

Remove trivial commits (status: 🟒 )

Commits that say trivial things like "Fix whitespace" or just "Whitespace", or "Fix typo" or just "Typo", or the latin "Ibid.", are dropped.

Repeated issue references (status: πŸ”΄ )

Repeated commits referring to the same issue, originally this....

Issue #3138: fix β€” thing one.
Issue #3138: fix β€” thing two.
Issue #3138: fix β€” thing three.

... become (note the semicolon ; delimiter and the period . at the end.)

Issue #3138: fix β€” thing one; fix β€” thing two; fix β€” thing three.

Repeated version references (status: πŸ”΄ )

Handwritten version number commits lke ...

2021-12-01 Something version 0.3.11
2021-12-01 Something version 0.3.12
2021-12-01 Something version 0.3.13

... become (note the semicolon , except with and as the last delimiter, and the period . at the end.)

Issue #3138: Something version 0.3.11, 0.3.12, and 0.3.13 built, tested, and rolled out.
You might also like...
An IRC (RFC1459) parser and formatter, built in Rust.

ircparser An IRC (RFC1459) parser and formatter, built in Rust. ircparser should work on basically any Rust version, but the earliest version checked

A rusty, dual-wielding Quake and Half-Life texture WAD parser.

Ogre   A rusty, dual-wielding Quake and Half-Life texture WAD parser ogre is a rust representation and nom parser for Quake and Half-Life WAD files. I

A modern dialogue executor and tree parser using YAML.

A modern dialogue executor and tree parser using YAML. This crate is for building(ex), importing/exporting(ex), and walking(ex) dialogue trees. convo

Org mode structural parser/emitter with an emphasis on modularity and avoiding edits unrelated to changes.

Introduction Org mode structural parser/emitter with an emphasis on modularity and avoiding edits unrelated to changes. The goal of this library is to

Parser for Object files define the geometry and other properties for objects in Wavefront's Advanced Visualizer.

format of the Rust library load locad blender obj file to Rust NDArray. cargo run test\t10k-images.idx3-ubyte A png file will be generated for the fi

Lexer and parser collections.

laps Lexer and parser collections. With laps, you can build parsers by just defining ASTs and deriving Parse trait for them. Usage Add laps to your pr

Rust parser combinator framework

nom, eating data byte by byte nom is a parser combinators library written in Rust. Its goal is to provide tools to build safe parsers without compromi

Parsing Expression Grammar (PEG) parser generator for Rust

Parsing Expression Grammars in Rust Documentation | Release Notes rust-peg is a simple yet flexible parser generator that makes it easy to write robus

A fast monadic-style parser combinator designed to work on stable Rust.

Chomp Chomp is a fast monadic-style parser combinator library designed to work on stable Rust. It was written as the culmination of the experiments de

Comments
  • Todo

    Todo

    The todo list.

    • [ ] Consolidate repeated version references
    • [ ] Implement the outfile option.
    • [ ] Make the issue regex case insensitive.
    • [ ] Finish implementing the verbose flag.
    • [ ] Finish implementing the dryrun flag.
    • [ ] Add a startdate option to bound the output.
    opened by StevenBlack 0
Owner
Steven Black
Steven Black
Website for Microformats Rust parser (using 'microformats-parser'/'mf2')

Website for Microformats Rust parser (using 'microformats-parser'/'mf2')

Microformats 5 Jul 19, 2022
A CSS parser, transformer, and minifier written in Rust.

@parcel/css A CSS parser, transformer, and minifier written in Rust. Features Extremely fast – Parsing and minifying large files is completed in milli

Parcel 3.1k Jan 9, 2023
A WIP svelte parser written in rust. Designed with error recovery and reporting in mind

Svelte(rs) A WIP parser for svelte files that is designed with error recovery and reporting in mind. This is mostly a toy project for now, with some v

James Birtles 3 Apr 19, 2023
PEG parser for YAML written in Rust πŸ¦€

yaml-peg PEG parser (pest) for YAML written in Rust ?? Quick Start ⚑️ # Run cargo run -- --file example_files/test.yaml # Output { "xmas": "true",

Visarut Phusua 4 Sep 17, 2022
MRT/BGP data parser written in Rust.

BGPKIT Parser BGPKIT Parser aims to provides the most ergonomic MRT/BGP message parsing Rust API. BGPKIT Parser has the following features: performant

BGPKIT 46 Dec 19, 2022
gors is an experimental go toolchain written in rust (parser, compiler).

gors gors is an experimental go toolchain written in rust (parser, compiler). Install Using git This method requires the Rust toolchain to be installe

Aymeric Beaumet 12 Dec 14, 2022
A handwritten fault-tolerant, recursive-descent parser for PHP written in Rust.

PHP-Parser A handwritten fault-tolerant, recursive-descent parser for PHP written in Rust. Warning - this is still alpha software and the public API i

PHP Rust Tools 278 Jun 24, 2023
Pure, simple and elegant HTML parser and editor.

HTML Editor Pure, simple and elegant HTML parser and editor. Examples Parse HTML segment/document let document = parse("<!doctype html><html><head></h

Lomirus 16 Nov 8, 2022
A native Rust port of Google's robots.txt parser and matcher C++ library.

robotstxt A native Rust port of Google's robots.txt parser and matcher C++ library. Native Rust port, no third-part crate dependency Zero unsafe code

Folyd 72 Dec 11, 2022
Sqllogictest parser and runner in Rust.

Sqllogictest-rs Sqllogictest parser and runner in Rust. License Licensed under either of Apache License, Version 2.0 (LICENSE-APACHE or http://www.apa

Singularity Data Inc. 101 Dec 21, 2022