Package: gptize
GPTizegptizeis a tool for merging the contents of project files into a single text document. It is specifically designed to create datasets that can be loaded into ChatGPT for analysis or training. I,Aleksey Svetlov, created this tool because I was tired of copying file contents and paths to make GPT understand the context of my project. With gptize, this process is now automated and streamlined.FeaturesException handling for files based on.gitignore.Support for various encodings when reading files.Customizable output file naming based on the input file or directory name.Report generation including all processed files.Enhanced limit checks for file size and token count, with warnings logged instead of errors raised when limits are exceeded.InstallationTo installgptize, simply use pip:pipinstallgptizeThis command will installgptizeand all its dependencies. After installation, you can usegptizefrom the command line anywhere.UsageTo run gptize, you have several options:Basic UsageSimply invoke gptize in the command line to process the current directory:gptizeThis will process all files in the current directory and generate a report with a default name like gptize-output-folder-YYYYMMDD-HHMMSS.txt.Specifying a DirectoryTo process a specific directory, use:gptize/path/to/directoryThis will process all files in the specified directory and create a report named gptize-output-folder-YYYYMMDD-HHMMSS.txt.Specifying a Single FileFor processing a single file:gptize/path/to/file.txtThis will process only the specified file and generate a report named gptize-output-file_name-YYYYMMDD-HHMMSS.txt, where file_name is the name of the input file.Custom Output FileIf you want to specify a custom output file name, use the -o or --output option:gptize-ocustom_output.txtThis command will override the default naming convention and use custom_output.txt as the output file name.Uploading to ChatGPTAfter generating the merged file usinggptize, you can upload it to ChatGPT for improved context understanding. When making requests to ChatGPT, explicitly reference the uploaded file, for instance, using a phrase like... based on the imported txt file.See project file for contextThis approach significantly enhances the quality of ChatGPT's responses by providing it with specific context.Componentsgptizer.py: The main class for file processing.main.py: The entry point of the application.models.py: Data models for files and projects.output_builder.py: Output constructor for report generation.settings.py: Project settings.Author and MaintainerAlexey Svetlov- Creator and main maintainer.Contact InformationLinkedInTelegramEmail:alexeysvetlov92@gmail.comLicenseThe project is distributed under theMIT License.CHANGELOG[0.2.5] - 2023-11-25[Modification] Updated File Size and Token Count ChecksModified thecombine_filesmethod ingptizer.pyto log a warning instead of raising an error when the total size of the combined content exceeds theMAX_FILE_SIZE_BYTES_LIMITorMAX_TOKEN_COUNT_LIMITdefined insettings.py.[0.2.4] - 2023-11-16[Feature] Custom Output File NamingOutput files now include the name of the processed file or directory, enhancing traceability and identification.[Enhancement] Settings Method for Custom File NamesUpdated theSettingsclass with a new method to generate output file names incorporating the name of the input file or directory.[Modification] Main File Processing LogicModifiedmain.pyto adopt the new output file naming scheme.[Fix] Minor Bug Fixes and Performance ImprovementsAddressed various minor bugs and optimized performance.[0.2.3] - 2023-11-12[Enhancement] Detect binary files and handle errors gracefullyAdded binary file detection logic in load_file_content method.Improved error handling for file reading.Updated the OutputBuilder to handle binary files properly.