Open github-actions[bot] opened 11 months ago
go over dates, maybe adjsut table and also generate dates in same format as others
https://github.com/LukaHarambasic/harambasic.de/blob/912a632d2d6ced828b1e158d6a8394317298d6a3/scripts/fetch-shareable/index.js#L12
import { join } from 'path'; import * as fs from 'fs/promises'; import { createClient } from '@supabase/supabase-js'; const supabase = createClient(process.env.SUPABASE_URL, process.env.SUPABASE_API_KEY); const { data: shareables } = await supabase.from('record').select('*').eq('releasable', true); const saveTo = 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 others const { title, description, comment, category, url, created_at } = shareable; const content = `--- title: "${title}" description: "${description.replace('"', "'")}" tags:
af3d5c54004723b66ca73dfa0f841f62c1e7fb6b
go over dates, maybe adjsut table and also generate dates in same format as others
https://github.com/LukaHarambasic/harambasic.de/blob/912a632d2d6ced828b1e158d6a8394317298d6a3/scripts/fetch-shareable/index.js#L12
af3d5c54004723b66ca73dfa0f841f62c1e7fb6b