![]() ![]() Too decisive, you know? One compromise you can make between that and choosing from the whole collection yourself is to get random to offer you two – or more – candidates to choose from. Playing a random album the glamorous wayĪ random choice from a large collection can be jarring. Here’s how you can make it amazing and a little fancy. Tell the client to play a random album from that collection.Get a list of the albums in the ‘□’ collection.Create an instance of your server with the correct url and token.Import the random library and the PlexServer class.This is cool because it doesn’t have to be on the same machine running the script! In my case I have a machine running Plexamp connected to my KEF speakers. Know the name of the client that will play the album.Know the local or remote IP address of your server.Import random from rver import PlexServer BASEURL = '' TOKEN = '' plex = PlexServer ( BASEURL, TOKEN ) owned = plex. This is very easily done using the Python library. 1 Sometimes I want to put on some music but I don’t have a specific album in mind and end up scrolling the collection aimlessly.Ī common way to deal with this kind of choice paralysis is to let a random picker choose for you. I keep all the albums I own as CDs in a Collection called ‘□’. I’ve been playing with it for a while, it is impressive, and this is the first of many uses I have in mind for it. I really love this setup.īesides the official Plex and Plexamp clients, there is an unofficial Python Plex library whose goal is to “match all capabilities of the official Plex Web Client”. I then use Plexamp to listen to music both at and away from home. The server pulls down a lot of metadata that makes artist and album pages much more delightful to browse than iTunes/Music.app ever did. My music library lives under the watchful eye of a Plex server. In the meantime, this is a slightly out of context taste. Here’s the TZIdentifier script run in Scriptable:Īnother installment in my series on listening to music is forthcoming and it will mostly be a love letter disguised as a 1000+ word use guide for Plexamp. Once the shortcut is done pushing the commit, Netlify will detect the commit to the main branch, pull it, build it, then serve it. Save BulletinBody to a Markdown file in Working Copy and stage it for commit.Ĭommit all staged files with a simple commit message and sign the commit with the key Working Copy already has.Īt this point my work is done and Netlify takes the wheel. Pull any new commits to the local repo in Working Copy.Īsk if I want to attach a photo to the bulletin.īrowse Files.app for the photo, save the photo to the proper path in Working Copy and stage it for commit.Ĭreate the body of the photo bulletin and save it to BulletinBody variable.Ĭreate text only bulletin and save it to BulletinBody variable, then end the if statement. Okay you get it, I won’t keep saying “we’ll use that later”. Prompt for the file suffix and create a text variable of the full file path. Get current date and time in ISO 8601 format. Displays a notification that the bulletin was published.Īccept text input, save value in Bulletin variable.Writes the post and optional image to the repo in Working Copy.If Yes, prompts the user to select the photo from Files.app and generated the body of a photo post.Asks the user if they want to attach a photo.Pulls the latest updates to the repo in Working Copy.i.e., what to add after the date in the post filename. Detects the local timezone to use later in the post frontmatter.Critical since that’s how the shortcut can add posts and photos to the site’s git repo.īrief overview of how it all works. To run a script that identifies the local timezone and returns its TZ database name. The Shortcut relies on two third-party apps: You tell Netlify to watch your site’s repo, and it will automatically build and serve your site whenever it sees a new commit in the branch of choice. Bulletin’s source code lives in a privare GitHub repo, and the site is hosted on Netlify. Contextīulletin is built using Jekyll, meaning it’s a static website that needs to be generated each time I make a change, and the generated pages need to be hosted somewhere. This post is about an iOS Shortcut that I use to publish short posts and photos to my Micro.blog site Bulletin. They are not a serious tool to mix point-and-click with code to build some serious workflows. And really it was my loss, because Shortcuts have long stopped being just a gimmick. 1 I’ve seen others build impressive shortcuts for years but for some reason it took me until late last year to start building some of my own. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |