diff --git a/authors.txt b/authors.txt new file mode 100644 index 0000000..9743ba6 --- /dev/null +++ b/authors.txt @@ -0,0 +1 @@ +Mr DUPIN Edouard \ No newline at end of file diff --git a/date/date.h b/date/date.h index 20b4b99..b09668d 100644 --- a/date/date.h +++ b/date/date.h @@ -9,12 +9,39 @@ #include +/** + * @brief date library namespace + */ namespace date { + /** + * @brief Get the Build year of the program + * @return The number of the year (ex: 2015 or 1995) + */ int32_t getYear(); + /** + * @brief Get the Build month id + * @return The number of the month (ex: 1 for january or 9 for september ...) + */ int32_t getMonth(); + /** + * @brief Get the Build day in the month + * @return The number of the month day [1..31] + */ int32_t getDay(); + /** + * @brief Get the Build hour + * @return The number of the hour [0..23] + */ int32_t getHour(); + /** + * @brief Get the Build Minute + * @return The number of the minute [0..59] + */ int32_t getMinute(); + /** + * @brief Get the Build second + * @return The number of the second [0..59] + */ int32_t getSecond(); }; diff --git a/doc/mainpage.md b/doc/mainpage.md new file mode 100644 index 0000000..747723a --- /dev/null +++ b/doc/mainpage.md @@ -0,0 +1,60 @@ +DATE library {#mainpage} +=============== + +@tableofcontents + +What is DATE, and how can I use it? {#date_mainpage_what} +==================================== + +Get the build date of the binary (simply externalyse to permit to not change the compilation flags of the program (just regenerate the SO and binary) + +What languages are supported? {#date_mainpage_lang} +============================= + +DATE is written in C++. + +Are there any licensing restrictions? {#date_mainpage_license_restriction} +===================================== + +DATE is **FREE software** and _all sub-library are FREE and staticly linkable !!!_ + +License (APACHE-2.0) {#date_mainpage_license} +==================== + +Copyright DATE Edouard DUPIN + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + + +Usage? {#date_mainpage_tutorial} +====== + +Use Date lib is really simple: + +Include library header +```{.cpp} +#include +``` +Call the fucntion you need: +```{.cpp} +std::cout << "Build year:" << date::getYear() << std::endl; +std::cout << "Build month:" << date::getMonth() << std::endl; +std::cout << "Build day:" << date::getDay() << std::endl; +std::cout << "Build hour:" << date::getHour() << std::endl; +std::cout << "Build minute:" << date::getMinute() << std::endl; +std::cout << "Build second:" << date::getSecond() << std::endl; +// or : +std::cout << "Build date:" << date::getDay() << "/" << date::getMonth() << "/" << date::getYear() << std::endl; +std::cout << "Build time:" << date::getHour() << "h" << date::getMinute() << ":" << date::getSecond() << std::endl; +``` + diff --git a/doxy_date.py b/doxy_date.py new file mode 100644 index 0000000..1f9bf30 --- /dev/null +++ b/doxy_date.py @@ -0,0 +1,22 @@ +#!/usr/bin/python +import os +import doxy.module as module +import doxy.debug as debug +import doxy.tools as tools + +def create(target, module_name): + my_module = module.Module(__file__, module_name) + my_module.set_version("version.txt") + my_module.set_title("date: basic build dator") + my_module.set_website("http://atria-soft.github.io/" + module_name) + my_module.set_website_sources("http://github.com/atria-soft/" + module_name) + my_module.add_path([ + module_name, + "doc" + ]) + my_module.add_file_patterns([ + '*.h', + '*.md', + ]) + + return my_module \ No newline at end of file diff --git a/lutin_date.py b/lutin_date.py index 616cabd..a376f55 100644 --- a/lutin_date.py +++ b/lutin_date.py @@ -4,7 +4,7 @@ import lutin.tools as tools import datetime def get_type(): - return "LIBRARY" + return "LIBRARY_STATIC" def get_desc(): return "Date buid date of the program" @@ -19,10 +19,10 @@ def get_compagny_name(): return "atria-soft" def get_maintainer(): - return ["Mr DUPIN Edouard "] + return "authors.txt" def get_version(): - return [0,2,"dev"] + return "version.txt" def create(target, module_name): my_module = module.Module(__file__, module_name, get_type()) diff --git a/version.txt b/version.txt new file mode 100644 index 0000000..3d16010 --- /dev/null +++ b/version.txt @@ -0,0 +1 @@ +0.2-dev \ No newline at end of file