Sign In

Prompt Combiner - The Simplest Tool for Combining Text Files

14

Dec 10, 2024

tool guide
Prompt Combiner - The Simplest Tool for Combining Text Files

So, what does this tool do?

  • Reminder: Please read the 'readme.txt' first, then install the requirements using 'install_dependencies.bat'. This will install the requirements listed in 'requirements.txt'. When running the .bat file, you will be prompted to install Python or pip along with the requirements from the req.txt.


(NEW BETA TOOL V1.0.0 - Updated 12/9/2024): https://civitai.com/articles/9606/beta-danbooru-tag-fetcher-v100

This combiner was created for the Danbooru tag fetcher:
https://civitai.com/articles/8021/my-danbooru-tag-fetcher-v08v09
to merge all your prompts into a single .txt file.

Whether you're using it with the 'dynamic prompts' extension, as a wildcard, or for a single training data file, you can combine all your .txt files into one.

For example, I have about 36 folders, each containing around 10 to 20 prompt.txt files, "421 .txt files" and I want to merge them into one .txt file:


One option is to 'drag and drop' the files, but a more tedious method would be to copy and paste them into Notepad. Instead, I decided to write a '.bat or .py' script to combine them all into one file.

This tool has two functions: it can either combine the current folders in an organized manner or randomize and mix them up:

  • This means you can take all your prompt folders and get a random output when using them as a wildcard. I've also included a log terminal that shows where your files are being saved and how many files were converted.

  • Additionally, you can rename your prompt.txt file or leave it as is; the tool will automatically add a number if there's an existing prompt.txt file.

  • I’ve also added themes like Dark and Light mode. Overall, the tool is easy to use. I originally planned to integrate this with the fetch tool I created, but since the code for the Danbooru fetcher is quite lengthy, I decided to keep them as separate tools for now.


Overall, it’s a basic design—nothing too special. It’s just a way to combine all the .txt folders into a single batch file. I created this tool a while back, and while it was more advanced at the time, it has become outdated and lacks many features.

This new tool is simple and straightforward. I might redo the UI and add more functions in the future, but for now, it’s working well as it is. You can even add this tool alongside the fetch tool by creating a folder called "Tools" and making a shortcut to the .exe file.

I think there was an existing tool similar to mine at some point, but I can’t remember what it was called. The original prompt combiner was based on my old .bat CMD converter, which is now outdated. I wanted something new, so I’m working on improving the design and the GUI layout. It’ll take some time and a bit of code fixing, but I hope you enjoy the tool!

14