13## Authentication
14
15Login to your SQLite Explorer with [password authentication](https://www.val.town/v/pomdtr/password_auth) with your [Val Town API Token](https://www.val.town/settings/api) as the password.
16
17## Todos / Plans
26 <head>
27 <title>SQLite Explorer</title>
28 <link rel="preconnect" href="https://fonts.googleapis.com" />
29
30 <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
31 <link
32 href="https://fonts.googleapis.com/css2?family=Fira+Code:wght@300..700&family=Source+Sans+3:ital,wght@0,200..900;1,200..900&display=swap"
33 rel="stylesheet"
34 />
103 <path stroke-linecap="round" stroke-linejoin="round" d="M9 6.75V15m6-6v8.25m.503 3.498 4.875-2.437c.381-.19.622-.58.622-1.006V4.82c0-.836-.88-1.38-1.628-1.006l-3.869 1.934c-.317.159-.69.159-1.006 0L9.503 3.252a1.125 1.125 0 0 0-1.006 0L3.622 5.689C3.24 5.88 3 6.27 3 6.695V19.18c0 .836.88 1.38 1.628 1.006l3.869-1.934c.317-.159.69-.159 1.006 0l4.994 2.497c.317.158.69.158 1.006 0Z"></path>
104 </svg>
105 <div class="font-semibold group-hover:text-black">Web scraping</div>
106 </button>
107 <button class="group bg-gray-50 border-gray-300 flex items-center gap-2 overflow-hidden rounded border p-3 text-left transition-colors hover:border-blue-500 hover:shadow-md">
5
6const app = new Hono();
7const apiKey = Deno.env.get("OPEN_MODERATOR_API_KEY");
8
9if (!apiKey) {
10 console.error("API key not set. Please set the OPEN_MODERATOR_API_KEY environment variable.");
11} else {
12 console.log("API key is set.");
13}
14
15const filter = new Filter({ openModeratorAPIKey: apiKey });
16
17app.get("/", (c) => {
106 // checkManualProfanityList is optional and defaults to false; it checks for the words in lang.ts (if under 50 words) before hitting the AI model. Note that this affects performance.
107 checkManualProfanityList: false,
108 // provider defaults to "google-perspective-api" (Google's Perspective API); it can also be "openai" (OpenAI Moderation API) or "google-natural-language-api" (Google's Natural Language API)
109 provider: "google-perspective-api",
110 };
111
5
6const app = new Hono();
7const apiKey = Deno.env.get("OPEN_MODERATOR_API_KEY");
8
9if (!apiKey) {
10 console.error("API key not set. Please set the OPEN_MODERATOR_API_KEY environment variable.");
11} else {
12 console.log("API key is set.");
13}
14
15const filter = new Filter({ openModeratorAPIKey: apiKey });
16
17app.get("/", (c) => {
107 // checkManualProfanityList is optional and defaults to false; it checks for the words in lang.ts (if under 50 words) before hitting the AI model. Note that this affects performance.
108 checkManualProfanityList: false,
109 // provider defaults to "google-perspective-api" (Google's Perspective API); it can also be "openai" (OpenAI Moderation API) or "google-natural-language-api" (Google's Natural Language API)
110 provider: "google-perspective-api",
111 };
112
6Future features will include moderation tools (auto-ban, bots), more powerful models, and multimedia support for video and audio moderation.
7
8To get an API key for the AI endpoints sign up free at https://www.openmoderator.com
9To install content-checker do `npm install content-checker` and check out the README: https://github.com/utilityfueled/content-checker
10
960 "🔞": ":underage:",
961 "🔟": ":keycap_ten:",
962 "🔠": ":capital_abcd:",
963 "🔡": ":abcd:",
964 "🔣": ":symbols:",
1704 "⚒️": ":hammer_and_pick:",
1705 "⚔️": ":crossed_swords:",
1706 "⚕️": ":staff_of_aesculapius:",
1707 "⚖️": ":scales:",
1708 "⚗️": ":alembic:",
224 </div>
225 <a href="https://htmx.org/examples/active-search/" style={itemStyle}>HTMX Active Search</a>
226 <a href="https://www.bram.us/2024/02/18/custom-highlight-api-for-syntax-highlighting/" style={itemStyle}>
227 Search and highlight text
228 </a>
229 <a href="https://www.bram.us/2024/02/18/custom-highlight-api-for-syntax-highlighting/" style={itemStyle}>
230 Custom highlight API - Display style and script blocks
231 </a>
232 <a href="https://docs.val.town/quickstarts/first-website/" style={itemStyle}>
6Future features will include moderation tools (auto-ban, bots), more powerful models, and multimedia support for video and audio moderation.
7
8To get an API key for the AI endpoints sign up free at https://www.openmoderator.com
9To install content-checker do `npm install content-checker` and check out the README: https://github.com/utilityfueled/content-checker
9To use it on your own Val Town SQLite database, [fork it](https://www.val.town/v/stevekrouse/sqlite_admin/fork) to your account.
10
11It uses [basic authentication](https://www.val.town/v/pomdtr/basicAuth) with your [Val Town API Token](https://www.val.town/settings/api) as the password (leave the username field blank).