Skip to content

Commit 1a897b3

Browse files
committed
Merge branch 'main' of github.com:CodingTrain/thecodingtrain.com
2 parents 9c99454 + 46106b7 commit 1a897b3

File tree

20 files changed

+148
-23
lines changed

20 files changed

+148
-23
lines changed

β€Žcontent/tracks/side-tracks/mastodon/index.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
"mastodon/replying-to-a-mention",
1313
"mastodon/what-is-node-js",
1414
"mastodon/what-is-npm",
15-
"workflow/5-node"
15+
"workflow/5-node",
16+
"challenges/118-mastodon-fractal-tree-bot"
1617
]
1718
}
179 KB
Loading
Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
{
2+
"title": "Mastodon Fractal Tree Bot",
3+
"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.",
4+
"videoNumber": "118",
5+
"date": "2018-10-16",
6+
"languages": ["Processing", "JavaScript", "Java", "Node.js", "command-line interface (CLI)"],
7+
"topics": ["Mastodon", "bots", "fractals"],
8+
"canContribute": true,
9+
"relatedChallenges": [
10+
"174-graphics-applesoft-basic",
11+
"14-fractal-trees-recursive",
12+
"15-object-oriented-fractal-trees",
13+
"18-3d-fractal-trees"
14+
],
15+
"timestamps": [],
16+
"parts": [
17+
{
18+
"title": "Part 1 - Creating fractal tree images and posting them with a Mastodon bot",
19+
"videoId": "luxczHFn1rU",
20+
"timestamps": [
21+
{ "time": "0:00", "title": "Introduction" },
22+
{ "time": "0:52", "title": "Inspiration for the challenge" },
23+
{ "time": "1:06", "title": "Generate a random fractal tree image with Processing" },
24+
{ "time": "2:48", "title": "How can Node.js and Processing communicate?" },
25+
{ "time": "3:50", "title": "Calling a Processing sketch from the command line" },
26+
{ "time": "6:10", "title": "Using Node.js to execute the sketch" },
27+
{ "time": "9:00", "title": "Async with promises" },
28+
{ "time": "11:57", "title": "Reading stdout value" },
29+
{ "time": "13:50", "title": "Use `mastodon-api` to POST the image" },
30+
{ "time": "21:40", "title": "Refactor promises chain to async/await" },
31+
{ "time": "25:20", "title": "Reference the image in a new status" },
32+
{ "time": "30:07", "title": "Extract the angle value from stdout" },
33+
{ "time": "33:00", "title": "Make the bot post at a predetermined interval" },
34+
{ "time": "36:30", "title": "Hosting and Part 2 tutorial teaser" }
35+
]
36+
},
37+
{
38+
"title": "Part 2 - Revising the bot to reply to user mentions",
39+
"videoId": "PUPWPjjkNqQ",
40+
"timestamps": [
41+
{ "time": "0:00", "title": "Introduction" },
42+
{ "time": "0:30", "title": "Change the code" },
43+
{ "time": "1:00", "title": "Why Mastodon" },
44+
{ "time": "1:40", "title": "Streaming API" },
45+
{ "time": "2:50", "title": "Looking up previous code" },
46+
{ "time": "4:00", "title": "Adding new code" },
47+
{ "time": "6:00", "title": "Regular expressions" },
48+
{ "time": "10:00", "title": "Testing" },
49+
{ "time": "11:00", "title": "Adding an angle" },
50+
{ "time": "13:00", "title": "Adding arguments" }
51+
]
52+
}
53+
],
54+
"codeExamples": [
55+
{
56+
"title": "Source code",
57+
"description": "Mastodon bot and fractal tree generator source code",
58+
"urls": {
59+
"node": "https://github.com/CodingTrain/Mastodon-Bot"
60+
}
61+
}
62+
],
63+
"groupLinks": [
64+
{
65+
"title": "References",
66+
"links": [
67+
{
68+
"icon": "πŸ”—",
69+
"title": "Lowpoly Bot",
70+
"url": "https://twitter.com/lowpolybot",
71+
"description": "A Twitter bot by @Quasimondo that creates random low-polygon versions of pictures it receives."
72+
},
73+
{
74+
"icon": "πŸ”—",
75+
"title": "Node.js",
76+
"url": "https://nodejs.org/en",
77+
"description": "Documentation about Node.js, a open-source JavaScript runtime environment."
78+
},
79+
{
80+
"icon": "πŸ”—",
81+
"title": "Mastodon",
82+
"url": "https://mastodon.social/about",
83+
"description": "A decentralized social media powered by Mastodon"
84+
},
85+
{
86+
"icon": "πŸ”—",
87+
"title": "Mastodon API on npm",
88+
"url": "https://www.npmjs.com/package/mastodon-api",
89+
"description": "A Mastodon API Client for node"
90+
},
91+
{
92+
"icon": "πŸ”—",
93+
"title": "The 'procesing-java' command",
94+
"url": "https://github.com/processing/processing/wiki/Command-Line",
95+
"description": "Running Processing sketches from the command line"
96+
}
97+
]
98+
},
99+
{
100+
"title": "Videos",
101+
"links": [
102+
{
103+
"icon": "πŸŽ₯",
104+
"title": "What is Mastodon?",
105+
"url": "/tracks/mastodon/mastodon/what-is-mastodon",
106+
"description": "My track on the social media API Mastodon."
107+
}
108+
]
109+
}
110+
],
111+
"credits": [
112+
{ "title": "Editing", "name": "Mathieu Blanchette" },
113+
{ "title": "Animations", "name": "Jason Heglund" }
114+
]
115+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"title": "Polite circles-maker bot",
3+
"url": "https://github.com/raynauds/mastodon-bot",
4+
"author": {
5+
"name": "SΓ©bastien Raynaud",
6+
"url": "https://twitter.com/Chopokopx"
7+
},
8+
"submittedOn": "2018-11-12"
9+
}
523 KB
Loading

