Skip to content

Commit 00e0794

Browse files
authored
Merge branch 'main' into test-docs
2 parents 8046a6b + 123f0ef commit 00e0794

File tree

17 files changed

+186
-180
lines changed

17 files changed

+186
-180
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# GitIngest
1+
# Gitingest
22

3-
[![Image](./docs/frontpage.png "GitIngest main page")](https://gitingest.com)
3+
[![Image](./docs/frontpage.png "Gitingest main page")](https://gitingest.com)
44

55
[![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/cyclotruc/gitingest/blob/main/LICENSE)
66
[![PyPI version](https://badge.fury.io/py/gitingest.svg)](https://badge.fury.io/py/gitingest)
@@ -37,9 +37,9 @@ pip install gitingest
3737
## 🧩 Browser Extension Usage
3838

3939
<!-- markdownlint-disable MD033 -->
40-
<a href="https://chromewebstore.google.com/detail/adfjahbijlkjfoicpjkhjicpjpjfaood" target="_blank" title="Get GitIngest Extension from Chrome Web Store"><img height="48" src="https://github.com/user-attachments/assets/20a6e44b-fd46-4e6c-8ea6-aad436035753" alt="Available in the Chrome Web Store" /></a>
41-
<a href="https://addons.mozilla.org/firefox/addon/gitingest/" target="_blank" title="Get GitIngest Extension from Firefox Add-ons"><img height="48" src="https://github.com/user-attachments/assets/c0e99e6b-97cf-4af2-9737-099db7d3538b" alt="Get The Add-on for Firefox" /></a>
42-
<a href="https://microsoftedge.microsoft.com/addons/detail/nfobhllgcekbmpifkjlopfdfdmljmipf" target="_blank" title="Get GitIngest Extension from Firefox Add-ons"><img height="48" src="https://github.com/user-attachments/assets/204157eb-4cae-4c0e-b2cb-db514419fd9e" alt="Get from the Edge Add-ons" /></a>
40+
<a href="https://chromewebstore.google.com/detail/adfjahbijlkjfoicpjkhjicpjpjfaood" target="_blank" title="Get Gitingest Extension from Chrome Web Store"><img height="48" src="https://github.com/user-attachments/assets/20a6e44b-fd46-4e6c-8ea6-aad436035753" alt="Available in the Chrome Web Store" /></a>
41+
<a href="https://addons.mozilla.org/firefox/addon/gitingest/" target="_blank" title="Get Gitingest Extension from Firefox Add-ons"><img height="48" src="https://github.com/user-attachments/assets/c0e99e6b-97cf-4af2-9737-099db7d3538b" alt="Get The Add-on for Firefox" /></a>
42+
<a href="https://microsoftedge.microsoft.com/addons/detail/nfobhllgcekbmpifkjlopfdfdmljmipf" target="_blank" title="Get Gitingest Extension from Firefox Add-ons"><img height="48" src="https://github.com/user-attachments/assets/204157eb-4cae-4c0e-b2cb-db514419fd9e" alt="Get from the Edge Add-ons" /></a>
4343
<!-- markdownlint-enable MD033 -->
4444

4545
The extension is open source at [lcandy2/gitingest-extension](https://github.com/lcandy2/gitingest-extension).

src/config.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
""" Configuration file for the project. """
22

3+
from pathlib import Path
4+
35
MAX_DISPLAY_SIZE: int = 300_000
4-
TMP_BASE_PATH: str = "/tmp/gitingest"
6+
TMP_BASE_PATH = Path("/tmp/gitingest")
57
DELETE_REPO_AFTER: int = 60 * 60 # In seconds
68

79
EXAMPLE_REPOS: list[dict[str, str]] = [
8-
{"name": "GitIngest", "url": "https://github.com/cyclotruc/gitingest"},
10+
{"name": "Gitingest", "url": "https://github.com/cyclotruc/gitingest"},
911
{"name": "FastAPI", "url": "https://github.com/tiangolo/fastapi"},
1012
{"name": "Flask", "url": "https://github.com/pallets/flask"},
1113
{"name": "Tldraw", "url": "https://github.com/tldraw/tldraw"},

src/gitingest/cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
""" Command-line interface for the GitIngest package. """
1+
""" Command-line interface for the Gitingest package. """
22

33
# pylint: disable=no-value-for-parameter
44

src/gitingest/exceptions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
""" Custom exceptions for the GitIngest package. """
1+
""" Custom exceptions for the Gitingest package. """
22

33

44
class InvalidPatternError(ValueError):

src/gitingest/ignore_patterns.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
""" Default ignore patterns for GitIngest. """
1+
""" Default ignore patterns for Gitingest. """
22

33
DEFAULT_IGNORE_PATTERNS: list[str] = [
44
# Python

src/gitingest/ingest.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import inspect
55
import shutil
66

7+
from config import TMP_BASE_PATH
78
from gitingest.clone import CloneConfig, clone_repo
89
from gitingest.ingest_from_query import ingest_from_query
910
from gitingest.parse_query import parse_query
@@ -63,7 +64,7 @@ def ingest(
6364
# Extract relevant fields for CloneConfig
6465
clone_config = CloneConfig(
6566
url=query["url"],
66-
local_path=query["local_path"],
67+
local_path=str(query["local_path"]),
6768
commit=query.get("commit"),
6869
branch=query.get("branch"),
6970
)
@@ -84,6 +85,5 @@ def ingest(
8485
finally:
8586
# Clean up the temporary directory if it was created
8687
if query["url"]:
87-
# Clean up the temporary directory under /tmp/gitingest
88-
cleanup_path = "/tmp/gitingest"
89-
shutil.rmtree(cleanup_path, ignore_errors=True)
88+
# Clean up the temporary directory
89+
shutil.rmtree(TMP_BASE_PATH, ignore_errors=True)

0 commit comments

Comments
 (0)