github-activity-generator icon indicating copy to clipboard operation
github-activity-generator copied to clipboard

Add new features(Specify the end date)

Open HashCookie opened this issue 2 years ago • 0 comments

  1. Introduced a new command-line argument --end_date:
  • Within the arguments function, Added a new argument -ed or --end_date that allows users to specify an end date for the commits.
  1. Calculated the total number of days for commits:
  • In the main function, Added a conditional check to see if the --end_date argument was provided.
  • If --end_date was given, Calculated the number of days from start_date to end_date and stored it in the total_days variable.
  • If --end_date wasn't provided, then total_days is the sum of days_before and days_after.
  1. Modified the commit loop:
  • Adjusted the primary for loop to use total_days as its range instead of the original days_before + days_after.
  1. Removed redundant code:
  • Removed a redundant if args.end_date: block since total_days was already calculated in the previous code.

With these modifications, the following features have been added to the script:

  • Allow users to specify an end date for commits.
  • Calculate the total number of days for commits based on the specified end date.
  • Ensure commits are made within the specified date range.

HashCookie avatar Aug 11 '23 14:08 HashCookie