mirror of
https://forge.fsky.io/lda/Parsee.git
synced 2026-03-13 16:55:10 +00:00
[MOD/ADD] Get rid of pre, modify /, and tools
Right now, only adminify exists, if you dare to build it yourself that is...
This commit is contained in:
parent
1f26684913
commit
1103425912
7 changed files with 196 additions and 7 deletions
|
|
@ -9,6 +9,7 @@
|
|||
RouteHead(RouteRoot, arr, argp)
|
||||
{
|
||||
ParseeHttpArg *args = argp;
|
||||
const ParseeConfig *config = args->data->config;
|
||||
const char *quote = RandInt(2) ?
|
||||
"Kinda jealous of that, to be fair." :
|
||||
"Why look inward when you can challenge the mainstream media?";
|
||||
|
|
@ -29,6 +30,7 @@ RouteHead(RouteRoot, arr, argp)
|
|||
P(" html {");
|
||||
P(" background-color: #222;");
|
||||
P(" color: #eee;");
|
||||
P(" font-family: sans-serif;");
|
||||
P(" }");
|
||||
P(" blockquote {");
|
||||
P(" border-left: 2px solid #ccc;");
|
||||
|
|
@ -65,9 +67,24 @@ RouteHead(RouteRoot, arr, argp)
|
|||
P(" href='https://kappach.at/parsee'");
|
||||
P(" >the actual page</a>.");
|
||||
P(" </p>");
|
||||
P(" <h2>Permissions?</h2>");
|
||||
P(" <p>");
|
||||
P(" If you have problems running commands, you may want to ");
|
||||
P(" look into if you have set yourself as an admin.");
|
||||
P(" <p>");
|
||||
P(" If you happen to have a build-from-source copy of %s,", NAME);
|
||||
P(" please build all utilities and run ");
|
||||
P(" <code>tools/out/adminify '%s' '[glob]'</code>.", config->db_path);
|
||||
P(" </p>");
|
||||
|
||||
P(" <h2>Extra information</h2>");
|
||||
P(" <p>");
|
||||
P(" <h3>Dev documentations!!!!</h3>");
|
||||
P(" Developers may be interested into looking up the ");
|
||||
P(" <a href='https://at.kappach.at'>at.kappach.at</a> ");
|
||||
P(" page for extensions used by Parsee on Matrix. ");
|
||||
P(" </p>");
|
||||
P(" <p>");
|
||||
P(" <h3>Parsee statistics</h3>");
|
||||
P("<pre><code>");
|
||||
P("Software: %s (v%s/Cyto %s)\n", NAME, VERSION, CytoplasmGetVersionStr());
|
||||
|
|
@ -79,13 +96,13 @@ RouteHead(RouteRoot, arr, argp)
|
|||
P(" <ul>");
|
||||
P(" <li><a href='%s'>Repository</a></li>", REPOSITORY);
|
||||
P(" <li><a href='%s'>Fediverse</a></li>", "https://ak.ari.lt/parsee");
|
||||
P(" <li><img src='%s' /></li>", "https://kappach.at/parsee.gif");
|
||||
P(" <li>CC0 88x31: <img src='%s' /></li>", "https://kappach.at/parsee.gif");
|
||||
P(" </ul>");
|
||||
P(" </p>");
|
||||
P(" <blockquote><p>");
|
||||
P(" <blockquote><i>");
|
||||
P(" Good luck, and have fun! :D");
|
||||
P(" </p></blockquote>");
|
||||
P(" <p>—LDA</p>");
|
||||
P(" </i></blockquote>");
|
||||
P(" <p>— LDA</p>");
|
||||
P(" </body>");
|
||||
P("</html>");
|
||||
#undef P
|
||||
|
|
|
|||
|
|
@ -195,6 +195,13 @@ XEP393Decode(StrView view, XEP393Element *root)
|
|||
{
|
||||
Spanify(XEP393_MONO);
|
||||
}
|
||||
else if (curr == '\n')
|
||||
{
|
||||
/* TODO: Remove this */
|
||||
span_view.start = subview.start;
|
||||
span_view.end = subview.start;
|
||||
Spanify(XEP393_NL);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Text character: update end */
|
||||
|
|
@ -249,6 +256,9 @@ ShoveXML(XEP393Element *element, XMLElement *xmlparent)
|
|||
head = XMLCreateTag("i");
|
||||
XMLAddChild(xmlparent, head);
|
||||
break;
|
||||
case XEP393_NL:
|
||||
XMLAddChild(xmlparent, XMLCreateTag("br"));
|
||||
break;
|
||||
case XEP393_EMPH:
|
||||
head = XMLCreateTag("strong");
|
||||
XMLAddChild(xmlparent, head);
|
||||
|
|
@ -285,7 +295,7 @@ XEP393ToXMLString(XEP393Element *xepd)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
root = XMLCreateTag("pre");
|
||||
root = XMLCreateTag("span");
|
||||
ShoveXML(xepd, root);
|
||||
|
||||
writer = StrStreamWriter(&ret);
|
||||
|
|
|
|||
|
|
@ -8,7 +8,8 @@ typedef enum XEP393Type {
|
|||
XEP393_ITALIC,
|
||||
XEP393_EMPH,
|
||||
XEP393_MONO,
|
||||
XEP393_TEXT
|
||||
XEP393_TEXT,
|
||||
XEP393_NL
|
||||
} XEP393Type;
|
||||
typedef struct XEP393Element {
|
||||
struct XEP393Element *parent;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue