Skip to content

Commit

Permalink
Challenge 118 - Mastodon Fractal Tree Bot (#1670)
Browse files Browse the repository at this point in the history
* baseline

* add user contribution to challenge 118

* challenge 118: links, related challenges and new chapter titles for part 1

* add to Mastodon track, update links

* Add index image and descriptions for links

---------

Co-authored-by: Kathy <[email protected]>
Co-authored-by: Daniel Shiffman <[email protected]>
  • Loading branch information
3 people authored Oct 6, 2024
1 parent c545246 commit 02782e5
Show file tree
Hide file tree
Showing 5 changed files with 126 additions and 1 deletion.
3 changes: 2 additions & 1 deletion content/tracks/side-tracks/mastodon/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"mastodon/replying-to-a-mention",
"mastodon/what-is-node-js",
"mastodon/what-is-npm",
"workflow/5-node"
"workflow/5-node",
"challenges/118-mastodon-fractal-tree-bot"
]
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
115 changes: 115 additions & 0 deletions content/videos/challenges/118-mastodon-fractal-tree-bot/index.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
{
"title": "Mastodon Fractal Tree Bot",
"description": "In part 1 of this coding challenge, I create a node.js Mastodon bot that posts images (fractal trees) generated with Processing code. In part 2, I revise the node.js Mastodon bot to post images (fractal trees) in response to user mentions.",
"videoNumber": "118",
"date": "2018-10-16",
"languages": ["Processing", "JavaScript", "Java", "Node.js", "command-line interface (CLI)"],
"topics": ["Mastodon", "bots", "fractals"],
"canContribute": true,
"relatedChallenges": [
"174-graphics-applesoft-basic",
"14-fractal-trees-recursive",
"15-object-oriented-fractal-trees",
"18-3d-fractal-trees"
],
"timestamps": [],
"parts": [
{
"title": "Part 1 - Creating fractal tree images and posting them with a Mastodon bot",
"videoId": "luxczHFn1rU",
"timestamps": [
{ "time": "0:00", "title": "Introduction" },
{ "time": "0:52", "title": "Inspiration for the challenge" },
{ "time": "1:06", "title": "Generate a random fractal tree image with Processing" },
{ "time": "2:48", "title": "How can Node.js and Processing communicate?" },
{ "time": "3:50", "title": "Calling a Processing sketch from the command line" },
{ "time": "6:10", "title": "Using Node.js to execute the sketch" },
{ "time": "9:00", "title": "Async with promises" },
{ "time": "11:57", "title": "Reading stdout value" },
{ "time": "13:50", "title": "Use `mastodon-api` to POST the image" },
{ "time": "21:40", "title": "Refactor promises chain to async/await" },
{ "time": "25:20", "title": "Reference the image in a new status" },
{ "time": "30:07", "title": "Extract the angle value from stdout" },
{ "time": "33:00", "title": "Make the bot post at a predetermined interval" },
{ "time": "36:30", "title": "Hosting and Part 2 tutorial teaser" }
]
},
{
"title": "Part 2 - Revising the bot to reply to user mentions",
"videoId": "PUPWPjjkNqQ",
"timestamps": [
{ "time": "0:00", "title": "Introduction" },
{ "time": "0:30", "title": "Change the code" },
{ "time": "1:00", "title": "Why Mastodon" },
{ "time": "1:40", "title": "Streaming API" },
{ "time": "2:50", "title": "Looking up previous code" },
{ "time": "4:00", "title": "Adding new code" },
{ "time": "6:00", "title": "Regular expressions" },
{ "time": "10:00", "title": "Testing" },
{ "time": "11:00", "title": "Adding an angle" },
{ "time": "13:00", "title": "Adding arguments" }
]
}
],
"codeExamples": [
{
"title": "Source code",
"description": "Mastodon bot and fractal tree generator source code",
"urls": {
"node": "https://github.com/CodingTrain/Mastodon-Bot"
}
}
],
"groupLinks": [
{
"title": "References",
"links": [
{
"icon": "🔗",
"title": "Lowpoly Bot",
"url": "https://twitter.com/lowpolybot",
"description": "A Twitter bot by @Quasimondo that creates random low-polygon versions of pictures it receives."
},
{
"icon": "🔗",
"title": "Node.js",
"url": "https://nodejs.org/en",
"description": "Documentation about Node.js, a open-source JavaScript runtime environment."
},
{
"icon": "🔗",
"title": "Mastodon",
"url": "https://mastodon.social/about",
"description": "A decentralized social media powered by Mastodon"
},
{
"icon": "🔗",
"title": "Mastodon API on npm",
"url": "https://www.npmjs.com/package/mastodon-api",
"description": "A Mastodon API Client for node"
},
{
"icon": "🔗",
"title": "The 'procesing-java' command",
"url": "https://github.com/processing/processing/wiki/Command-Line",
"description": "Running Processing sketches from the command line"
}
]
},
{
"title": "Videos",
"links": [
{
"icon": "🎥",
"title": "What is Mastodon?",
"url": "/tracks/mastodon/mastodon/what-is-mastodon",
"description": "My track on the social media API Mastodon."
}
]
}
],
"credits": [
{ "title": "Editing", "name": "Mathieu Blanchette" },
{ "title": "Animations", "name": "Jason Heglund" }
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"title": "Polite circles-maker bot",
"url": "https://github.com/raynauds/mastodon-bot",
"author": {
"name": "Sébastien Raynaud",
"url": "https://twitter.com/Chopokopx"
},
"submittedOn": "2018-11-12"
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 02782e5

Please sign in to comment.