-
SurveyJS
Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.
export const devtoToNotionPubSub = functions.pubsub .topic(topicId) .onPublish(async (message, context) => { console.log('The function was triggered at ', context.timestamp); console.log('The unique ID for the event is', context.eventId); const page = JSON.parse(JSON.stringify(message.json)); console.log('page', page); let data; if (page._type === 'podcast') { data = { article: { title: page.title, published: true, tags: ['podcast', 'webdev', 'javascript', 'beginners'], series: `codingcatdev_podcast_${page.properties.Season.number}`, main_image: `https://media.codingcat.dev/image/upload/b_rgb:5e1186,c_pad,w_1000,h_420/${page?.coverPhoto?.public_id}`, canonical_url: `https://codingcat.dev/${page._type}/${page.slug}`, description: page.excerpt, organization_id: '1009', body_markdown: `Original: https://codingcat.dev/${page._type}/${ page.slug } {% youtube ${page.properties.youtube.url} %} {% spotify spotify:episode:${page.properties.spotify.url .split('/') .at(-1) .split('?') .at(0)} %} `, }, }; } else { console.log( `Getting ${page._type}: ${page.id} markdown, with slug ${page?.properties?.slug?.url}` ); const post = await getNotionPageMarkdown({ _type: page._type, slug: page?.properties?.slug?.url, preview: false, }); console.log('Block Result', post); if (post && post?.content) { data = { article: { title: page.title, published: true, tags: ['podcast', 'webdev', 'javascript', 'beginners'], main_image: `https://media.codingcat.dev/image/upload/b_rgb:5e1186,c_pad,w_1000,h_420/${page?.coverPhoto?.public_id}`, canonical_url: `https://codingcat.dev/${page._type}/${page.slug}`, description: page.excerpt, organization_id: '1009', body_markdown: post.content, }, }; } } if (data) { try { console.log('addArticle to devto'); const response = await addArticle(data); console.log('addArticle result:', response); const devto = response?.data?.url; if (!devto) { console.log('devto url missing'); return; } const update = { page_id: page.id, properties: { devto: { id: 'remote', type: 'url', url: devto, }, }, }; console.log('Updating page with: ', JSON.stringify(update)); const purrfectPagePatchRes = await patchPurrfectPage(update); console.log( 'Page update result:', JSON.stringify(purrfectPagePatchRes) ); return purrfectPagePatchRes; } catch (error) { console.error(error); } } else { console.error('No Data matched for article'); } return; });
Related posts
-
Large Language Models in Containers Locally with Podman AI Lab
-
Many options for running Mistral models in your terminal using LLM
-
Show HN: An open-source ELO benchmark for voice agents
-
🎨 CI/CD Workflow with AWS and Docker
-
Show HN: TsParticles, a JavaScript particles, confetti, fireworks, etc. library