Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ilynxcat/streamtext-updater
Simple script to update stream text files for use in OBS.
https://github.com/ilynxcat/streamtext-updater
Last synced: about 2 months ago
JSON representation
Simple script to update stream text files for use in OBS.
- Host: GitHub
- URL: https://github.com/ilynxcat/streamtext-updater
- Owner: iLynxcat
- Created: 2024-08-13T05:32:17.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2024-08-25T23:56:22.000Z (4 months ago)
- Last Synced: 2024-08-26T01:26:23.735Z (4 months ago)
- Language: TypeScript
- Size: 12.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# streamtext-updater
A simple utility to update stream text files for use in OBS text sources.
## Building
- install Bun
- clone this repository
- install dependencies with `bun install`
- bundle the binary with `bun compile`
- move the generated `streamtext-update` executable to the directory you'd like
the generated text files to be
- edit your crontab with recommended options from below## Running
At present, there are two modes you can run `streamtext-update` in: time and
music.### Music mode
> [!NOTE]
> Music mode only supports Apple Music on macOS.Using JavaScript for Automation (JXA), a native automation technology for macOS,
the `streamtext-update` binary fetches the currently playing track details from
the Music app and writes it to `current_track.txt` in the
`Artist Name - Track Title` format.The recommended crontab entry for music mode is:
```
* * * * * path/to/streamtext-update music
```Unless you change `index.ts` before compilation, music mode will update every 5
seconds for a minute before terminating because Cron does not run jobs any more
frequent than a minute.#### Testing music mode
If you'd like to check to make sure music mode is working properly, run
`streamtext-update music --print` and it'll print the output instead of writing
it to disk.### Time mode
Time mode simply writes the current time to `current_time.txt` in 24-hour format
(i.e. `09:41`, `20:30`) and exits.The recommended crontab entry for time mode is:
```
* * * * * path/to/streamtext-update time
```