2import { msAgo } from "https://esm.town/v/rodrigotello/msAgo?v=2";
3import process from "node:process";
4import { notionGetDatabaseEditedAfter } from "https://esm.town/v/stevekrouse/notionGetDatabaseEditedAfter";
5
6export const untitled_TeCzFPJC = notionGetDatabaseEditedAfter({
7 auth: process.env.notion,
8 databaseId: "725cb1d741674413b933a37a50f1961f",
9 date: msAgo(2 * msDay),
10});
1import { parseNotionDateDoc } from "https://esm.town/v/stevekrouse/parseNotionDateDoc";
2import { logError } from "https://esm.town/v/stevekrouse/logError";
3import { getDateMeDatabase } from "https://esm.town/v/stevekrouse/getDateMeDatabase";
4
5export const getNotionDateMeDocs = async () =>
6 (await getDateMeDatabase())
7 .map((d) =>
8 logError(() =>
4// Email alerts when new Docs posted to https://DateMe.Directory
5// Subscribe by signing up to VT & forking to your account
6// Requires an upstash account: https://docs.val.town/persistence-databases/upstash
7export let dateMeNotify = notifyNew({
8 getData: fetchDateMeProfiles,
1import process from "node:process";
2import { notionGetDatabase } from "https://esm.town/v/stevekrouse/notionGetDatabase";
3
4export let getDateMeDatabase = () =>
5 notionGetDatabase({
6 databaseId: "725cb1d741674413b933a37a50f1961f",
7 auth: process.env.notion,
8 });
1import { parseNotionDateDoc } from "https://esm.town/v/stevekrouse/parseNotionDateDoc";
2import { logError } from "https://esm.town/v/stevekrouse/logError";
3import { getDateMeDatabase } from "https://esm.town/v/stevekrouse/getDateMeDatabase";
4
5export const notionDateMeDocs = (await getDateMeDatabase())
6 .map((d) =>
7 logError(() =>
1import { databaseVal } from "https://esm.town/v/stevekrouse/databaseVal";
2
3export const untitled_NwQdD9zC = databaseVal.push({ hello: "world" });
1export const notionGetDatabase = async ({ databaseId, auth, filter }: {
2 databaseId: string;
3 auth: string;
4 filter?: any;
8 );
9 const notion = new Client({ auth });
10 return collectPaginatedAPI(notion.databases.query, {
11 database_id: databaseId,
12 filter,
13 });
1Migrated from folder: Archive/dateMeNotionDatabase
7[Turso](https://turso.tech/) is a serverless SQLite platform designed for the edge. It runs [libSQL](https://github.com/libsql/libsql), their open contribution fork of SQLite.
8
9Every Val Town user automatically gets their own Turso SQLite database! It's great for >100kb data (ie bigger than a val) or when you need SQL: relations, ACID transactions, etc.
10
11Storage used in Turso will count against your Val Town total storage (10mb for free users; 1gb for Pro users). Contact us if you'd need more – it should be no problem!
35## Architecture
36
37This @std.turso function is the client or SDK to @std.tursoAPI, which acts as a "proxy" to Turso. It handles authentication, creates databases, and forwards on your SQL queries. You can get lower latency (~200ms vs ~800ms), more storage, databases, CLI & API access by having your own Turso account.
38
39Migrated from folder: turso/turso
14
15* This is very inefficient. It refetches and re-parses blog.val.town on every single request, modulo some caching via the headers. It would be much more efficient to cache the results of fetching and parsing the Val Town blog, and then only re-fetch it every 10 minutes or so.
16* Instead of fetching and parsing HTML from super.so, we could get this same data from Notion's API, with a val like @stevekrouse.notionGetDatabase.
17
18Migrated from folder: Archive/blogRSS