mirror of
https://forge.fsky.io/lda/Parsee.git
synced 2026-03-13 16:55:10 +00:00
[MOD] Start preparing for an alpha
The (9)th.
This commit is contained in:
parent
80bab890f6
commit
34bd036ab7
6 changed files with 58 additions and 7 deletions
|
|
@ -1,6 +1,6 @@
|
||||||
Some dates for Parsee-related events. They mostly serve as LDA's TODOs with
|
Some dates for Parsee-related events. They mostly serve as LDA's TODOs with
|
||||||
a strict deadline:
|
a strict deadline:
|
||||||
- ~September 2024[star-of-hope]:
|
- ~September 2024[tomboyish-bridges-adventure]:
|
||||||
Get Parsee into the _Phantasmagoria of Bug View_ stage (essentially
|
Get Parsee into the _Phantasmagoria of Bug View_ stage (essentially
|
||||||
v0.0.1 for a public testing) once I can afford `yama`, and start
|
v0.0.1 for a public testing) once I can afford `yama`, and start
|
||||||
bridging the Matrix room alongside a shiny XMPP MUC, bridged by
|
bridging the Matrix room alongside a shiny XMPP MUC, bridged by
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
CODE=phantasmagoria
|
CODE=tomboyish-bridges-adventure
|
||||||
NAME=Parsee
|
NAME=Parsee
|
||||||
VERSION=0.0.0
|
VERSION=0.0.1
|
||||||
BINARY=parsee
|
BINARY=parsee
|
||||||
|
|
|
||||||
|
|
@ -76,6 +76,7 @@ Main(Array *args, HashMap *env)
|
||||||
"%s - v%s[%s] (Cytoplasm %s)",
|
"%s - v%s[%s] (Cytoplasm %s)",
|
||||||
NAME, VERSION, CODE, CytoplasmGetVersionStr()
|
NAME, VERSION, CODE, CytoplasmGetVersionStr()
|
||||||
);
|
);
|
||||||
|
ParseePrintASCII();
|
||||||
Log(LOG_INFO, "=======================");
|
Log(LOG_INFO, "=======================");
|
||||||
LogConfigIndent(LogConfigGlobal());
|
LogConfigIndent(LogConfigGlobal());
|
||||||
|
|
||||||
|
|
@ -224,8 +225,8 @@ Main(Array *args, HashMap *env)
|
||||||
}
|
}
|
||||||
|
|
||||||
Log(LOG_NOTICE, "Starting up local cronjobs...");
|
Log(LOG_NOTICE, "Starting up local cronjobs...");
|
||||||
cron = CronCreate( 30 MINUTES );
|
cron = CronCreate(10 SECONDS);
|
||||||
CronEvery(cron, 1 HOURS, ParseeCleanup, conf.handlerArgs);
|
CronEvery(cron, 5 MINUTES, ParseeCleanup, conf.handlerArgs);
|
||||||
ParseeCleanup(conf.handlerArgs);
|
ParseeCleanup(conf.handlerArgs);
|
||||||
|
|
||||||
CronStart(cron);
|
CronStart(cron);
|
||||||
|
|
|
||||||
26
src/Parsee/Logo.c
Normal file
26
src/Parsee/Logo.c
Normal file
|
|
@ -0,0 +1,26 @@
|
||||||
|
#include <Parsee.h>
|
||||||
|
|
||||||
|
#include <Cytoplasm/Log.h>
|
||||||
|
|
||||||
|
const char *parsee_ascii[PARSEE_ASCII_LINES] =
|
||||||
|
{
|
||||||
|
"----------------------------",
|
||||||
|
" =+======",
|
||||||
|
" || | _ _/__----",
|
||||||
|
" / || \\ ==+= _/_____\\_",
|
||||||
|
" | || | -|- L___J",
|
||||||
|
"_/ || \\_ ||| .______\\",
|
||||||
|
" || | | | |.____.|",
|
||||||
|
" || / | \\ |L____||",
|
||||||
|
" _// | | J"
|
||||||
|
};
|
||||||
|
|
||||||
|
void
|
||||||
|
ParseePrintASCII(void)
|
||||||
|
{
|
||||||
|
size_t i;
|
||||||
|
for (i = 0; i < PARSEE_ASCII_LINES; i++)
|
||||||
|
{
|
||||||
|
Log(LOG_INFO, "%s", parsee_ascii[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -385,11 +385,25 @@ end_error:
|
||||||
}
|
}
|
||||||
else if (replaced && data)
|
else if (replaced && data)
|
||||||
{
|
{
|
||||||
|
/* TODO: Unify these. Maybe even make a function
|
||||||
|
* that objectifies a stanza. */
|
||||||
|
size_t off =
|
||||||
|
reply_to ? ParseeFindDatastart(data->data) : 0;
|
||||||
|
HashMap *ev = ShoveStanza(
|
||||||
|
MatrixCreateReplace(event_id, data->data + off),
|
||||||
|
stanza
|
||||||
|
);
|
||||||
|
if (reply_to)
|
||||||
|
{
|
||||||
|
char *reply_id =
|
||||||
|
ParseeGetEventFromID(args, stanza, reply_to);
|
||||||
|
MatrixSetReply(ev, reply_id);
|
||||||
|
Free(reply_id);
|
||||||
|
}
|
||||||
event_id = ParseeGetEventFromID(args, stanza, replaced);
|
event_id = ParseeGetEventFromID(args, stanza, replaced);
|
||||||
Free(ASSend(
|
Free(ASSend(
|
||||||
args->config, mroom_id, encoded,
|
args->config, mroom_id, encoded,
|
||||||
"m.room.message",
|
"m.room.message", ev
|
||||||
ShoveStanza(MatrixCreateReplace(event_id, data->data), stanza)
|
|
||||||
));
|
));
|
||||||
ParseePushAllStanza(args, stanza, event_id);
|
ParseePushAllStanza(args, stanza, event_id);
|
||||||
pthread_mutex_unlock(&thr->info->chk_lock);
|
pthread_mutex_unlock(&thr->info->chk_lock);
|
||||||
|
|
|
||||||
|
|
@ -100,6 +100,16 @@ typedef struct Argument {
|
||||||
/* A base64-encoded Parsee logo */
|
/* A base64-encoded Parsee logo */
|
||||||
extern const char media_parsee_logo[];
|
extern const char media_parsee_logo[];
|
||||||
|
|
||||||
|
/* An ASCII-art rendition of "小橋" */
|
||||||
|
#define PARSEE_ASCII_LINES 9
|
||||||
|
extern const char *parsee_ascii[PARSEE_ASCII_LINES];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Prints the Parsee ASCII logo.
|
||||||
|
* ------------
|
||||||
|
* Modifies: the logger output */
|
||||||
|
extern void ParseePrintASCII(void);
|
||||||
|
|
||||||
/** Generates a valid, getopt-style argument list from a end-terminated
|
/** Generates a valid, getopt-style argument list from a end-terminated
|
||||||
* argument list.
|
* argument list.
|
||||||
* ------------
|
* ------------
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue