Open tplive opened 2 years ago
I have experimented a bit with the comic's URL structure, and storing the comic's URLs with kvdb.io.
Example URL: https://i0.wp.com/www.comicagile.net/wp-content/uploads/2022/12/Comic-agile_224.jpg\?ssl\=1
There is an arbitrary number of comics for each /year/month/
, it can also be 0.
curl -d '<URL>' https://kvdb.io/<BUCKET_ID>/<PREFIX><NUMBER>
so for instance `curl -d 'https://i0.wp.com/www.comicagile.net/wp-content/uploads/2022/12/Comic-agile_224.jpg\?ssl\=1' https://kvdb.io/xxxxxxxxxxxxxxxxxxxxxxxx/comic_agile_224Then run discovery every day:
We may need a way to download all URLs to avoid losing the "streak", since a kvdb.io free account is a trial and will expire. Can be solved with paid account. Or finding a free service.
Or could it be done EVEN simpler? Can we keep track of values in Github Actions?
https://docs.github.com/en/actions/using-workflows/storing-workflow-data-as-artifacts
It looks like you can only pass artifacts between jobs in the same workflow run.
Comic Agilè is a Danish comic about all things DevOps. Can we make Comicbot work with it?
Initially, there is no "order" to the comics, apart from their numbering scheme (today's comic is #172) so keeping track of which one's have already been fetched and posted, could pose a challenge. But maybe we can keep state in a counter backend? I found CountAPI which could work - provided we are able to configure it with a persistent domain name for namespace creation. We just need to know the number of the last comic we fetched... So, we would
get
the value first, compare it to whatever is on the front page of Comic Agilè, and if it's newer, fetch the comic, then update the count API with it's new number. Easy as pie!Or could it be done EVEN simpler? Can we keep track of values in Github Actions?