new stuff

This commit is contained in:
elburg 2023-02-02 02:47:12 +00:00
commit af8e618f01
12 changed files with 413 additions and 0 deletions

View file

@ -0,0 +1,6 @@
err:
gen:
UnknownFeedType: "Unknown Feed"
UnknownFeedDescription: "Unknown Feed Description"
UnknownFeedName: "Unknown Feed Name"

View file

@ -0,0 +1,10 @@
gen:
feed:
any:
title:
search: "Search results for %s"
description:
search:
limited: "The top %d results for the search query '%s'"
unlimted: "All search results for the search query '%s'\n\n(WARNING: might be unstable!!!)"

View file

@ -0,0 +1,13 @@
<?xml version='1.0' encoding='UTF-8'?>
<data>
<result type="{{result.type}}">
{% if result.errors %}
<errors>
{% for item in result.errors %}
<error type="{{ result.errors[item].type }}" source="{{ result.errors[item].source }}">{{ result.errors[item].remark }}</error>
{% endfor %}
</errors>
{% endif %}
</result>
<outbody type="{{ outbody.type }}" compression="{{ outbody.compression if outbody.compression else "none" }}">{{ outbody.remark }}</outbody>
</data>

View file

@ -0,0 +1,47 @@
{# Metadata generator #}
<?xml version='1.0' encoding='UTF-8'?>
<rss version='2.0'>
<channel>
{% if result.rss.title %}
{% if ask.rss.type == "search" %}
<title>{{ strings.gen.feed.any.title.search.format(result.rss.title) }}</title>
{% elif ask.rss.type == "status" %}
<title>{{ strings.gen.feed.any.title.status }}</title>
{% else %}
<title>{{ strings.err.gen.UnknownFeedType }}</title>
{% endif %}
{% else %}
<title>{{ strings.err.gen.UnknownFeedName }}</title>
{% endif %}
{% if result.rss.description %}
{% if ask.rss.type == "search" %}
{% if ask.query.limit not 0 %}
<description>{{ strings.gen.feed.any.description.search.limited.format(ask.query.limit,result.rss.title) }}</description>
{% else %}
<description>{{ strings.gen.feed.any.description.search.unlimited.format(result.rss.title) }}</description>
{% endif %}
{% elif ask.rss.type == "status" %}
<description>{{ strings.gen.feed.any.description.status }}</description>
{% else %}
<description>{{ strings.err.gen.UnknownFeedDescription }}</description>
{% endif %}
{% endif %}
{% if result.rss.link %}
{% if ask.source %}
<link>{{ ask.source.urls.goto % result.rss.link }}</link>
{% else %}
<link>{{ result.rss.link }}</link>
{% endif %}
{% endif %}
<builddate>{{ ask.requestDate }}</builddate>
<pubdate></pubdate>
<language>{{ "%-%".format(ask.lang.lower(),ask.region.lower()) }}</language>
<generator>superTinySearch API Frontend v{{ meta.api.version }} using Python Jinja v3</generator>
{% for item in result.rss.items %}
{% include 'xml.blocks.rss2.item.xml.jinja' %}
{% endfor %}
</channel>
</rss>

View file

@ -0,0 +1,29 @@
<!DOCTYPE html>
<html>
<head>
<title>submitted url!</title>
</head>
<body>
<h1>url submitted!</h1>
<p>thank you for your submission! <i>[sts]</i> will process your contributions and will add or remove entires based on your input.</p><br><br>
<i>to recap, you submitted...</i><br>
{% for action in input.actions %}
{% if action.what == "scanurl" %}
<h2>a URL to scan...</h2>
<p>we will scan the page or file at <strong>{{ action.where }}</strong> and add that and any other URLs found from here...</p><br><br>
{% elif action.what == "removeurl" %}
<h2>a URL to remove from our databases...</h2>
{% if action.why == "personal" %}
<p>after we confirm that <strong>{{ action.where }}</strong> contains very personal information, we will remove this and blacklist our scanners to prevent this from being scanned ever again...</p>
{% elif action.why == "malicious" %}
<p>after we confirm that <strong>{{ action.where }}</strong> contains malicious content, we will remove this and blacklist our scanners to prevent this from being scanned ever again...</p>
<p>(if this url is exceptionally dangerous, please report this url to it's hosting provider, or to the proper authorities.)</p>
{% elif action.why == "false" %}
<p>after we confirm that <strong>{{ action.where }}</strong> contains false content, we will remove this and blacklist our scanners to prevent this from being scanned ever again...</p>
{% endif %}
{% endif %}
{% endfor %}
<hr>
<i>thaks for contributing to a <a title="free and open source software">foss project!</a></i>
</body>
</html>

View file

@ -0,0 +1,14 @@
<item>
<title>{{ item.title }}</title>
<link>{{ item.link }}</link>
<description>{{ item.description|e }}</description>
{% if item.author != "None" %}
<author>{{ item.author }}</author>
{% endif %}
{% if item.tags %}
<category>{{ item.tags|join('/') }}</category>
{% endif %}
{% if item.indexDate != "None" %}
<pubDate>{{ item.indexDate }}</pubDate>
{% endif %}
</item>