Created
February 18, 2025 16:25
-
-
Save dillera/58687299a6f047d4d287355689cbcdee to your computer and use it in GitHub Desktop.
git commits in daterange
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ python ../../scratch/github-summary.py --start 10-01-24 --end 02-17-25 | |
=== Bug Fixes === | |
-- Author: mozzwald -- | |
* Mon Jan 20 17:00:49 2025 -0600: FsSD: remove uneeded ternary for debug print | |
* Sat Jan 4 14:53:15 2025 -0600: atari: new Altirra 850 handler and relocator to fix break key crash. modem now checks filesize of handler and relocator | |
* Tue Nov 19 16:03:09 2024 -0600: fnSystem: fix SD card detect for non Atari platforms | |
-- Author: Jan Krupa -- | |
* Fri Jan 3 01:14:58 2025 +0100: [fujinet-pc] fix HSIO with serial port SIO | |
* Mon Dec 16 18:41:13 2024 +0100: [PC] fix Windows build | |
* Mon Dec 16 09:50:14 2024 +0100: [http] fix missing include vector | |
-- Author: Noah Burney -- | |
* Sun Dec 15 11:10:04 2024 -0600: [http] fix: include algorithm header for all_of | |
* Fri Dec 13 14:04:58 2024 -0600: [fuji] QR: fix non-pc builds | |
-- Author: Jaime Idolpx -- | |
* Wed Nov 13 16:41:40 2024 -0500: [iec] fix ml http client add define for JIFFYDOS replace timer functions in _protocol | |
* Wed Nov 13 10:29:50 2024 -0500: [iec] add PIN_DEBUG remove skip in CLK ISR | |
* Tue Oct 15 03:21:34 2024 -0400: [iec] fix release ATN wait on bus process | |
-- Author: Chris Osborn -- | |
* Sat Nov 9 08:55:33 2024 -0800: Fix D64 to not read past the end of a sector on large reads. | |
* Tue Oct 15 08:28:55 2024 -0700: Add debug_version.py to put commit ID into FN_VERSION_FULL during build without altering include/version.h | |
-- Author: Mark Fisher -- | |
* Sun Oct 20 13:48:43 2024 +0100: Fix string_utils use of contains | |
* Thu Oct 17 10:23:42 2024 +0100: Revert block-size values in devrelay to fixed 512 byte size | |
-- Author: Michael Sternberg -- | |
* Sat Oct 5 22:27:55 2024 -0500: ATARI: Improve trailing slash in sio_set_prefix | |
=== Other Changes === | |
-- Author: Thomas Cherryhomes -- | |
* Fri Jan 17 20:35:42 2025 -0600: [iwm][fuji] set read_only prior to mount. | |
* Tue Jan 14 20:49:51 2025 -0600: [network-protocol][http] force http_transaction() on open dir handle if propfind fails. | |
* Tue Jan 14 20:34:36 2025 -0600: [network-protocol][http] try GET if PROPFIND fails. | |
* Mon Dec 30 09:54:51 2024 -0600: [rs232] tweaks. | |
* Wed Nov 13 08:20:18 2024 -0600: careful with constant changes for s3. | |
-- Author: Chris Osborn -- | |
* Wed Jan 15 11:34:48 2025 -0800: Be smarter about finding python3 | |
* Sat Nov 9 09:30:40 2024 -0800: Make conditionals match where setup_card_detect is being used. | |
* Thu Oct 17 12:15:24 2024 -0700: Eliminate a bunch of warnings. | |
* Sat Nov 9 08:53:02 2024 -0800: Print characters per second when finished sending file. | |
* Sat Nov 9 08:49:31 2024 -0800: By default, don't use most recent modified date since it causes everything to rebuild. | |
* Thu Oct 17 07:18:06 2024 -0700: No need to check what Slot/Drive Disk II responds to on PC. | |
* Sat Oct 5 11:05:00 2024 -0700: No Disk II write support on PC. | |
* Thu Aug 22 10:40:53 2024 -0700: Define more SmartPort command constants. | |
* Mon Sep 23 08:09:24 2024 -0700: Use heap_caps_free | |
* Sun Sep 22 17:22:01 2024 -0700: Restore version.h. | |
* Sun Sep 22 09:29:03 2024 -0700: Remove unused track buffer allocation. | |
* Sun Sep 22 09:12:44 2024 -0700: Allocate track buffer when starting disk, free it when stopping. | |
-- Author: Jan Krupa -- | |
* Fri Jan 10 21:17:15 2025 +0100: [FN-PC/Atari] poll NetSIO from sio_copy_file() | |
* Mon Dec 16 09:53:00 2024 +0100: small correction in index.tmpl.html | |
* Tue Nov 19 13:43:38 2024 +0100: [coco] Update Becker interface on ESP | |
* Mon Nov 18 23:28:27 2024 +0100: [PC] update fnconfig.ini | |
* Mon Nov 18 23:07:35 2024 +0100: [CoCo] WebUI mark some sections as experimental | |
* Mon Nov 4 15:50:49 2024 +0100: [PC] precise gettimeofday() for Windows 7 | |
* Thu Oct 17 19:02:39 2024 +0200: [GHA] Get ready for FN-PC nightly! | |
* Thu Oct 17 18:36:19 2024 +0200: [GHA] re-enable targets in Build FN-PC | |
-- Author: Mark Fisher -- | |
* Mon Jan 6 18:21:45 2025 +0000: Only set the network unit if the command count has a value sent by fujinet-lib that supports it | |
-- Author: Noah Burney -- | |
* Thu Dec 12 18:54:16 2024 -0600: [fuji][sio] QR: use diagonal line atascii | |
* Thu Dec 12 17:01:46 2024 -0600: [fuji][atari] QR: to_bits, to_atascii, dynamic sizes | |
* Wed Dec 11 23:17:40 2024 -0600: [fuji][sio]: QR encoder initial proof of concept | |
-- Author: Jaime Idolpx -- | |
* Sun Nov 17 13:32:08 2024 -0500: Merge branch 'iec-tnfs' | |
* Thu Nov 14 07:46:07 2024 -0500: [iec] loading media via HTTP is almost as fast as from SD now! | |
* Thu Nov 14 00:40:11 2024 -0500: [iec] adjustments to ML HTTP client | |
* Wed Nov 13 21:07:33 2024 -0500: [iec] enhance ML HTTP client streaming | |
* Wed Nov 13 00:25:48 2024 -0500: sync latest changes from Meatloaf | |
* Tue Oct 22 01:52:04 2024 -0400: [iec] reset bus data after TALK | |
* Tue Oct 22 00:07:36 2024 -0400: [iec] reset protocol to standard serial before read_command() adjust bus state for device detect | |
* Mon Oct 21 23:28:56 2024 -0400: [iec] do check before calling selectProtocol() | |
* Mon Oct 21 23:12:55 2024 -0400: [iec] disable interrupts during EOI detect | |
* Sun Oct 20 17:28:43 2024 -0400: [iec] use timer for EOI detection | |
* Sun Oct 20 16:56:04 2024 -0400: [iec] check ATN status before and after EOI | |
* Sat Oct 19 00:44:24 2024 -0400: [iec] sync and troubleshooting protocol | |
* Mon Oct 14 17:49:32 2024 -0400: [iec] move mlb to the correct folder | |
-- Author: Eric Carr -- | |
* Tue Nov 12 23:04:05 2024 -0600: Revert CoCo WIPs so latest firmware builds work for CoCo (#817) | |
-- Author: FozzTexx -- | |
* Tue Nov 12 16:24:54 2024 -0800: Rebuild IEC state machine so it's handled in ISR (#816) | |
-- Author: Jeff Piepmeier -- | |
* Sun Nov 10 16:41:35 2024 -0500: disable pull resistors on NMI pin 27 | |
* Fri Sep 27 21:12:11 2024 -0400: ini for my cococart | |
-- Author: Michael Sternberg -- | |
* Sun Nov 3 13:22:21 2024 -0600: ATARI: Corrected 'NCD N1:' to clear mount | |
=== Features === | |
-- Author: Thomas Cherryhomes -- | |
* Tue Jan 14 20:43:29 2025 -0600: [network-protocol][http] add 408 timeout to the propfind check. | |
-- Author: naeloob -- | |
* Sun Jan 5 23:41:16 2025 +0100: Device ESP32-S3 : Add Analogic & I2s Audio Out | |
-- Author: robjustice -- | |
* Sun Jan 5 10:02:03 2025 +1100: add clock SOS time format back in | |
-- Author: Noah Burney -- | |
* Sat Dec 14 16:50:50 2024 -0600: [sio] QR: add url shorten option to encode | |
* Sat Dec 14 16:49:39 2024 -0600: [http] add simple URL shortening to web server | |
* Fri Dec 13 13:35:39 2024 -0600: [fuji] QR: add docs/comments | |
-- Author: Jan Krupa -- | |
* Mon Nov 18 23:15:35 2024 +0100: [CoCo] Add Emulator section into WebUI | |
* Tue Oct 15 21:12:32 2024 +0200: Add FujiNet-PC nightly builds/releases | |
-- Author: Jaime Idolpx -- | |
* Wed Nov 13 04:11:24 2024 -0500: skip clk isr after unlisten/untalk add delay after clk release in turnaround | |
* Tue Oct 15 14:57:37 2024 -0400: [iec] add "t1" test loader program | |
* Mon Oct 14 17:31:23 2024 -0400: [iec] add mlb to filesystem for testing | |
-- Author: Andrew Diller -- | |
* Mon Oct 14 17:19:28 2024 -0400: added config.prg to IEC, basic framework | |
-- Author: Chris Osborn -- | |
* Sun Oct 13 10:48:48 2024 -0700: Added SmartPort CONTROL and STATUS commands to clear/get monitor Disk II /DRIVEn enable status. | |
* Sun Sep 29 08:21:45 2024 -0700: Add comments about ack is used as write protect. | |
* Tue Sep 10 10:36:01 2024 -0700: Added ability for Disk II to write. | |
-- Author: mozzwald -- | |
* Sat Oct 5 18:24:42 2024 -0500: apple2: update autorun.po. Adds Lobby and DiskII Write support | |
* Thu Oct 3 22:00:43 2024 -0500: apple2: fuji: add lobby boot option | |
==========CODE | |
import subprocess | |
import argparse | |
from collections import defaultdict | |
def parse_commits(start_date, end_date): | |
""" | |
Retrieve commit logs using git log for the given date range. | |
Format: commit_hash|author|date|commit message | |
""" | |
# Construct the git log command with date filtering | |
command = [ | |
"git", "log", | |
f"--since={start_date}", | |
f"--until={end_date}", | |
"--pretty=format:%H|%an|%ad|%s" | |
] | |
try: | |
result = subprocess.run(command, stdout=subprocess.PIPE, text=True, check=True) | |
except subprocess.CalledProcessError as e: | |
print("Error running git log:", e) | |
return [] | |
commits = [] | |
for line in result.stdout.splitlines(): | |
parts = line.split('|', 3) # split into 4 parts max | |
if len(parts) == 4: | |
commit_hash, author, date, message = parts | |
commits.append({ | |
'hash': commit_hash, | |
'author': author, | |
'date': date, | |
'message': message.strip() | |
}) | |
return commits | |
def categorize_commit(message): | |
""" | |
Categorize commit messages based on keywords. | |
""" | |
msg_lower = message.lower() | |
if "fix" in msg_lower or "bug" in msg_lower: | |
return "Bug Fixes" | |
elif "add" in msg_lower or "feature" in msg_lower or "new" in msg_lower: | |
return "Features" | |
elif "doc" in msg_lower or "readme" in msg_lower: | |
return "Documentation" | |
else: | |
return "Other Changes" | |
def group_commits(commits): | |
""" | |
Group commits by category and then by author. | |
Returns a dictionary: {category: {author: [commit, ...]}} | |
""" | |
grouped = defaultdict(lambda: defaultdict(list)) | |
for commit in commits: | |
category = categorize_commit(commit['message']) | |
grouped[category][commit['author']].append(commit) | |
return grouped | |
def generate_summary(grouped_commits): | |
""" | |
Create a plain text summary with sections and authors noted. | |
""" | |
summary_lines = [] | |
for category, authors in grouped_commits.items(): | |
summary_lines.append(f"=== {category} ===") | |
for author, commits in authors.items(): | |
summary_lines.append(f"-- Author: {author} --") | |
for commit in commits: | |
summary_lines.append(f"* {commit['date']}: {commit['message']}") | |
summary_lines.append("") # blank line between authors | |
summary_lines.append("") # blank line between categories | |
return "\n".join(summary_lines) | |
def main(): | |
parser = argparse.ArgumentParser(description="Summarize Git commit logs for a specified date range.") | |
parser.add_argument("--start", required=True, help="Start date (e.g., 2024-10-31)") | |
parser.add_argument("--end", required=True, help="End date (e.g., 2025-01-02)") | |
args = parser.parse_args() | |
# Fetch and parse commits | |
commits = parse_commits(args.start, args.end) | |
if not commits: | |
print("No commits found for the given date range.") | |
return | |
# Group commits into categories and by author | |
grouped = group_commits(commits) | |
# Generate and output the summary | |
summary = generate_summary(grouped) | |
print(summary) | |
if __name__ == "__main__": | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment