mirror of
https://onedev.site.tesses.net/tytd2025
synced 2026-02-08 09:45:44 +00:00
First commit
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
bin
|
||||
obj
|
||||
31
Tesses.YouTubeDownloader.PluginTemplate/cross.json
Normal file
31
Tesses.YouTubeDownloader.PluginTemplate/cross.json
Normal file
@@ -0,0 +1,31 @@
|
||||
{
|
||||
"dependencies": [
|
||||
],
|
||||
"info": {
|
||||
"description": "Plugin Template for TYTD2025",
|
||||
"maintainer": "Mike Nolan",
|
||||
"repo":"https://onedev.site.tesses.net/tytd2025",
|
||||
"homepage": "https://tesses.net/apps/tytd/2025/",
|
||||
"short_name": "tytd2025plugin",
|
||||
"short_name_pretty": "Tesses YouTube Downloader 2025 Plugin Template",
|
||||
"license": "GPLv3",
|
||||
"template_extra_text_ftles": [
|
||||
],
|
||||
"template_ignored_files": [
|
||||
"bin",
|
||||
"obj"
|
||||
],
|
||||
"template_info": {
|
||||
"type": "lib",
|
||||
"plugin_host": "tytd2025",
|
||||
"short_name": "changeme",
|
||||
"short_name_pretty": "Change Me",
|
||||
"license": "GPLv3"
|
||||
},
|
||||
"template_project_dependencies": [
|
||||
],
|
||||
"type": "template"
|
||||
},
|
||||
"name": "Tesses.YouTubeDownloader.PluginTemplate",
|
||||
"version": "1.0.0.0-prod"
|
||||
}
|
||||
1
Tesses.YouTubeDownloader.PluginTemplate/src/main.tcross
Normal file
1
Tesses.YouTubeDownloader.PluginTemplate/src/main.tcross
Normal file
@@ -0,0 +1 @@
|
||||
func PluginInit() new Plugin();
|
||||
29
Tesses.YouTubeDownloader.PluginTemplate/src/plugin.tcross
Normal file
29
Tesses.YouTubeDownloader.PluginTemplate/src/plugin.tcross
Normal file
@@ -0,0 +1,29 @@
|
||||
/^
|
||||
%PROJECT_NAME Class
|
||||
^/
|
||||
class Plugin {
|
||||
public Plugin()
|
||||
{
|
||||
/*
|
||||
You can access these anywhere in the plugin
|
||||
|
||||
TYTD.GetVideoId(id): get the youtube video id from url or id
|
||||
TYTD.GetPlaylistId(id): get the youtube playlist id from url or id
|
||||
TYTD.GetChannelId(id): get the youtube channel id from url or id
|
||||
TYTD.Config[key]: get a string setting for this plugin
|
||||
TYTD.Config[key] = value: set a string setting for this plugin (is presistant)
|
||||
TYTD.Config.Directory: a crosslang SubdirFilesystem for the Files directory in plugin directory
|
||||
TYTD.Config.DirectoryPath: same directory but the actual path of it for FS.Local
|
||||
|
||||
Resolution, SubscriptionBell, TYTD.Downloader (the instance, you can't create your own instance of it): See https://cpkg.tesseslanguage.com/package_docs?name=Tesses.YoutubeDownloader&version=1.0.0.0-prod
|
||||
|
||||
*/
|
||||
Console.WriteLine("Run your initialization here");
|
||||
}
|
||||
|
||||
public Server = new PluginServer();
|
||||
public Close()
|
||||
{
|
||||
Console.WriteLine("Do any finishing work");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
class PluginServer
|
||||
{
|
||||
public Handle(ctx)
|
||||
{
|
||||
ctx.WithMimeType().SendText(<div><h1>Hello, world from @%PROJECT_NAME<h1><p>Path: {ctx.Path}, OriginalPath: {ctx.OriginalPath}</p></div>);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user