You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// TODO check if file already exists and if so skip
import{join}from'path';import*asfsfrom'fs/promises';import{createClient}from'@supabase/supabase-js';constsupabase=createClient(process.env.SUPABASE_URL,process.env.SUPABASE_API_KEY);const{data: shareables}=awaitsupabase.from('record').select('*').eq('releasable',true);constsaveTo=join('..','..','src','content','shareables');shareables.forEach((shareable)=>{// TODO check if file already exists and if so skip// TODO go over dates, maybe adjsut table and also generate dates in same format as othersconst{ title, description, comment, category, url, created_at }=shareable;constcontent= `---
title: "${title}"
description: "${description.replace('"',"'")}"
tags:
b8c532b9d4156c594c7fd27eac2f7d3168b24769
The text was updated successfully, but these errors were encountered:
check if file already exists and if so skip
harambasic.de/scripts/fetch-shareable/index.js
Line 11 in 912a632
b8c532b9d4156c594c7fd27eac2f7d3168b24769
The text was updated successfully, but these errors were encountered: