-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
62 additions
and
2 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Project Name | ||
|
||
Version: N/A | ||
|
||
## Issues | ||
Issues: | ||
3498cdc update | ||
8ce10a8 test | ||
6d3031d Initial commit | ||
|
||
|
||
## Brainstorming Summary | ||
Brainstorming Summary: ... |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# generate_readme.py | ||
|
||
import os | ||
import subprocess | ||
|
||
def get_git_version(): | ||
try: | ||
version = subprocess.check_output(['git', 'describe', '--tags'], stderr=subprocess.STDOUT, text=True).strip() | ||
return f"Version: {version}" | ||
except subprocess.CalledProcessError: | ||
return "Version: N/A" | ||
|
||
def get_git_issues(): | ||
try: | ||
issues = subprocess.check_output(['git', 'log', '--oneline', '--no-merges'], stderr=subprocess.STDOUT, text=True) | ||
return f"Issues:\n{issues}" | ||
except subprocess.CalledProcessError: | ||
return "Issues: N/A" | ||
|
||
def get_brainstorming_summary(): | ||
# You can customize this function to read summaries from your brainstorming sessions | ||
return "Brainstorming Summary: ..." | ||
|
||
def generate_readme(): | ||
version = get_git_version() | ||
issues = get_git_issues() | ||
brainstorming_summary = get_brainstorming_summary() | ||
|
||
readme_content = f"""# Project Name | ||
{version} | ||
## Issues | ||
{issues} | ||
## Brainstorming Summary | ||
{brainstorming_summary} | ||
""" | ||
|
||
with open("README.md", "w") as readme_file: | ||
readme_file.write(readme_content) | ||
|
||
if __name__ == "__main__": | ||
generate_readme() | ||
|