github-activity-generator
github-activity-generator copied to clipboard
Add new features(Specify the end date)
- 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.
- 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.
- Modified the commit loop:
- Adjusted the primary for loop to use total_days as its range instead of the original days_before + days_after.
- 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.