fullstackbulletin / automation Goto Github PK
View Code? Open in Web Editor NEWServerless Step Function that generates a draft of a newsletter issue every week
Home Page: https://fullstackbulletin.com
License: MIT License
Serverless Step Function that generates a draft of a newsletter issue every week
Home Page: https://fullstackbulletin.com
License: MIT License
{
"errorMessage": "Cannot find module '/var/task/handler'",
"errorType": "Error",
"stackTrace": [
"Function.Module._load (module.js:276:25)",
"Module.require (module.js:353:17)",
"require (internal/module.js:12:17)"
]
}
Fullstack Bulletin currently uses PlaceIMG as a way to get fallback article images when an image cannot be found.
Unfortunately, PlaceIMG is shutting down.
We need to find and integrate an alternative, for instance Unsplash, through their APIs
curl "https://api.unsplash.com/photos/random?query=tech&client_id=<SOME_CLIENT_ID>" | jq -r .urls.small
# https://images.unsplash.com/photo-1526374965328-7f61d4dc18c5?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3w0NjYzNjZ8MHwxfHJhbmRvbXx8fHx8fHx8fDE2ODc2ODYzMzF8&ixlib=rb-4.0.3&q=80&w=400
Twitter has finally killed all our API access 😭
But the good news is that using Mastodon as an alternative seems quite easy!
So we have a profile already: https://mastodon.social/@fstackbulletin
And a snippet on how to get the profile timeline using megalodon
:
import { Mastodon } from 'megalodon'
const BASE_URL = 'https://mastodon.social'
const accessToken = 'XXXX'
const client = new Mastodon(BASE_URL, accessToken)
const { data: account } = await client.verifyAccountCredentials()
const { data: posts } = await client.getAccountStatuses(account.id)
const links = posts
.filter(post => post.card)
.map(post => ({
created_at: post.created_at,
url: post.card.url,
title: post.card.title,
description: post.card.description
}))
console.log(links)
Will output
[
{
created_at: '2023-06-26T21:47:15.617Z',
url: 'https://calibreapp.com/blog/content-delivery-networks-guide',
title: 'What is a CDN? An Unbiased Guide to Content Delivery Networks - Calibre ',
description: 'A fast and resilient content delivery network is one of the best ways to improve the performance of your site. Here’s how to make an informed decision when choosing one.'
},
{
created_at: '2023-06-26T21:46:55.835Z',
url: 'https://cloudfour.com/thinks/animated-gif-alternative/',
title: 'Is there a viable animated GIF alternative yet or what?',
description: 'Animated GIFs remain popular in spite of their beefy file sizes. But what are we supposed to use instead?'
},
{
created_at: '2023-06-26T21:46:12.829Z',
url: 'https://hyperfetch.bettertyped.com/',
title: 'Data Fetching, Offline First, Caching, Queueing | Hyper Fetch',
description: 'Framework for requesting and realtime connection'
},
{
created_at: '2023-06-26T21:45:47.820Z',
url: 'https://sanity-io.github.io/GROQ/GROQ-1.revision1/',
title: 'GROQ',
description: ''
},
{
created_at: '2023-06-26T21:45:13.592Z',
url: 'https://antfu.me/posts/ai-qrcode',
title: 'Stylistic QR Code with Stable Diffusion',
description: ''
},
{
created_at: '2023-06-26T21:44:44.559Z',
url: 'https://kizu.dev/cyclic-toggles/',
title: 'Cyclic Dependency Space Toggles',
description: 'Over the past few years, I wanted to be able to select a value from a list in CSS by toggling a single custom property. We have the “space toggle” for booleans, and hopefully, one day, we’ll get style queries, but what about today? In this article, I present you with the technique I recently discovered.'
}
]
{
"errorMessage": "ENOENT: no such file or directory, open '//xxxxx.com/images/logo.png'",
"errorType": "Error",
"stackTrace": [
"Error (native)"
]
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.