Creating an Automated Profile README using Nodejs and GitHub Actions

This page summarizes the projects mentioned and recommended in the original post on dev.to

Our great sponsors
  • SurveyJS - Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • BolajiAyodeji

    My automated GitHub README Profile built using Nodejs, TypeScript, and GitHub Actions.

  • { "id": 278287314, "node_id": "MDEwOlJlcG9zaXRvcnkyNzgyODczMTQ=", "name": "BolajiAyodeji", "full_name": "BolajiAyodeji/BolajiAyodeji", "private": false, "owner": { "login": "BolajiAyodeji", "id": 30334776, "node_id": "MDQ6VXNlcjMwMzM0Nzc2", "avatar_url": "https://avatars.githubusercontent.com/u/30334776?v=4", "gravatar_id": "", "url": "https://api.github.com/users/BolajiAyodeji", "html_url": "https://github.com/BolajiAyodeji", ... }, "html_url": "https://github.com/BolajiAyodeji/BolajiAyodeji", "description": "My automated GitHub Profile README built using TypeScript and GitHub Actions.", ... "created_at": "2020-07-09T06:55:36Z", "updated_at": "2023-11-11T09:25:16Z", ... "stargazers_count": 4, "watchers_count": 4, "language": "TypeScript", ... "open_issues_count": 0, "license": { "key": "mit", "name": "MIT License", ... }, ... "topics": [ "github-actions", "github-api", "hashnode", "javascript", ... ], "visibility": "public", "forks": 19, ... }

  • markdown-it

    Markdown parser, done right. 100% CommonMark support, extensions, syntax plugins & high speed

  • We can easily use markdown-it, a markdown parser for rendering a mix of JavaScript and plain text into a markdown file. To get started, kindly create a new directory with the following file structure:

  • 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.

    SurveyJS logo
  • Puts Debuggerer

    Ruby library for improved puts debugging, automatically displaying bonus useful information such as source line number and source code.

  • import * as fs from "fs"; const md = require("markdown-it")({ html: true, // Enable HTML tags in source breaks: true, // Convert '\n' in paragraphs into linkify: true // Autoconvert URL-like text to links }); import { fetchRssData } from "./fetchRssData"; import { fetchGitHubData } from "./fetchGitHubData"; const blogFeedUrl = "https://blog.bolajiayodeji.com/rss.xml"; const newsletterFeedUrl = "https://bawd.bolajiayodeji.com/feed"; const ossProjectRepos = [ "BolajiAyodeji", "fed-unis-perf-eval", "movie_reviews_sentiment_analysis", "dotfiles" ]; const ossLearningMaterialRepos = ["deploy-ml-web-workshop", "cl-composable-commerce-workshop"]; const githubUsername = "BolajiAyodeji"; const websiteUrl = "https://bolajiayodeji.com"; const blogUrl = "https://blog.bolajiayodeji.com"; const newsletterUrl = "https://bawd.bolajiayodeji.com"; const youtubeUrl = "https://youtube.com/c/bolajiayodeji"; const slidesUrl = "https://slides.com/bolajiayodeji"; const twitterUrl = "https://twitter.com/iambolajiayo"; const linkedinUrl = "https://linkedin.com/in/iambolajiayo"; const githubSponsorsUrl = "https://github.com/sponsors/BolajiAyodeji"; const patreonUrl = "https://patreon.com/bolajiayodeji"; async function generateMarkdown() { const websiteBadge = `[![Website Badge](https://img.shields.io/badge/-Website-3B7EBF?style=for-the-badge&logo=amp&logoColor=white)](${websiteUrl})`; const hashnodeBadge = `[![Blog Badge](https://img.shields.io/badge/-Blog-3B7EBF?style=for-the-badge&logo=Hashnode&logoColor=white)](${blogUrl})`; const substackBadge = `[![Newsletter Badge](https://img.shields.io/badge/-Newsletter-3B7EBF?style=for-the-badge&logo=Substack&logoColor=white)](${newsletterUrl})`; const youtubeBadge = `[![YouTube Badge](https://img.shields.io/badge/-Youtube-3B7EBF?style=for-the-badge&logo=Youtube&logoColor=white)](${youtubeUrl})`; const slidesBadge = `[![Slides Badge](https://img.shields.io/badge/-Slides-3B7EBF?style=for-the-badge&logo=slides&logoColor=white)](${slidesUrl})`; const linkedinBadge = `[![Linkedin Badge](https://img.shields.io/badge/-LinkedIn-3B7EBF?style=for-the-badge&logo=Linkedin&logoColor=white)](${linkedinUrl})`; const twitterBadge = `[![Twitter Badge](https://img.shields.io/badge/-@iambolajiayo-3B7EBF?style=for-the-badge&logo=x&logoColor=white)](${twitterUrl})`; const githubSponsorsBadge = `[![GitHub Sponsors Badge](https://img.shields.io/badge/-github%20sponsors-3B7EBF?style=for-the-badge&logo=github&logoColor=white)](${githubSponsorsUrl})`; const patreonBadge = `[![Patreon Badge](https://img.shields.io/badge/-Patreon-3B7EBF?style=for-the-badge&logo=Patreon&logoColor=white)](${patreonUrl})`; const profileCountBadge = `![Profile Views Count Badge](https://komarev.com/ghpvc/?username=${githubUsername}&style=for-the-badge)`; const githubStatsCardDark = `[![GitHub-Stats-Card-Dark](https://github-readme-stats.vercel.app/api?username=${githubUsername}&show_icons=true&hide_border=true&include_all_commits=true&card_width=600&custom_title=GitHub%20Open%20Source%20Stats&title_color=3B7EBF&text_color=FFF&icon_color=3B7EBF&hide=contribs&show=reviews,prs_merged,prs_merged_percentage&theme=transparent#gh-dark-mode-only)](https://github.com/${githubUsername}/${githubUsername}#gh-dark-mode-only)`; const githubStatsCardLight = `[![GitHub-Stats-Card-Light](https://github-readme-stats.vercel.app/api?username=${githubUsername}&show_icons=true&hide_border=true&include_all_commits=true&card_width=600&custom_title=GitHub%20Open%20Source%20Stats&title_color=3B7EBF&text_color=474A4E&icon_color=3B7EBF&hide=contribs&show=reviews,prs_merged,prs_merged_percentage&theme=transparent#gh-light-mode-only)](https://github.com/${githubUsername}/${githubUsername}#gh-light-mode-only)`; const markdownText = `\n ${websiteBadge} ${hashnodeBadge} ${substackBadge} ${youtubeBadge} ${slidesBadge} ${linkedinBadge} ${twitterBadge} ${githubSponsorsBadge} ${patreonBadge} ${profileCountBadge}\n ---\n Hi there 👋🏾! I'm an innovative technology professional with progressive IT, web engineering, data, embedded systems, developer relations, documentation, technical writing, open-source, community building, and entrepreneurship experience in for-profit startups and non-profit technology and education organizations. I create technical content, build open-source projects and learning materials, speak/teach at developer meetups/conferences, and build several technical communities.\n ---\n ${githubStatsCardDark}\n ${githubStatsCardLight}\n \n ---\n ## Highlights \n OSS Projects\n Here are some of my other projects you might want to check out that are not pinned:\n \n ${await fetchGitHubData(ossProjectRepos)}\n \n \n OSS Learning Materials\n Here are some of my unique-styled workshop materials you can use to learn key concepts at your own pace:\n \n ${await fetchGitHubData(ossLearningMaterialRepos)}\n \n \n Recent Blogposts\n ${await fetchRssData(blogFeedUrl)}\n \n \n Recent Newsletters\n ${await fetchRssData(newsletterFeedUrl)}\n \n \n Quick Tips\n\n - 💬 How to reach me: DM [@iambolajiayo](https://twitter.com/iambolajiayo) on X (Twitter).\n - 📬 Where to find me: Subscribe to my [newsletter](https://bawd.bolajiayodeji.com/subscribe) to hear from me bi-weekly or send a game request on [chess.com](https://chess.com/member/bolajiayodeji).\n - 📖 Book recommendations: [Knowing God by J. I. Packer](https://bit.ly/3EdCFUW) and [Atomic Habits by James Clear](https://bit.ly/45r1kBH).\n - 💙 Fun fact: I'm in a blissful relationship [with Jesus Christ](https://biblegateway.com/passage/?search=1+Corinthians+15%3A1-11&version=NKJV). Check [this](https://bit.ly/3KYYHij) out :).\n \n ---\n Learn how this works. \n \n \n `; const result = md.render(markdownText); fs.writeFile("README.md", result, (error) => { if (error) throw new Error(`Something went wrong: ${error}.`); console.log(`✅ README.md file was succesfully generated.`); }); } generateMarkdown();

  • octokit.js

    The all-batteries-included GitHub SDK for Browsers, Node.js, and Deno.

  • You can fetch different kinds of data with GitHub's API. There are two options: use the API directly or the Octokit.js library (this is the route GitHub recommends). I decided to use the API directly since the Octokit.js library included extra stuff I wouldn't need, which is an overkill for this use case.

  • rss-parser

    A lightweight RSS parser, for Node and the browser

  • Since both RSS feeds are similar in structure, I can create a fetchRssData() function in src/fetchRssData.ts for both. We will first use the rss-parser library to turn the RSS XML feeds into JavaScript objects and then iterate to find the necessary fields.

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts