mirror of
https://github.com/kirill-markin/repo-to-text.git
synced 2025-12-06 03:22:23 -08:00
cleanup
This commit is contained in:
parent
118da435cc
commit
f7b0e7df8e
1 changed files with 3 additions and 1 deletions
|
|
@ -93,7 +93,7 @@ def save_repo_to_text(path='.') -> str:
|
||||||
|
|
||||||
with open(output_file, 'w') as file:
|
with open(output_file, 'w') as file:
|
||||||
project_name = os.path.basename(os.path.abspath(path))
|
project_name = os.path.basename(os.path.abspath(path))
|
||||||
file.write(f'Project: {project_name}\n\n')
|
file.write(f'Directory: {project_name}\n\n')
|
||||||
file.write('Directory Structure:\n')
|
file.write('Directory Structure:\n')
|
||||||
file.write('```\n.\n')
|
file.write('```\n.\n')
|
||||||
|
|
||||||
|
|
@ -123,6 +123,8 @@ def save_repo_to_text(path='.') -> str:
|
||||||
logging.error(f'Could not decode file contents: {file_path}')
|
logging.error(f'Could not decode file contents: {file_path}')
|
||||||
file.write('[Could not decode file contents]\n')
|
file.write('[Could not decode file contents]\n')
|
||||||
file.write('\n```\n')
|
file.write('\n```\n')
|
||||||
|
|
||||||
|
file.write('\n')
|
||||||
logging.debug('Repository contents written to file')
|
logging.debug('Repository contents written to file')
|
||||||
|
|
||||||
# Read the contents of the generated file
|
# Read the contents of the generated file
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue