Skip to content

Commit

Permalink
fix: Handle local repo parsing error when path < 2 indexes.
Browse files Browse the repository at this point in the history
  • Loading branch information
eli64s committed Oct 22, 2023
1 parent 179dc2c commit d558959
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 1,966 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ notebooks/
.benchmarks/

# Other
docs/templates
docs/docs
docs/notes
examples/readme-edgecase.md
readmeai/conf/templates
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<div align="right">

[![CN](https://img.shields.io/badge/CN-🇨🇳-white?style=plastic)](https://github.com/eli64s/readme-ai/blob/main/docs/README-zh-CN.md)
[![DE](https://img.shields.io/badge/DE-🇩🇪-white?style=plastic)](https://github.com/eli64s/readme-ai/blob/main/docs/README-de.md)
[![FR](https://img.shields.io/badge/FR-🇫🇷-white?style=plastic)](https://github.com/eli64s/readme-ai/blob/main/docs/README-fr.md)
[![CN](https://img.shields.io/badge/CN-🇨🇳-white?style=plastic)](https://github.com/eli64s/readme-ai/blob/main/docs/README-zh-CN.md)
[![DE](https://img.shields.io/badge/DE-🇩🇪-white?style=plastic)](https://github.com/eli64s/readme-ai/blob/main/docs/README-de.md)
[![FR](https://img.shields.io/badge/FR-🇫🇷-white?style=plastic)](https://github.com/eli64s/readme-ai/blob/main/docs/README-fr.md)
</div>

<div align="center">
Expand Down
676 changes: 0 additions & 676 deletions docs/README-de.md

This file was deleted.

648 changes: 0 additions & 648 deletions docs/README-fr.md

This file was deleted.

636 changes: 0 additions & 636 deletions docs/README-zh-CN.md

This file was deleted.

4 changes: 4 additions & 0 deletions docs/overview.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# README-AI


## Why README-AI?
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"

[tool.poetry]
name = "readmeai"
version = "0.4.030"
version = "0.4.031"
description = "Automated README.md file generator tool, powered by AI 🧚"
authors = ["Eli <[email protected]>"]
license = "MIT"
Expand Down
3 changes: 3 additions & 0 deletions readmeai/services/version_control.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,9 @@ def validate_file_permissions(temp_dir: Path) -> None:

def get_github_file_link(file: str, repo: str, user_repo_name: str) -> str:
"""Returns the file URL for a given file based on the platform."""
if Path(repo).exists():
return "local directory"

domain = repo.split("/")[2]
base_urls = {
"github.com": f"https://github.com/{user_repo_name}/blob/main/{file}",
Expand Down
2 changes: 1 addition & 1 deletion readmeai/settings/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ output = "readme-ai.md"
[prompts]
code_summary = """Offer a comprehensive summary that encapsulates the core functionalities of the code:
\nPath: {0}\nContents:\n{1}\n Aim for precision and conciseness in your explanation, ensuring a fine balance between detail and brevity.
Limit your response to a maximum of 350 characters (including spaces).
Limit your response to a maximum of 225 characters (including spaces).
"""
features = """Hello! Analyze the Git codebase {} and create a robust summary of the project's features.
The following information summarizes each file in the repository to help you get started: \n{}\n
Expand Down

0 comments on commit d558959

Please sign in to comment.