| assets | ||
| channel | ||
| generator | ||
| html | ||
| tag | ||
| templates | ||
| tui | ||
| utils | ||
| .gitignore | ||
| COPYING | ||
| go.mod | ||
| go.sum | ||
| main.go | ||
| PRIVACY-POLICY | ||
| README.md | ||
| settings.sample.json.tmpl | ||
| TERMS-OF-SERVICE | ||
Joyrex YSM
Standard Info
Joyrex YSM is a TUI-based application (using Bubble Tea and Lip Gloss for UI elements) used for keeping a local index of your Youtube Subscriptions and letting you attach notes and tags to them. The idea is this is a backend application that prepares the database so a frontend application can handle displaying the subscription list for a specific tag/whatever, however there is a basic html page generator included as well.
This was created as a way for me to learn/improve writing stuff in Go, but quickly turned into me learning how to use Bubble Tea, Lip Gloss and The Elm Architecture. This is all to say that while the code is functional, there's very likely cleaner ways to write it. It's a great learning experience and I'm proud of it, though.
You can see what the built-in generator output looks like on my homepage.
Downloading
Official releases are on the releases page.
Compiling
You can build this yourself by doing the following:
git clone https://repo.joyrex.net/ejstacey/ysm.git
cd ysm
go build .
Installing
-
Download and extract the latest release package. In the directory, run:
./ysm --installOn MacOS, see MacOS Issues below.
This will install necessary files in their required locations for your user home directory. The script will tell you where it places files, but generally (assuming you have a pretty standard environment):
Linux: ~/.local/share/ysm and ~/.config/ysm Windows: %LOCALAPPDATA%/ysm, MacOS: ~/Library/Preferences/ysm and ~/Library/Application Data/ysmIt also installs the ysm executable into ~/.local/bin, creating the directory first if it needs to.
-
(Optional) Edit the default settings file if you'd like. The --install command gives you the file's location. Defaults are generally fine.
-
(Optional) Make sure ~/.local/bin is in your PATH.
Running
- run ysm (or ysm.exe) in a console
- log into google and let it sync your subscriptions from youtube
- hit 't' to go to the tags list menu, then 'n' to create a new tag.
- fill in the tag info and submit it.
- when you're done adding tags, hit 'c' to go to the channel list menu
- select a channel and hit '<enter>' to go to the channel modify screen
- add notes if required. on the tag select, use the arrow keys to move around the tags, then hit '<enter>' to select the tag
- submit when done/ready
- when you've done all the channel noting/tagging you want, from the channel or tag list screen, hit 'g' to go to the generate pagepage
- set/change info as wanted, the defaults are probably fine, but you can customise it as you get more used to it.
- make note of the output file it generated.
- press 'q' on the channel/tag list screen to quit.
- look at the location given to see the page.
- upload the contents of the whole output directory (where your output file lives) onto a web host somewhere.
- send the link to your friends and enemies so they can see what you like on youtube.
Help
Help is at the bottom of most screens. If you hit a bug, email me at ejstacey@joyrex.net. I'm going to get this mirrored to github for bug lodging purposes soon.
FAQ
- This is too much work, why didn't you do a webpage to do all this so I can edit/display in my browser?
I really, really, really don't want your data (and you shouldn't want to hand it over to me). I think there's value in people learning to create/edit webpages, and doing something basic like having the majority filled out for you so you can learn by doing tweaks to something that is there for the most part. There's movements out there to embrace/return to what is called the small web. I don't follow this perfectly (using javascript), but self-hosting is a bit part of it, and this does that. - So where can I host this? ISPs used to give webspace, yours may still do it. Otherwise I've heard good things about neocities.
- Why is this so ugly? I am really not a UX guy, which means this was a ridiculous task for me to pick up, since there's both a web frontend and the program frontend. I have plans to let people define colours in settings.json so they can make it look nicer.
- I was looking at your code and there's some sloppiness in there This project was a year of on and off work, and I was learning as I went, so while the logic works (I think), the code might not be as clean or efficient as it could be. I am going back and still cleaning stuff up as I add more polish to the program.
Tech stuff
Todo
In no particular order:
Add help entries on screens that don't have them- Create better handling of non-fatal errors
- Create confirmation screens
- Abstract the program themeing out to let people have custom themes
Mirror to github for ticket lodging- Create screenshots for the README
- Create a youtube video showing a typical process flow.
- Squash bugs
Database format
The database is a simple sqlite database with three tables (diagram made with draw.io):
Youtube Access
This program uses Google's OAuth to retrieve your subscription list. The only permission it uses is "youtube.YoutubeReadonlyScope" so it can grab your subscriptions. All data it grabs is stored locally on your machine. Nothing is sent to me/stored on my side/etc. The code for authenticating to youtube is in this file and the code for grabbing the subscriptions is in this file.
Youtube subscription info is retrieved in two situations:
- The channel database is empty
- You set "Refresh" to "true" in your settings.json file.
In these situations the program will give you a browser link to auth with google and try to open that link in your normal browser using xdg-open. Once you auth with google, the time-limited authentication credential is stored in ~/.credentials/ysm.json.
MacOS Issues
Apple will mark the program as unknown/untested, because they want me to pay $150/yr to get a tickmark. I'm not doing that, so unfortunately when you download and run it on MacOS it gives that warning and won't let you open it.
Follow the steps on the official apple site after you attempt running it. It should only do this once per YSM version.
Privacy Policy and Terms of Service
Please see our privacy policy and terms of service in the root of this repository for the respective information.

