Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨Feature: Add script for formatting YouTube thumbnails in TheBrain Notes #19

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

chriskyfung
Copy link
Owner

This pull request includes the following commits:

Commit 7d30764:

  • Introduces a new PowerShell script that scans for YouTube thumbnail URLs in the Notes.md files located under the Brain data folder.
  • Modifies the Notes.md files to retrieve the YouTube thumbnails from the YouTube API instead of using local storage.
  • Enhances the functionality of the project by automating the process of updating YouTube thumbnails in TheBrain Notes.

Commit 1fbe72e:

  • Adds a new parameter to the Resize-TheBrainNotesYouTubeThumbnail.ps1 script that allows users to set the width of the image as a percentage.
  • Provides more flexibility to users by allowing them to specify the desired width of the image.
  • Enhances the functionality of the script and makes it more user-friendly by providing more customization options.

Commit b8048d7:

  • Fixes warnings with Write-Host and Write-Information cmdlets.
  • Replaces Write-Information cmdlet with Write-Host cmdlet to resolve compatibility issues with older versions of PowerShell.
  • Fixes the warning with Write-Host by using the -f format operator to concatenate the string and the variable.

These changes improve the performance, readability, and functionality of the scripts.

- Replaced `Write-Information` cmdlet to `Write-Host` cmdlet to resolve
  the compatibility issue with older versions of Powershell
- Fixed the warning with `Write-Host` by using the `-f` format operator
  to concatenate the string and the variable

These changes improve the performance and readability of the script.
…nNotesYouTubeThumbnail.ps1

This commit introduces a new parameter to the `Resize-TheBrainNotesYouTubeThumbnail.ps1` script that allows users to set the width of the image as a percentage. This enhancement provides more flexibility to users by allowing them to specify the desired width of the image.

The changes include:
- Added a new parameter `$NewWidth` to set the width of the image as a percentage.
- Adjusted the string `$width={$CurrentWidth}p` to reflect the new width when `$ImageType` is resized.
- Set 'default' as the default value of the `$ImageType` parameter to simplify the usage of the script.

This change enhances the functionality of the script and makes it more user-friendly by providing more customization options.

Fixes #17
…Brain Notes

This commit introduces a new PowerShell script that scans for YouTube thumbnail URLs in the `Notes.md` files located under the Brain data folder. The script then backs up and modifies the `Notes.md` files to retrieve the YouTube thumbnails from the YouTube API instead of using local storage. This ensures that the YouTube thumbnails are always up-to-date and accessible.

The script utilizes the `Get-ChildItem` and `Select-String` cmdlets to search for `Notes.md` files and match the YouTube thumbnail URL pattern. It performs various actions for each matching result, including creating backups, moving local image files, modifying the YouTube thumbnail URLs, and saving the modified `Notes.md` files.

This new script enhances the functionality of the project by automating the process of updating YouTube thumbnails in TheBrain Notes.
@chriskyfung chriskyfung added bug Something isn't working enhancement New feature or request labels May 25, 2024
@chriskyfung chriskyfung self-assigned this May 25, 2024
@chriskyfung chriskyfung changed the title ✨ Feature: Add script for formatting YouTube thumbnails in TheBrain Notes ✨Feature: Add script for formatting YouTube thumbnails in TheBrain Notes May 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

None yet

1 participant