mirror of
https://forge.fsky.io/lda/Parsee.git
synced 2026-03-13 16:45:10 +00:00
[MOD/WIP] Allow flat-file support, manpage updates
This commit is contained in:
parent
de8fd53a6f
commit
6c32868ca0
6 changed files with 30 additions and 9 deletions
14
src/Main.c
14
src/Main.c
|
|
@ -40,7 +40,6 @@ Main(Array *args, HashMap *env)
|
|||
Cron *cron = NULL;
|
||||
|
||||
start = UtilTsMillis();
|
||||
/* TODO: Read args(config file, HTTP/XMPP threads, ...) */
|
||||
|
||||
memset(&conf, 0, sizeof(conf));
|
||||
Log(LOG_INFO,
|
||||
|
|
@ -61,7 +60,7 @@ Main(Array *args, HashMap *env)
|
|||
int http = 8;
|
||||
|
||||
ArgParseStateInit(&state);
|
||||
while ((flag = ArgParse(&state, args, "H:J:")) != -1)
|
||||
while ((flag = ArgParse(&state, args, "gH:J:")) != -1)
|
||||
{
|
||||
switch (flag)
|
||||
{
|
||||
|
|
@ -71,14 +70,17 @@ Main(Array *args, HashMap *env)
|
|||
case 'J':
|
||||
xmpp = strtol(state.optArg, NULL, 10);
|
||||
break;
|
||||
case 'g':
|
||||
/* Write out the config file to a YAML document */
|
||||
Log(LOG_INFO, "Generating YAML...");
|
||||
yaml = StreamOpen("parsee.yaml", "w");
|
||||
ParseeExportConfigYAML(yaml);
|
||||
StreamClose(yaml);
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
ParseeSetThreads(xmpp, http);
|
||||
}
|
||||
/* Write out the config file to a YAML document */
|
||||
yaml = StreamOpen("parsee.yaml", "w");
|
||||
ParseeExportConfigYAML(yaml);
|
||||
StreamClose(yaml);
|
||||
|
||||
Log(LOG_NOTICE, "Connecting to XMPP...");
|
||||
jabber = XMPPInitialiseCompStream(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue