https://github.com/appleboiy/testfiles
Various files generator for testing purposes.
https://github.com/appleboiy/testfiles
Last synced: about 2 months ago
JSON representation
Various files generator for testing purposes.
- Host: GitHub
- URL: https://github.com/appleboiy/testfiles
- Owner: AppleBoiy
- License: mit
- Created: 2024-07-21T09:45:02.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2024-07-24T09:20:27.000Z (10 months ago)
- Last Synced: 2025-04-05T17:38:02.106Z (about 2 months ago)
- Language: C++
- Homepage: https://github.com/ape-docs/testfiles
- Size: 107 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# files generator
Various files generator for testing purposes.
## Libraries
lodepng:
Library Path: lib/lodepng/lodepng.cpp
Include Path: lib/lodepnglibharu (for PDF generation if applicable):
Include Path: /opt/homebrew/Cellar/libharu/2.4.4/include
libjpeg:
Find Package: find_package(JPEG REQUIRED)gif_lib (for GIF generation):
Find Package: find_package(GIF REQUIRED)
Include Path: lib/gif## Usage
example: main.cpp
modify the main.cpp file to generate the desired file type.```c++
#include "image/ImageGenerator.h"
#include "text/TextFileGenerator.h"
#include "Generator.h"void generateImage() {
// RASTER Image Generator Example
ImageGenerator generatorPNG(400, 400, ImageFormat::PNG);
generatorPNG.create("image.png");
generatorPNG.applyColorMode(ColorMode::NONE);
generatorPNG.save();// ... rest of the raster image formats
}void generateTextFile() {
// Text File Generator Example
TextFileGenerator generatorJSON(100, TextFormat::JSON);
generatorJSON.create("data.json");
generatorJSON.save();// ... rest of the text file formats
}int main() {
// generateImage();
// generateTextFile();
Generator generator("file", FileType::EXECUTABLE);
generator.generate();
return 0;
```### Build
```shell
$ mkdir build && cd build
$ cmake ..
$ make
$ ./testfiles # this will generate the files in the build/dist directory
```## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.