{"id":13797815,"url":"https://github.com/frankhale/toby","last_synced_at":"2025-05-13T04:32:28.136Z","repository":{"id":22755778,"uuid":"26101295","full_name":"frankhale/toby","owner":"frankhale","description":"A YouTube player for the desktop","archived":true,"fork":false,"pushed_at":"2020-05-05T02:26:30.000Z","size":18429,"stargazers_count":139,"open_issues_count":0,"forks_count":19,"subscribers_count":10,"default_branch":"master","last_synced_at":"2024-05-08T19:23:34.957Z","etag":null,"topics":["electron","electron-app","electron-application","nwjs","nwjs-application","typescript","youtube-player"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/frankhale.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-11-03T02:51:00.000Z","updated_at":"2024-04-04T04:04:52.000Z","dependencies_parsed_at":"2022-08-21T10:31:21.575Z","dependency_job_id":null,"html_url":"https://github.com/frankhale/toby","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frankhale%2Ftoby","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frankhale%2Ftoby/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frankhale%2Ftoby/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frankhale%2Ftoby/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/frankhale","download_url":"https://codeload.github.com/frankhale/toby/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":213867517,"owners_count":15649764,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["electron","electron-app","electron-application","nwjs","nwjs-application","typescript","youtube-player"],"created_at":"2024-08-04T00:00:33.252Z","updated_at":"2024-08-04T00:01:49.692Z","avatar_url":"https://github.com/frankhale.png","language":"TypeScript","readme":"# Toby\n\n**NOTE: A rewrite of this project is underway using Blazor and can be found\n[here](https://github.com/frankhale/toby-blazor)**\n\nToby is a simple YouTube player for the desktop.\n\n### Screenshots\n\nToby In Action:\n\n![Toby In Action](screenshots/toby-video-playback.png)\n\nToby Main UI:\n\n![Toby Main UI](screenshots/toby-main.png)\n\nToby Video List:\n\n![Toby Video List](screenshots/toby-video-list.png)\n\nToby Video List (Slim Grid)\n\n![Toby Video List (Slim Grid)](screenshots/toby-video-list-slim-grid.png)\n\nToby Recently Played:\n\n![Toby Recently Played](screenshots/toby-recently-played.png)\n\nToby Manage Videos:\n\n![Toby Manage Videos](screenshots/toby-manage.png)\n\nToby Server Log:\n\n![Toby Server Log](screenshots/toby-server-log.png)\n\n### Architecture\n\nThe old Toby architecture was geared towards an Electron deployment and I loaded\nall the code from the file system. The new architecture puts Toby behind an\nExpress web application that is spawned from a regular Node process so that more\ndeployment scenarios are possible.\n\nHaving Toby behind an Express app makes it fairly trivial to deploy to NW.js,\nElectron and support a regular web browser.\n\nToby is meant as a personal application running on a personal computer and it's\nweb API is not password protected in any way and there has been no attempt to\nprotect the data Toby collects. Toby only cares about a few things, namely\nYouTube video titles, YouTube video IDs and the groups you decide to store your\nfavorite videos in.\n\n### Running The Latest Code\n\nClone the code using `git` and then add a folder named `browsers` with a copy of\n`electron` and/or `nwjs`. We'll use one of these to run Toby.\n\n#### Dependencies\n\n- Node : [http://nodejs.org](http://nodejs.org)\n- Grunt : [http://gruntjs.com](http://gruntjs.com)\n- Bower : [http://bower.io/](http://bower.io/)\n- Webpack : [https://webpack.github.io/](https://webpack.github.io/)\n- Typescript : [http://typescriptlang.org/](http://typescriptlang.org/)\n\n## You Just Need One Of The Following:\n\n- Electron: [https://electronjs.org/](https://electronjs.org/)\n- NW.js: [http://nwjs.io/](http://nwjs.io/)\n\nDepending on what platform you want to run Toby in (Electron or NW.js) you'll\nneed to make sure the main property in package.json is set accordingly:\n\n##### NW.js\n\n```\nmain: \"./build/index.html\"\n```\n\n##### Electron\n\n```\nmain: \"./build/electron.js\"\n```\n\nIn order to run Toby you'll need to download the dependencies and build the\nsource code. Open a terminal to the source code repository and run the following\ncommands.\n\n#### Install Dependencies\n\n```\nnpm install -g webpack webpack-cli typescript grunt bower\nnpm install\nbower install\n```\n\n#### Building the Source Code\n\nNOTE: You will need to supply your own YouTube API key. This needs to be placed\nin an environment variable called `YOUTUBE_API_KEY`. You will need a Google\naccount to obtain one. Go [here (https://console.developers.google.com) to get\nan API key.\n\nThe server needs to be built using Grunt.\n\n```\ngrunt\n```\n\nThe front end needs to be build using Webpack.\n\n```\nwebpack\n```\n\nAssuming all dependencies are downloaded and the source code has been compiled\nperform the following from a command line at the root of the Toby code\nrepository:\n\n**NOTE**: `main` will need to be updated in `package.json` to point to the\ncorrect starting point for your deployment scenario. If you are using Electron\nit will need to be set to `build\\electron.js` or if you are using NW.js it'll\nneed to be set to `build\\index.html`. It should also be noted that the\nindex.html contained in the root of the Toby repository will be copied to the\nbuild folder and used from there.\n\n#### Running in NW.js\n\n```\nbrowsers\\nwjs\\nw.exe .\n```\n\n**NOTE**: You may want to replace the `ffmpeg.dll` that ships with NW.js with a more\ncapable one from [https://github.com/iteufel/nwjs-ffmpeg-prebuilt/releases](https://github.com/iteufel/nwjs-ffmpeg-prebuilt/releases). The `ffmpeg.dll`\nthat ships with NW.js is crippled and won't play many of the YouTube videos you\nmost likely will want to play.\n\n#### Running in Electron\n\n```\nbrowsers\\electron\\electron .\n```\n\n#### Running in a Browser\n\nStart the server up:\n\n```\nnode.exe build\\server.js\n```\n\nThen open a browser to `http://127.0.0.1:62374`\n\n### Running using the Toby Launcher\n\nI've wrote a rudimentary launcher in C# .NET to assist with launching Toby\neasily. By default if you run the launcher without command line args it will run\nToby using NW.js. There is only one command line option at this time.\n\nAfter building the launcher copy the TobyLauncher.exe, NDesk.Options.dll and\nNewtonsoft.Json.dll files to the root of the Toby repository.\n\n- Command Line Options:\n  - /p `[nw, electron, web]`\n\nExamples:\n\nLaunching Toby in a web browser: `TobyLauncher.exe /p web`\nLaunching Toby in Electron: `TobyLauncher.exe /p electron`\n\nNOTE: The launcher is crude and there is not enough error checking yet. Things\nwill likely go wrong if Toby is not set up correctly as stated above.\n\n### Usage\n\n**Important Key Combos:**\n\n\u003ckbd\u003eF1\u003c/kbd\u003e - Toggles server log\n\u003ckbd\u003eF11\u003c/kbd\u003e - Toggles fullscreen\n\nIn addition to keyboard shortcuts there are commands that can be typed into the\nsearch box that will perform various things.\n\nHere is a list (there will be additional ones added soon):\n\n- `[name hint]` : Lists locally saved videos based on the [name hint]\n- `[search term]` : Searches YouTube for the [search term]\n- `/local [search term]` : Searches for locally saved videos\n- `/g [group name]` : Lists the videos for the [group name]\n- `/list-all` : List all videos contained in the database\n- `/history` : Lists the recently played videos\n- `/rp` or `/recently-played` : List last 30 recently played videos\n- `/rps` or `/recently-played-search` : Search recently played videos\n- `/manage` : Manage what groups videos are in and also provide ability to\n  delete videos\n- `/archive` : Export the contents of the database to the data.txt file\n- `/gv` or `/grid-view` - Toggle slim grid view for search results\n- `/dv` or `/default-view` - Toggle default view for search results\n- `/clear` : Clears search results\n- `/monochrome` : (NW.js/Electron only) Short cut to set the monochrome video\n  filter and thumbnails in search results\n- `/saturate` : (NW.js/Electron only) Short cut to set the saturated video\n  filter and thumbnails in search results\n- `/sepia` : (NW.js/Electron only) Short cut to set the sepia video filter and\n  thumbnails in search results\n- `/normal` : (NW.js/Electron only) Short cut to set the normal video filter and\n  thumbnails in search results\n- `/filter monochrome` : (NW.js/Electron only) Short cut to set the monochrome\n  video filter and thumbnails in search results\n- `/filter saturate` : (NW.js/Electron only) Short cut to set the saturated\n  video filter and thumbnails in search results\n- `/filter sepia` : (NW.js/Electron only) Short cut to set the sepia video\n  filter and thumbnails in search results\n\n**NOTE**: You can refer to /src/toby-ui.tsx for the various short cuts available\nfor these commands.\n\n### Wait, I used NW.js and some YouTube videos won't play\n\nThe FFMPEG library that ships with NW.js is less capable than the one that ships\nwith Electron. The short answer is just copy the FFMPEG library from an Electron\nrelease replace the one that ships with NW.js. I've been doing this for a long\ntime and it works well for me (on Windows).\n\nThe longer answer is you can compile your own FFMPEG library with the support\nyou and there are a lot of resources already out there to handle this scenario.\n\n**NOTE**: This technique does not work with NW.js 0.20.0-beta1 as the FFMPEG\nseems to be different than one that ships with Electron.\n\nLooks like there are some alternate FFMPEG builds available which can take care\nof this: [https://github.com/iteufel/nwjs-ffmpeg-prebuilt/releases](https://github.com/iteufel/nwjs-ffmpeg-prebuilt/releases)\n\n### Features TODO\n\n- Usage info from within the app\n\n### Updating the data file\n\nI've removed the ordinary data file as it was too cumbersome to get the parser\ncorrect. I've decided to just define some basic starting video data in the\nfollowing code file `/src/data.ts`. If you are building from source feel free to\nedit this to your liking. If at anytime you edit this file and run Toby it will\nupdate your database importing any new videos you put there.\n\n**NOTE**: Although it hasn't been done yet it'd be trivial to replace this with\nJSON data loaded from the filesystem.\n\n## Author(s)\n\nFrank Hale \u0026lt;frankhale@gmail.com\u0026gt;\n24 November 2019\n\n## License\n\nGNU GPL v3 - see [LICENSE](LICENSE)\n","funding_links":[],"categories":["Apps"],"sub_categories":["Open Source","Video/Music"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrankhale%2Ftoby","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffrankhale%2Ftoby","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrankhale%2Ftoby/lists"}