minrss/config.def.h

61 lines
1.6 KiB
C
Raw Normal View History

/*
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.
This program 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 General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.
© 2021 dogeystamp <dogeystamp@disroot.org>
*/
2022-05-23 12:04:36 -04:00
#include <curl/curl.h>
2021-08-02 11:41:15 -04:00
typedef struct {
const char *url;
const char *feedName;
} linkStruct;
/* Example link:
{
.url = "https://example.com/rss/feed.rss",
// This will be used as the folder name for the feed.
.feedName = "examplefeed",
},
*/
static const linkStruct links[] = {
{
.url = "",
.feedName = "",
},
};
/*
* 0: Fatal errors
* 1: Errors
2022-05-23 12:27:00 -04:00
* 2: Normal output
2021-08-02 11:41:15 -04:00
* 3: Info messages
* 4: Verbose mode
*/
2022-05-23 12:27:00 -04:00
static const int logLevel = 2;
2021-08-02 11:41:15 -04:00
// Set the maximum amount of redirects curl will follow.
// Use 0 to disable redirects, and -1 for no limit.
static const int maxRedirs = 10;
2021-08-11 17:22:07 -04:00
2022-05-23 12:04:36 -04:00
// Restrict allowed protocols for curl using a bitmask.
// For more information: https://curl.se/libcurl/c/CURLOPT_PROTOCOLS.html
static const int curlProtocols = CURLPROTO_HTTPS | CURLPROTO_HTTP;
2022-10-29 22:29:34 -04:00
enum outputFormats {
OUTPUT_HTML,
#ifdef JSON
OUTPUT_JSON,
#endif // JSON
};
// When saving, sets the format of the saved file.
static const enum outputFormats outputFormat = OUTPUT_HTML;