Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

delete structure module #551

Merged
merged 2 commits into from
May 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ if (NOT USE_SYSTEM_DEPENDENCIES)
include(CheckCXXSourceCompiles)
check_cxx_source_compiles("#include <format>\nint main(){ auto var = std::format(\"{}\", \"Hello\"); return 0; }"
HAS_STD_FORMAT)
endif()
endif ()

set(LIBRARY_NAME faker-cxx)

Expand Down Expand Up @@ -55,7 +55,6 @@ set(FAKER_SOURCES
src/modules/computer/Computer.cpp
src/modules/vehicle/Vehicle.cpp
src/modules/science/Science.cpp
src/modules/structure/Structure.cpp
)

add_library(${LIBRARY_NAME} ${FAKER_SOURCES})
Expand Down Expand Up @@ -92,7 +91,7 @@ install(EXPORT ${LIBRARY_NAME}-targets

if (HAS_STD_FORMAT AND NOT USE_SYSTEM_DEPENDENCIES)
target_compile_definitions(${LIBRARY_NAME} PRIVATE HAS_STD_FORMAT)
elseif(USE_SYSTEM_DEPENDENCIES)
elseif (USE_SYSTEM_DEPENDENCIES)
find_package(fmt REQUIRED)
target_link_libraries(${LIBRARY_NAME} PRIVATE fmt::fmt)
else ()
Expand Down
21 changes: 14 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,15 @@

## 🎯 Goal

The goal of Faker C++ is to provide a library similar to [Faker.js](https://github.com/faker-js/faker) for C++ community. Faker C++ helps with the creation of realistic and customizable fake data for testing and development purposes within C++ applications.
The goal of Faker C++ is to provide a library similar to [Faker.js](https://github.com/faker-js/faker) for C++
community. Faker C++ helps with the creation of realistic and customizable fake data for testing and development
purposes within C++ applications.

## Usage and Documentation

To properly use Faker C++ you must first consume the Faker library (see Consuming Library with CMake).
Once that is done, you need to include the proper header files depending on the module you wish to generate data from. The module header file names can be found in [docs](https://cieslarmichal.github.io/faker-cxx).
Once that is done, you need to include the proper header files depending on the module you wish to generate data from.
The module header file names can be found in [docs](https://cieslarmichal.github.io/faker-cxx).

Below is an example of how to use Faker C++ in your code.

Expand All @@ -42,7 +45,7 @@ int main()
std::cout << id << std::endl; // 58018063-ce5a-4fa7-adfd-327eb2e2d9a5
std::cout << email << std::endl; // [email protected]
std::cout << password << std::endl; // @cWLwgM#Knalxeb
std::cout << city << std::endl; // Sayreville
std::cout << city << std::endl; // Sayre ville
std::cout << streetAddress << std::endl; // 1716 Harriet Alley

return 0;
Expand All @@ -56,8 +59,9 @@ int main()
- 📖 Book - book title, genre, author, publisher, ISBN
- 🎨 Color - color names, rgb, hex, hcl
- 🛒 Commerce - commerce department, product name, sku, price
- 🏢 Company - company name, type, industry, catch phrase, buzz phrase
- 🏢 Company - company name, type, industry, catchphrase, buzz phrase
- 🖥️ Computer - type, manufacturer, model, CPU info, GPU info
- 🔐 Crypto - sha256, md5
- 💾 Database - column names, column types, database engines
- ℹ️ Datatype - booleans
- 📅 Date - past, future dates
Expand All @@ -74,11 +78,12 @@ int main()
- 🎥 Movie - actors, actresses, genres, movie titles
- 🎶 Music - artists, song names, genres
- 🔢 Number - random integers, floating point numbers
- 🧑 Person - first, last names, job titles, hobby, genders, sex, nationalitiy, language
- 🧑 Person - first, last names, job titles, hobby, genders, sex, nationality, language
- 📞 Phone - phone number, IMEI
- ⚽ Sport - sport names, athletes, events
- 🔢 String - uuids, alphanumeric, numeric, hexadecimal
- 💻 System - file paths, file extensions, file names, directories, semantic version
- 🚗 Vehicle - vehicle types, makes, models, fuel types, license plates
- 🎮 Video game - title, genre, platform, studio
- 🌤️ Weather - temperature, pressure, humidity, weather description
- 💬 Word - sample words, nouns, verbs
Expand Down Expand Up @@ -126,12 +131,14 @@ If you have any confusion please refer to the respective guides.
- GTest (set `BUILD_FAKER_CXX_TESTS=OFF` CMake flag to disable this dependency)
- fmt (only for compilers that don't support std::format)

In order to use external dependencies installed in your system, you can set the `USE_SYSTEM_DEPENDENCIES` CMake flag to `ON`.
In order to use external dependencies installed in your system, you can set the `USE_SYSTEM_DEPENDENCIES` CMake flag
to `ON`.

## ✨ Contributing

We would love it if you contributed to Faker C++! 🚀

Before contributing please review our [CONTRIBUTING](https://github.com/cieslarmichal/faker-cxx/blob/main/CONTRIBUTING.md) guide.
Before contributing please review
our [CONTRIBUTING](https://github.com/cieslarmichal/faker-cxx/blob/main/CONTRIBUTING.md) guide.

Additionally, we encourage you to join our [Discord Channel](https://discord.gg/h2ur8H6mK6) for contributors.
Loading
Loading