Knowledge Dump

Text Converter

This simple application lets the user specify some text strings, which will be converted to another set of strings. The underlying functions are written in C++17 and the user interface was built with Qt (Qt version 5.13.0, MinGW 7.3.0).
It's a small convenience app, which I mostly use to replace symbols with HTML entities in code snippets for this site (particularly <> brackets and & signs). The app was made for personal use, so it's definitely not perfectly implemented – several aspects of it could be easily expanded for a better user experience. For example, the conversions are not applied all at once, but one after another (which may be desired or not). The words are replaced in the order they are written on the line, i.e. different ordering may yield differing output.

Download(zip) contains the program and source code. The executable is made for Windows OS – more versions could be easily created for other platforms, using the source files. Since the application was built as a standalone file using a static version of Qt, it can be used without any setup and doesn't require any .dll files. However, this also led to the file size being bigger than expected for such a small application (17MB).


Code files




How to use: (Example)

Add the text strings you want to replace in the "Replace" line, separated by three underscore "_" signs. Similarly, declare what they are to be replaced with in the next line box ("with this"). Since each string needs to be replaced by another, the amount of strings separated by "___" must be identical in both lines.
Patterns can be saved and loaded for future use. When saving a pattern as "default.txt" in the same directory as the executable, it is automatically loaded on the next application startup.

Example