slackScoutmain.tsx10 matches
15}
1617export default async function(interval: Interval): Promise<void> {
18try {
19await createTable();
3839// Create an SQLite table
40async function createTable(): Promise<void> {
41await sqlite.execute(`
42CREATE TABLE IF NOT EXISTS ${TABLE_NAME} (
5051// Fetch Hacker news, Twitter, and Reddit results
52async function fetchHackerNewsResults(topic: string): Promise<Website[]> {
53return hackerNewsSearch({
54query: topic,
58}
5960async function fetchTwitterResults(topic: string): Promise<Website[]> {
61return twitterSearch({
62query: topic,
67}
6869async function fetchRedditResults(topic: string): Promise<Website[]> {
70return redditSearch({ query: topic });
71}
7273function formatSlackMessage(website: Website): string {
74const displayTitle = website.title || website.url;
75return `*<${website.url}|${displayTitle}>*
78}
7980async function sendSlackMessage(message: string): Promise<Response> {
81const slackWebhookUrl = Deno.env.get("SLACK_WEBHOOK_URL");
82if (!slackWebhookUrl) {
104}
105106async function isURLInTable(url: string): Promise<boolean> {
107const result = await sqlite.execute({
108sql: `SELECT 1 FROM ${TABLE_NAME} WHERE url = :url LIMIT 1`,
112}
113114async function addWebsiteToTable(website: Website): Promise<void> {
115await sqlite.execute({
116sql: `INSERT INTO ${TABLE_NAME} (source, url, title, date_published)
120}
121122async function processResults(results: Website[]): Promise<void> {
123for (const website of results) {
124if (!(await isURLInTable(website.url))) {
4import RssParser from "npm:rss-parser";
56export async function rssNotify() {
7const lastRunAt = await blob.getJSON(getLegacyImportUrl(import.meta.url));
8console.log(`Last run: ${lastRunAt || "Never"}`);
smsjournalertextrelaymain.tsx10 matches
34// this is either broken or textbelt is not sending me the right stuff
35// this is implemented per the textbelt docs but i cant verify the sig...
36function validateTextbeltRequestSignature(
37apiKey: string,
38timestamp: string,
52}
5354// Helper function to send SMS using TextBelt API
55async function sendSMS(phone: string, message: string) {
56const response = await fetch("https://textbelt.com/text", {
57method: "POST",
68}
6970// Helper function to get conversation history
71async function getConversationHistory(phone: string): Promise<Message[]> {
72const key = makeBlobKey(phone);
73const history = await blob.getJSON(key) as Message[] | null;
75}
7677// Helper function to update conversation history
78async function updateConversationHistory(phone: string, message: Message) {
79const key = makeBlobKey(phone);
80const history = await getConversationHistory(phone);
83}
8485// Helper function to generate AI response
86async function generateAIResponse(history: Message[]): Promise<string> {
87const openai = new OpenAI();
88const messages: { role: "user" | "assistant" | "system"; content: string }[] = history.map(msg => ({
106}
107108export default async function server(request: Request): Promise<Response> {
109const quotaResponse = await fetch(
110`https://textbelt.com/quota/${textbeltKey}`,
1export function svgEmoji(req: Request) {
2const url = new URL(req.url);
3const emoji = decodeURIComponent(url.pathname.slice(1));
linkInBioTemplatemain.tsx6 matches
5// ... (previous AuthContext, AuthProvider, and useAuth remain the same)
67function App() {
8// ... (App component remains the same)
9}
1011function Home({ theme }) {
12const { user } = useAuth();
13const isDark = theme === 'dark';
51}
5253function PromptGenerator() {
54const [prompt, setPrompt] = useState('');
5580}
8182function Tools({ theme }) {
83const isDark = theme === 'dark';
84const tools = [
102}
103104function Gallery({ theme }) {
105const isDark = theme === 'dark';
106const [filter, setFilter] = useState('all');
209};
210211// ... (client and server functions remain the same)
finalScrapermain.tsx3 matches
7import { createRoot } from "https://esm.sh/react-dom/client";
89function App() {
10const [link, setLink] = useState("");
11const [results, setResults] = useState(null);
81}
8283function client() {
84createRoot(document.getElementById("root")).render(<App />);
85}
89}
9091async function server(request: Request): Promise<Response> {
92if (request.method === "POST" && new URL(request.url).pathname === "/scrape") {
93const { link } = await request.json();
hasWebsiteChangedmain.tsx1 match
7import slugify from "npm:slugify";
89export async function hasWebsiteChanged(url: string, threshold = 0.5) {
10const slug = slugify(url);
11
3import Jimp from "npm:jimp";
45export async function blobReadPictureExample(request: Request): Promise<Response> {
6const searchParams = new URL(request.url).searchParams;
7const url = searchParams.get("url") || "https://www.browserbase.com";
browserbaseUtilsmain.tsx2 matches
5}
67export async function loadPageContent(url: string, options: LoadPageContentOptions = { textContent: false }) {
8const browser = await puppeteer.connect({
9browserWSEndpoint: `wss://connect.browserbase.com?apiKey=${Deno.env.get("BROWSERBASE_API_KEY")}`,
33}
3435export async function screenshotPage(url: string, options: ScreenshotPageOptions = { fullPage: true }) {
36const browser = await puppeteer.connect({
37browserWSEndpoint: `wss://connect.browserbase.com?apiKey=${Deno.env.get("BROWSERBASE_API_KEY")}`,
2import { email } from "https://esm.town/v/std/email?v=12";
34export default async function(interval: Interval) {
5const bbLandingChanged = await hasWebsiteChanged("https://www.browserbase.com");
6console.log("bbLandingChanged", bbLandingChanged);