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(() =>
4export let untitled3740476 = notionDB({
5 token: notionToken,
6 databaseId: "69c9fbd8557b440493a2d41f9ce17749",
7 query: "Germany",
8});
8 args?: any[],
9) => {
10 const { connect } = await import("npm:@planetscale/database");
11 const { host, username, password } = config;
12 const conn = connect({
1export async function duckDB(url) {
2 const { Database } = await import("npm:duckdb-async");
3 const db = await Database.create(":memory:");
4 await db.all("load httpfs");
5 return await db.all(`select * from "${url}" LIMIT 5`);
1// Outputs, e.g., "It is currently Sunday, May 21, 2023 at 12:11:04 PM Pacific Daylight Time."
2// timeZone should be a tz identifier as listed at https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
3export function formatCurrentDatetimeSentence(timeZone: string): string {
4 const dateFormatter = new Intl.DateTimeFormat([], {
1import { databaseVal } from "https://esm.town/v/stevekrouse/databaseVal";
2
3export const untitled_NwQdD9zC = databaseVal.push({ hello: "world" });
22 process.env.supabaseKey,
23 );
24 // Query from the database to see if this link already exists
25 const { data, error } = await supabase
26 .from("linkedin_seedings")
34 if (data.length > 0) {
35 res.status(200).json({
36 message: "This link already exists in the database",
37 });
38 }
39 // Otherwise, start processing this new link
40 // First, retrieve documents in the database relevant to the post content
41 let relevantContent = await getRelevantContent(content);
42 let context = "";
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 });
1## Get All Rows of a Database in Notion
2
3Reference: [Query a Database](https://developers.notion.com/reference/post-database-query)
4
5How to get an access token: https://developers.notion.com/reference/create-a-token
1Migrated from folder: Archive/dateMeNotionDatabase