From dd11f34cfa0dc078fef9aec390ebb6451ae0721f Mon Sep 17 00:00:00 2001 From: levasseur Date: Mon, 28 Jun 2021 12:30:26 +0200 Subject: [PATCH] improved documentation --- README.md | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 0a18a62..22f8bc4 100644 --- a/README.md +++ b/README.md @@ -29,20 +29,29 @@ cron-like service. Writing in progress. +### Naming conventions + +Because of internal mechanics the dash character is forbidden in module names. Thus Bash language also forbid that character in variable name. + +An other limit is, even if digits are allowed in module names and variable, they can't be used as a leading character or worse the full name being only made of digits. You can use as many digits you want in names but with at least a leading alphabetical (or underscore) character, whatever the case of that character will be. + +You can use upper case and lower case as you wish, with underscore character, even as leading character. Any other special character than alphanumerical or underscore is completely forbidden. + +Any submitted module to the central repository will have module name in lower case with underscore to separate words and ease reading, and variable name upper case with the same underscore as word separator. + ### Basic module structure Please note that modules are not supposed to contain any specific code for a platform or a distribution even if nothing block you doing so. It is highly -recommended to use configurations files to introduice any platform dependent +recommended to use configurations files to introduce any platform dependent code. -In the following exemple @template@ have to be replaced par le nom de votre -module qui doit être nomé @template@.sh. Vous pouvez automatiquement créer votre -nouveau module avec la commande suivante : +In the following exemple @template@ have to be replaced with the name of your +module with the filename @template@.sh. You can automatically create your new module with the following command: ```shell -sed -e "s/@template@/nom_module/g" -e "/^# .*/d" -e "s/^##/# /" template > \ - nom_module.sh +sed -e "s/@template@/module_name/g" -e "/^# .*/d" -e "s/^##/# /" template > \ + module_name.sh ``` Versionning modules is up to you but the recommended behavior follows somme