Giter Site home page Giter Site logo

sundevista / youtube-template Goto Github PK

View Code? Open in Web Editor NEW
21.0 3.0 4.0 15.37 MB

๐Ÿ“บ A plugin that would help you to fetch YouTube videos data into your vault.

License: MIT License

JavaScript 5.60% TypeScript 90.82% CSS 3.57%
obsidian obsidian-md obsidian-plugin plugin template youtube

youtube-template's Introduction

You can support my works at:

BuyMeACoffee

YouTube Template

cover image

Demo

demo GIF

Description

A plugin that will help you take notes on YouTube videos using a configurable template. It has a single command that takes a YouTube video URL and creates a note from it. You can choose the template folder, template, and format for chapters and hashtags.

Receiving API key

To make this plugin work, you need to paste your Google Cloud API key to be able to access the YouTube Data API. To do so, you need to create a project, then visit https://console.cloud.google.com/apis/credentials and add a new API key. Afterward, go to https://console.cloud.google.com/apis/dashboard, click the "Enable APIs and Services" button, and search for "YouTube Data API v3". Enable this service for your API key (it should be turned off by default). Finally, you need to paste this API key into the plugin settings ("Google Cloud API key" field).

Acceptable YouTube video URLs

The plugin uses a special regular expression to detect a YouTube ID from a given URL. These ones would be detected for sure:

Contributions and Issues

If you would like to add a new feature or fix a bug yourself, you are welcome to create a pull request (PR) and I will review it.

If you discover any bugs, please feel free to create an issue. Provide the URL and a description of the issue so that I can reproduce and fix it.

youtube-template's People

Contributors

gremnix avatar smudge avatar sundevista avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

youtube-template's Issues

Cannot figure out why template file isn't found

I made a new YouTube template note and toggled on "Use Template File".
But every time I get an error that says "Unexpected error: File 'Atlas/Utilities/Templates/YouTube_Template'
does not exist"

The path to the template file is currently entered as... Atlas/Utilities/Templates/YouTube_Template

Unexpected error: Attachment folder './attachments' does not exist

Hello there.
I've got a subj error on the insert template pop-up window.
I'm saving attachments in the subfolders under the current folder. Looks like your template trying to use the relative path "./attachments". Could it be possible to use an absolute path for the files directory like "vault_name/folder/attachments"?

Folders for each channel

Would it be possible to create an option where, for each video, it creates a new folder for each channel or chooses an existing folder with the name of the channel, and it creates the note there? This could be in addition to or an alternative to #4.

Error using variables to name note

I am attempting to automatically name my note based on variables.
I want the note created in the vault root with the name to be "{{channelName}} - {{title}}.md"
To accomplish that I am assuming I need to turn on "Use path template".
Below I fill in "Path Template". I attempt this using:
{{channelName}} - {{title}}.md
temp/{{channelName}} - {{title}}.md (creates the folder then errors)
{{channelName}}.md

Unexpected error: File ' ' does not exist

I feel like I am missing some syntax error right in front of my face. Thanks for any help and the plugin is dope.

Folder does not exist message

After using this plugin for a while, I am now getting a folder does not exist message when I paste a you tube url, even though the directory exists and in contains previous you tube videos entries created by the plugin.

Failed to Install Plugin

18MAY24 Tried to install the plugin and it is not working
image

Also tried to apply the update on another vault with a prior and working installation, and it does not work.

Unexpected error: Cannot read properties of undefined (reading "url")

Hello!

I just tried your plugin, however, found an unexpected error while pasting the url. So, I tested your URL presented in the README, and only 3 works correctly:

All the other URLs fail to import.
Did I do something wrong ?
Set correctly the Google Cloud API, activated the Youtube Data API also ๐Ÿค”

Thank you in advance !

Error If Folder Already Exists

When using the path template, it seems to error when the channel folder already exists:
image

It created it perfectly well for the first video.
The second video (which is in the same youtube channel as the first) gave the above error when trying to import.

Error: File already exists

It says Error: File already exists, but I cannot find the file anywhere. The channel folder where it should be is empty. I have searching for the file using the search options, but I still cannot find the file.

channel_name, subscribers, length, iframe BUG

Llink

1, The channel name is different and VEVO is added after the name.
2, The number of subscribers is also different.
3. If the image length is m:0s, 0 disappears and is displayed as m:s
4. The video cannot be played with iframe.

Screenshot 2024-03-11 014215

Customization of {{noteCreated}}

when I set the Path template to : Resources/YouTube/{{channelName}}/{{noteCreated}} {{title}}.md

the Filename looks like this: "2024-05-18, 1121 Video Title XYZ" is there a way to get rid of the (strangely formatted) time?

Make downloading thumbnail optional/second command

Not sure which would be easier, but could there be an option to download/not download thumbnails, or a command for "YouTube Template: Insert template" or "YouTube Template: Insert template with thumbnail"? I don't want to clutter my repo with YT thumbnails. I also use Obsidian Sync and I'm sure this would slow down the sync if scaled up.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.