A set tools in python to generate boilerplate code for cpp
generate blank unit (include + src)
generate cpp class
manage template
specify a list of markers (comments) to group includes
config : .gepetto.toml
[naming]
wordSeparation=caravan
# camel --> camel case, first letter is lowercase e.g. `eventHandlerOnWifiConnect` --> constant is `EVENT_HANDLER_ON_WIFI_CONNECT`
# snake --> snake case, all letter are lowercase e.g. `event_handler_on_wifi_connect` --> constant is `EVENT_HANDLER_ON_WIFI_CONNECT`
# caravan --> atomic groups of words in camel case, separated with underscore, like "a caravan of camels", e.g. `eventHandler_onWifiConnect` --> constant is `EVENT_HANDLER__ON_WIFI_CONNECT`
caravanSeparator=".,:;"
# the list of characters that create a separation between atomic groups of words. A sequence of such separation characters gives only one separation.
# e.g. `event handler,, on wifi connect` will give `eventHandler_onWifiConnect`
[licence]
spdxId=GPL-3.0-or-later
copyrightFirstYear=2019
copyrightHolders="David SPORN"
# multiple holders = "Anna DOE","Bernard DOE"
[includes]
groups=system,esp32,project
[group.system]
label=System
always=<cstdint>
[group.esp32]
label=Esp32 IdF
[group.project]
label=Project
CLI : gen blank
Synopsis
gepetto gen blank "event handler, on wifi connect" "path/to/include" ["path/to/src"]
Assuming the configuration described previously.
Will generate "path/to/include/eventHandler_onWifiConnect.hpp"
// Event handler, on wifi connect
// ---
// (c) 2019 to 2023 -- David SPORN
// SPDX-License-Identifier: GPL-3.0-or-later
// ---
#ifndef EVENT_HANDLER__ON_WIFI_CONNECT__HPP
#define EVENT_HANDLER__ON_WIFI_CONNECT__HPP
// --- System includes ---
#include <cstdint>
// --- Esp32 IdF includes ---
// --- Project includes ---
// --- your code here ---
#endif
CPP Toolbox -- cipitobo --> cipito --> gepetto
A set tools in python to generate boilerplate code for cpp
generate blank unit (include + src)
generate cpp class
manage template
config : .gepetto.toml
CLI : gen blank
Synopsis
Assuming the configuration described previously.