Skip to content

A demo showing how to use the html-parser library in a C++ project

License

Notifications You must be signed in to change notification settings

florianmarkusse/html-parser-demo-cpp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HTML-PARSER-DEMO-CPP: A Demo Project for Using the html-parser in C++!

Overview

This is a demo project showcasing how to use the html-parser library in a C++ project. The html-parser library allows you to parse HTML files in your C applications.

Please note the -fpermissive flag that needs to be compiled with to allow the 'unsafe' C-casts in the html-parser. Moreover, I am constructing the memory arena manually instead of using the utility, flo_html_createArena. Dependent on your C++ guidelines, the casts used in the library may or may not be permitted in your project.

Getting Started

Follow these steps to set up and run the demo project:

  1. Clone the Repository: Clone this repository to your project folder using the following command:

    git clone https://github.com/florianmarkusse/html-parser-demo-cpp.git
  2. Install CMake: Ensure that you have CMake installed on your system. If not, you can find installation instructions here.

  3. Download the html-parser Library: Navigate to the html-parser-demo-cpp folder and create a libs directory. Then, clone the html-parser library in the new folder:

    mkdir libs
    cd libs
    git clone https://github.com/florianmarkusse/html-parser.git
  4. Build the html-parser Library:

    Build the html-parser library based on your platform. Use the appropriate method below:

    • For All Operating Systems:

      cd html-parser
      cmake -S . -B build/ -D CMAKE_BUILD_TYPE="Release" -D BUILD_SHARED_LIBS="false" -D BUILD_TESTS="false" -D BUILD_BENCHMARKS="false"
      cmake --build build/
    • For Linux or macOS: If you are on Linux or macOS, you can use the provided build.sh script. Run the script with the -h flag to view all available build options:

      ./build.sh 
  5. Build the Demo Project:

    Build the demo project located in the html-parser-demo-cpp folder. Use the following commands based on your operating system:

    • For All Operating Systems:
      cd ../..
      cmake -S . -B build/ -D CMAKE_BUILD_TYPE="Release"
      cmake --build build/
  6. Run the Demo Project:

    Execute the demo project in the html-parser-demo-cpp folder with the following command:

    build/html-parser-demo-cpp-Release

Feedback & Assistance

If you encounter any challenges or have suggestions related to the functionalities provided by this library, please do not hesitate to:

License

This project is licensed under the MIT License. See the LICENSE file for details.

About

A demo showing how to use the html-parser library in a C++ project

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published