isarojdahal / learn.everydaykarmaa.com

Learning Notes and Videos along with Blogs
https://learn.everydaykarmaa.com
2 stars 2 forks source link

feat: Script to generate whole playlist documentation using playlist Id #12

Closed theanupambista closed 1 day ago

theanupambista commented 2 days ago

This PR introduces a Node.js script that generates documentation files for each video in a specified YouTube playlist. The script uses the playlist ID to fetch video details and create corresponding Markdown files, ensuring that each file has a dynamic sidebar_position based on the video's order in the playlist. This feature automates the process of generating structured documentation for YouTube video series.

Key Features:

1) Dynamic Documentation Generation

import YouTubeEmbed from '../../src/components/YoutubeEmbed';

[Video Title]

Source Code

  • Github
    
    2) File Name Sanitization:
    The script sanitizes file names by removing invalid characters and limiting the length to 50 characters to prevent issues with long file paths and special characters. I have used 50 characters so that it will be helpful for seo.

Usage Instructions:

1) Install dependencies 2) Configure the Script: File location: scripts/notes-generator.js Example

const playlistId = 'YOUR_PLAYLIST_ID'; // Replace with your YouTube playlist ID
const notesName = 'javascript'; // Replace with your note name
const sourceCodeUrl = 'https://github.com/isarojdahal/javascript-workshop'; 

3) After configuration run

node scripts/notes-generator.js

Future Improvements:

CLI Arguments: Enhance the script to accept playlist ID, note name, and source code URL as command-line arguments for more flexibility. Custom Templates: Allow customization of Markdown templates to accommodate different documentation styles.

Issues #2 #3 #4

isarojdahal commented 1 day ago

@Devendrakhatrii bhai, Is PR #11 done with the scripts made by @theanupambista ? as this PR contains docker notes too.

Devendrakhatrii commented 1 day ago

@Devendrakhatrii bhai, Is PR #11 done with the scripts made by @theanupambista ? as this PR contains docker notes too.

No it's not. there I had the script to create the files and the data was entered manually this was before the #12

isarojdahal commented 1 day ago

oh ok, then shall I close your PR #11, as this PR contains docker notes too.

Devendrakhatrii commented 1 day ago

@theanupambista I think we should ignore the after title of the video from | Ex: we should keep "Introduction to Docker. Image vs Container " rather than keeping all the information form "Introduction to Docker. Image vs Container | Docker Series in Nepali | EverydayKarma"

what do you think let me know? also @isarojdahal dai!

isarojdahal commented 1 day ago

@theanupambista I think we should ignore the after title of the video from | Ex: we should keep "Introduction to Docker. Image vs Container " rather than keeping all the information form "Introduction to Docker. Image vs Container | Docker Series in Nepali | EverydayKarma"

  • this can help keep the contents and topics clean

what do you think let me know? also @isarojdahal dai!

Sure.