From 2582bf7e2f5d7de4bb970c9084af05a8b45ead2a Mon Sep 17 00:00:00 2001 From: S David <2100425+s-daveb@users.noreply.github.com> Date: Fri, 19 Apr 2024 20:01:38 -0400 Subject: [PATCH] Add CI/CD status badge to README.md --- README.md | 6 ++++- include/CgiApplication.hpp | 4 ++-- include/CgiClientApp.hpp | 48 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 55 insertions(+), 3 deletions(-) create mode 100644 include/CgiClientApp.hpp diff --git a/README.md b/README.md index bb4fa80..f660976 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,11 @@ # mdml-cgi - `mdml-cgi` is a C++ application designed to be used as a Common Gateway Interface (CGI) script by web servers. It facilitates the generation of HTML content by combining a template and a Markdown file. The project utilizes the [cmark](https://github.com/commonmark/cmark) library for Markdown parsing. The license for the cmark library can be found in the root directory. +### CI/CD Build Status +| Arch Linux | FreeBSD 14.0 | macOS | Windows| +-------------|--------------|-------|--------| +|![Build Status](https://buildbot.beniquez.me/badges/mdml-cgi-linux-builder.svg) |![Build Status](https://buildbot.beniquez.me/badges/mdml-cgi-macos-builder.svg) | ![Build Status](https://buildbot.beniquez.me/badges/mdml-cgi-freebsd-builder.svg) | TBD | + ## Features - **Markdown to HTML:** Convert Markdown content to HTML using the powerful cmark library. diff --git a/include/CgiApplication.hpp b/include/CgiApplication.hpp index 95b15d4..8ce1c24 100644 --- a/include/CgiApplication.hpp +++ b/include/CgiApplication.hpp @@ -1,5 +1,5 @@ /* CGIhandler.hpp - * Copyright © 2023 Saul D. Beniquez + * Copyright © 2023-2024 Saul D. Beniquez * License: Mozilla Public License v. 2.0 * * This Source Code Form is subject to the terms of the Mozilla Public License, @@ -51,4 +51,4 @@ class CgiApplication } // clang-format off -// vim: set foldmethod=marker foldmarker=@{,@} textwidth=81 ts=8 sts=0 sw=8 noexpandtab ft=cpp.doxygen : +// vim: set foldmethod=syntax foldminlines=10 textwidth=80 ts=8 sts=0 sw=8 noexpandtab ft=cpp.doxygen : diff --git a/include/CgiClientApp.hpp b/include/CgiClientApp.hpp new file mode 100644 index 0000000..725e170 --- /dev/null +++ b/include/CgiClientApp.hpp @@ -0,0 +1,48 @@ +/* CGIhandler.hpp + * Copyright © 2023-2024 Saul D. Beniquez + * License: Mozilla Public License v. 2.0 + * + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v.2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at https://mozilla.org/MPL/2.0/. + */ + +#pragma once + +#include "Application.hpp" +#include "IRequestHandler.hpp" + +#include "types.hpp" + +#include +#include +#include + +namespace mdml { + +using IOCore::Application; + +class IRouteHandler; + +class CgiClientApp + : public Application + , public IRequestHandler { + + public: + CgiClientApp(int argc, c::const_string argv[], c::const_string env[]); + ~CgiClientApp() override; + + // Disabled copy and assignment operators @{ + CgiClientApp(const CgiClientApp&) = delete; + CgiClientApp(CgiClientApp&&) = delete; + auto operator=(const CgiClientApp&) -> CgiClientApp& = delete; + auto operator=(CgiClientApp&&) -> CgiClientApp& = delete; + // @} + + auto run() -> int override; + auto processRequest() -> Result override; +}; + +} +// clang-format off +// vim: set foldmethod=syntax foldminlines=10 textwidth=80 ts=8 sts=0 sw=8 noexpandtab ft=cpp.doxygen :