β€Žcontent/videos/challenges/65-binary-tree/index.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@
8383
{
8484
"icon": "πŸ“˜",
8585
"title": "Grokking Algorithms book",
86-
"url": "https://amzn.to/2mMCK7Z",
86+
"url": "https://amzn.to/4ewHv0i",
8787
"description": "Grokking Algorithms is a fully illustrated, friendly guide that teaches you how to apply common algorithms to the practical problems."
8888
},
8989
{

β€Žcontent/videos/challenges/76-10Print/index.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@
4343
},
4444
{
4545
"icon": "πŸ“•",
46-
"title": "The 10Print Book",
47-
"url": "https://amzn.to/2wJlRVx",
48-
"description": "Amazon link for the book"
46+
"title": "10 Print Chr$205.5+rnd1: Goto 10 (Software Studies)",
47+
"url": "https://amzn.to/4ewmWkA",
48+
"description": "This book explores a single line of BASIC code for the Commodore 64 and its cultural impact on computing and art."
4949
},
5050
{
5151
"icon": "🎨",

β€Žcontent/videos/challenges/77-recursion/index.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
"icon": "πŸ“™",
3838
"title": "The Fractal Geometry of Nature",
3939
"description": "The essential guide that introduced fractals to the world by Benoit Mandlebrot",
40-
"url": "https://amzn.to/2xiVwht"
40+
"url": "https://amzn.to/3BzxDEi"
4141
}
4242
]
4343
},

β€Žcontent/videos/neural-networks/1-introduction/index.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,13 @@
3232
{
3333
"icon": "πŸ”—",
3434
"title": "Make Your Own Neural Network",
35-
"url": "https://www.amazon.com/Make-Your-Own-Neural-Network-ebook/dp/B01EER4Z4G",
35+
"url": "https://amzn.to/3BA9Jss",
3636
"description": "Reference book by Tariq Rashid"
3737
},
3838
{
3939
"icon": "πŸ”—",
4040
"title": "Perceptrons",
41-
"url": "https://www.amazon.com/Perceptrons-Introduction-Computational-Geometry-Expanded/dp/0262631113",
41+
"url": "https://amzn.to/3TZl0IX",
4242
"description": "Reference book on perceptrons by Marvin Minsky."
4343
},
4444
{

β€Žcontent/videos/neural-networks/12-feedforward-algorithm-part-1/index.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
{
6464
"icon": "πŸ”—",
6565
"title": "Make Your Own Neural Network",
66-
"url": "https://www.amazon.com/Make-Your-Own-Neural-Network-ebook/dp/B01EER4Z4G",
66+
"url": "https://amzn.to/3BA9Jss",
6767
"description": "Reference book by Tariq Rashid"
6868
}
6969
]

0 commit comments

Comments
Β (0)