56 lines
1.7 KiB
C++
56 lines
1.7 KiB
C++
/*
|
|
* Copyright (C) 2022 luca0N!
|
|
*
|
|
* This file is part of Static Website Generator (swg).
|
|
*
|
|
* Static Website Generator (swg) is free software: you can redistribute it
|
|
* and/or modify it under the terms of the version 3 of the GNU Lesser General
|
|
* Public License as published by the Free Software Foundation.
|
|
*
|
|
* Static Website Generator (swg) is distributed in the hope that it will be
|
|
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser
|
|
* General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU Lesser General Public License
|
|
* along with Static Website Generator (swg). If not, see
|
|
* <https://www.gnu.org/licenses/>.
|
|
*
|
|
* Contact luca0N! by e-mail: <luca0n [at] luca0n [dot] com>.
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#define PROGRAM_NAME "SWG"
|
|
#define PROGRAM_VERSION 1
|
|
#define PROGRAM_VERSION_NAME "0.1-dev"
|
|
#define PROGRAM_COPYRIGHT "luca0N!"
|
|
#define PROGRAM_COPYRIGHT_YEARS "2022"
|
|
|
|
#define RETURN_SUCCESSFUL 0
|
|
|
|
#define RETURN_FAILED_INVALID_SYNTAX 1
|
|
#define RETURN_FAILED_CONFIG_INVALID_SYNTAX 2
|
|
#define RETURN_FAILED_INVALID_DIRECTORY 3
|
|
#define RETURN_FAILED_WEBSITE_BUILD_EXISTS 4
|
|
|
|
#define RETURN_FAILED_UNKNOWN_ERROR 10
|
|
|
|
#include <filesystem>
|
|
#include <string>
|
|
|
|
struct Blog {
|
|
char name[64],
|
|
path[64],
|
|
dir[64];
|
|
int test;
|
|
};
|
|
|
|
const char* get_hr_month(unsigned short month);
|
|
std::string getFilename(std::string const &path, bool const ext = true);
|
|
std::filesystem::path get_output_path(std::string const &path);
|
|
bool is_special_file(std::string const &filename);
|
|
std::string get_template(std::string const &path);
|
|
|
|
extern bool verbose;
|