Skip to content

Commit baeafd5

Browse files
committed
🐛 fix(readme): Remove extra newlines and trim whitespace
1 parent 7298157 commit baeafd5

File tree

3 files changed

+10
-42
lines changed

3 files changed

+10
-42
lines changed

.github/scripts/update_views.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import os
2+
import re
23
import yaml
34
import logging
45
from jinja2 import Environment, FileSystemLoader
@@ -87,9 +88,13 @@ def update_views():
8788
# Generate README content using the template and write to file
8889
logger.info("Generating README content")
8990
readme_content = readme_template.render(categories=sorted_categories, format_category=format_category)
91+
92+
# Remove multiple consecutive newlines
93+
readme_content = re.sub(r'\n{3,}', '\n\n', readme_content)
94+
9095
readme_path = 'README.md'
9196
with open(readme_path, 'w') as f:
92-
f.write(readme_content)
97+
f.write(readme_content.strip()) # Use strip() to remove leading/trailing whitespace
9398
logger.info(f"Wrote README content to {readme_path}")
9499

95100
logger.info("update_views process completed")

.github/templates/readme_template.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,12 @@ Welcome to the **Prompt Library**. This repository contains a collection of AI p
44

55
## 🗂️ Categories
66

7-
{% for category, prompts in categories.items() %}
8-
7+
{%- for category, prompts in categories.items() %}
98
### {{ format_category(category) }}
10-
11-
{% for prompt in prompts %}
9+
{%- for prompt in prompts %}
1210
- [{{ prompt.title }}]({{ prompt.path }}) - {{ prompt.description }}
13-
{% endfor %}
14-
{% endfor %}
11+
{%- endfor %}
12+
{%- endfor %}
1513

1614
## 🚀 Getting Started
1715

README.md

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -3,57 +3,22 @@
33
Welcome to the **Prompt Library**. This repository contains a collection of AI prompts categorized for easy navigation and reuse.
44

55
## 🗂️ Categories
6-
7-
8-
96
### Artificial Intelligence
10-
11-
127
- [God Tier Assistant Generator](prompts/god_tier_assistant_generator/view.md) - Generates innovative ideas for specialized AI assistants based on given topics
13-
148
- [AI Topic Idea Generator](prompts/ai_topic_idea_generator/view.md) - Generates diverse and innovative AI application ideas for specific domains
15-
16-
17-
189
### Documentation
19-
20-
2110
- [AI-Powered Code Repository Documentation Generator](prompts/ai_code_repository_documentation_generator/view.md) - Analyzes code repositories and generates comprehensive documentation autonomously
22-
23-
24-
2511
### Full Stack Development
26-
27-
2812
- [Advanced Software Development AI Assistant](prompts/advanced_software_development_ai_assistant/view.md) - Provides expert guidance and support throughout the entire software development lifecycle
29-
30-
31-
3213
### Project Management
33-
34-
3514
- [Software Specification Generator](prompts/software_specification_generator/view.md) - Creates comprehensive software specifications based on user requirements
36-
3715
- [GitHub Issue Creator Assistant](prompts/github_issue_creator_assistant/view.md) - Creates well-structured GitHub Issues from various types of input
38-
39-
40-
4116
### Refactoring
42-
43-
4417
- [Code Refactoring AI Assistant](prompts/code_refactoring_ai_assistant/view.md) - Analyzes, refactors, and tests code to improve quality, readability, and performance
45-
46-
47-
4818
### Version Control
49-
50-
5119
- [Git Commit Message Writer](prompts/git_commit_message_writer/view.md) - Generates concise, informative git commit messages following Conventional Commits with emojis
52-
5320
- [GitHub Pull Request Generator](prompts/github_pull_request_generator/view.md) - Generates comprehensive and well-structured GitHub pull requests
5421

55-
56-
5722
## 🚀 Getting Started
5823

5924
This repository is designed to be easily forked and customized for your own use. Follow these steps to get started:

0 commit comments

Comments
 (0)