Giter Club home page Giter Club logo

tera's Introduction


https://tera.codewithshin.com/

To Keep It Going, Please Show Your Love. ❤️

Buy Me a Coffee at ko-fi.com

Terminal Radio (TERA)

Overview

Article

Are you tired of being stuck in a musical rut with the same old songs being recommended to you on Amazon Prime Music or YouTube? Are you sick of the advertisements that come with streaming services like Spotify? If you’re looking for a new and exciting way to discover new music while you work, Tera (TErminal RAdio) is for you!

Tera is an interactive music radio player. Play your favorite radio station, CRUD your favorite lists, and explore new radio stations from your terminal. Tera stores favorite list in the ~/.config/tera/favorite directory and uses ~/.cache/tera directory to keep search related results.

Requirement

Unix-like environment.

  • mpv is a free, open source, and cross-platform media player.
  • jq is a lightweight and flexible command-line JSON processor.
  • fzf is a general-purpose command-line fuzzy finder.
  • gh is the GitHub CLI.
  • wget: Most UNIX-like OS should have it. macOS can install with brew install wget.

Features

Installation

awesome install shinokada/tera

HomeBrew/LinuxBrew

brew tap shinokada/tera
brew install tera

Debian/Ubuntu

Download a Debian package from the releases page.

sudo apt install ./tera_0.4.1_all.deb
rm -rf ./tera_0.4.1_all.deb

After installation please run the following to check mpv is installed correctly.

mpv https://live.musopen.org:8085/streamvbr0

If it plays music you're ready to go.

Uninstallation

You can uninstall by using the uninstallation script or manually.

Uninstallation script

curl -s https://raw.githubusercontent.com/shinokada/tera/main/uninstall.sh > tmp1 && bash tmp1 && rm tmp1

Manual

Remove following directories.

  • tera directory.
  • ~/.config/tera/ directory
  • ~/.cache/tera directory

Usage

Commands

Main Menu

tera

start

Player control

Keyboard Description
p and SPACE Toggle pause/unpause.
[ and ] Descrease/increase speed by 10%.
{ and } Halve/double current playback speed.
q Stop playing and quit.
/ and * Descrease/increase volume.
9 and 0 Descrease/increase volume.
m Mute sound.

Search Menu

By selecting 2) Search radio stations, you can search by tag, name, language, country code, state, and advanced(todo).

start

Music player

  • Pause: q or space.
  • Forward: Right arrow.
  • Backward: Left arrow.
  • More MPV control

Options

-h | --help
--version

Reference

Author

@shinokada

License

Please see LICENSE.

tera's People

Contributors

antonellocaroli avatar shinokada avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tera's Issues

[FEAT]: Anyway to get Tera to Run in Powershell or from a Command Line on Windows 10 machine please?

Description

Hello Shino, great work, unfortunately for those who are on the Windows 10 or 11 PC machines, cannot use this. Would you be so kind to build something similar that can be used on a Windows PC machine running 10 or 11? Something that can be Run on 'PowerShell' or the 'CMD" command line terminal on windows. Sorry, I do not have a MacOS or Linux machine to run this :-(

That would be really great.
Thank you again!

Additional Information

Thank you for your contribution in advance. Cheers.

Installation instructions don't work on Termux (aarch64)

I downloaded the tera_0.4.1-1_all.deb file, moved it to ~/temp, went to that directory, and typed apt install ./tera_0.4.1_all.deb (FYI: Termux doesn't use sudo). The response was this:

Reading package lists... Done
E: Unsupported file ./tera_0.4.1_all.deb given on commandline

mpv works just fine on Termux, though.

My devices's architecture is aarch64.

I'm using Termux 0.118.0 on Android 10, on a VastKing KingPad SA10.

incorrect using of mktemp

script failed with error: mktemp: too few X's in template ‘/tmp/radio_searches.json’

mktemp(1) - Linux man page:

TEMPLATE must contain at least 3 consecutive 'X's in last component.

If you using your own template, you have to name temporary file for example as: /tmp/radio_searches.XXXXXXX.json

where XXXXXXX will be replaced dynamically to random characters to prevent name overcrosing.

Also, suggestion: use trap to clean temporary files automatically for the purpose not only simplify cleaning but also remove trash in case system shutdown, Ctrl+C and so on

[FEAT]: Remember volume

Description

Volume is reset when you quit and it's way too loud for me so every time it's a blast (risky with earphones depending on the channel). It would be great if tera could remember the volume level.

Additional Information

No response

Any way to install it on Arch

I am not able to find a AUR package or any Manjaro community package for this and I really like this concept. How can I get it

[BUG]: [ffmpeg] SWR: Input channel layout "" is invalid or unsupported.

Description of the bug

cannot play any stations at all. Always get the same error regardless of station attempting to play:

(+) Audio --aid=1 (mp3 2ch 44100Hz)
AO: [coreaudio] 44100Hz fr-fl (stereo) 2ch floatp
[ffmpeg] SWR: Input channel layout "" is invalid or unsupported.
[swresample] Cannot open Libavresample context.
[swresample] libswresample failed to initialize.
Cannot convert decoder/filter output to any format supported by the output.
Audio: no audio
Exiting... (Errors when loading file)
Not able to play your station.

Steps To Reproduce

Play any station

Additional Information

MacOS 14.4.1
Homebrew 4.2.17-49-gbb05700
ffmpeg 7.0
mpv 0.37.0
tera 0.4.3

possibly related to this issue?
mpv-player/mpv#13665

[FEAT]: Auto reconnect

Description

I'd like to use tera on my car radio, in android using termux https://termux.dev/en/

It works fine, but using GPRS/4G, I sometimes lose the signal/connection and then have to reconnect manually to the station I was listening to (not good while driving)

Could some form of auto reconnect be implemented?

At the moment I am using MPV in a bash script with a while loop to reconnect.

Additional Information

No response

[FEAT]: Allow to quickly switch radio stations

Description

In typical radio, you can quickly change radio frequencies. There could be a feature to quickly change radio stations from a list.
PS: Great library though. I'm running this on Pi and it is working pretty well.

Additional Information

No response

[BUG]: Importing favorites .json is impossible/overwritten

Description of the bug

When one copies favorites off ~/.config/tera/favorites from an old system into a new one, the playlists do not get imported by the new tera. Even worst: they are sometimes overwritten.

Steps To Reproduce

  1. Build a favorite.json on system A and copy it on system B (into ~/.config/tera/favorites)
  2. tera -> 1 -> Select a list = 1) sample only
  3. tera -> 1(play from list) -> 3(list, read) -> 4(show) = my lists: sample
  4. 1(create a list) -> type list name -> is created = list ~/.config/tera/favorites now lists only sample + newly created list. All the other files are gone.

Additional Information

No response

[BUG]: Advanced search error

Description of the bug

when I try Advanced search I always get an error

Steps To Reproduce

TERA SEARCH MENU:

  1. Tag
  2. Name
  3. Language
  4. Country code
  5. State
  6. Advanced search
  7. Main Menu
  8. Exit
    Choose an option: 6
    The query format is -d field=word.
    Field can be one of tag, name, language, country code and state.
    Fields can be combined, for example: -d tag=jazz -d state=queensland
    Or tag=rock language=spanish countrycode=us
    Or tag=country state=IL
    Write your quiry: tag=country state=IL
    tag=country
    /usr/share/tera/lib/lib.sh: line 140: KEY: unbound variable

Additional Information

No response

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.