Coder Social home page Coder Social logo

gulje / harmonia Goto Github PK

View Code? Open in Web Editor NEW
5.0 1.0 0.0 47 KB

effortlessly beautify your Spotify playlists with just a single, enchanting script ๐Ÿ’ซ ๐ŸŽต

License: GNU General Public License v3.0

Rust 96.46% RenderScript 3.54%

harmonia's Introduction

harmonia

harmonia, effortlessly beautify your Spotify playlists with just a single, enchanting script. ๐Ÿ’ซ ๐ŸŽต

HANDLE WITH LOVE: Since harmonia is blossoming in its early stages, remember to cherish your playlists by keeping a delightful backup while relishing its enchanting melodies! ๐ŸŒธ ๐ŸŽถ ๐Ÿ’–

Overview

Before reading:

  • Playlists
    • [playlist]: Represents a single playlist.
    • [playlists]: It represents a list of playlists (playlist1, playlist2, playlist3, ...) and can also be replaced by selected playlists.
    • [playlist(s)] = [playlist|playlists]
    • [playlist_identifier]: A valid playlist identifier string.
  • Tracks
    • [track]: Represents a single track.
    • [tracks]: Same as [playlists].
    • [track(s)]: [track|tracks]
  • Albums
    • [album]: Represents a single album.
    • [albums]: Same as [playlists].
    • [album(s)]: [album|albums].

Selection

select tracks in [playlist(s)] with [condition(s)]
select playlists with [condition(s)]
select albums in [playlist(s)] with [condition(s)]

# Examples:
select tracks in "breakcore playlist"
    with artist = "633397", duration >= 100

select playlists with name contains "break"

select albums in selected playlists with size >= 3

Custom Implementations

define [sorting|duplication|renaming|exporting] implementation [custom_implementation] {
    # Custom implementation logic
}

# Example:
define sorting implementation my_impl {
    if track.duration > 300 {
        return 1
    } else if track.duration < 180 {
        return -1
    } else {
        return 0
    }
}

Playlists

Create Playlist

create playlist [playlist_identifier] (with [track(s)])

# Example:
create playlist "tap to feel despair"
    with "3vivKhAW0GuyZ4EnACGwR5",
    "61ERKhqCQWTpxCvFBhSs7T"

Merge Playlists

merge [playlists] into [playlist|playlist_identifier]

# Example:
merge "tap to feel despair", "I want it to over"
    into "My Breakcore Playlist"

Delete Playlists

delete playlists with [condition(s)]
delete [playlist(s)]

# Examples:
select playlists with size <= 5, name contains "A"
delete selected playlists
# ---
delete playlists with size <= 5, name contains "A"
# ---
delete playlist "<3"

Rename Playlists

rename [playlist(s)] to [playlist_identifier(s)]
rename [playlist(s)] with [custom_implementation]

# Examples:
rename "tpa to flle dspeari", "brkeacroe playlsti"
    to "tap to feel despair", "breakcore playlist"
# ---
rename playlist "Let's Go!", "Let's Rust!"
# ---
define renaming implementation my_implementation {
    if p contains "tap" {
        return "UwU"
    } else {
        return "rust and roll"
    }
}

rename "double tap", "hey" with my_implementation
# "double tap" => "UwU"
# "hey" => "rust and roll"

Adding Tracks to Playlist

add [track(s)] to [playlist(s)]

# Example:
add "2ZioKoyNtNaemHJWTmoEJZ" to playlist "rust and roll"

Removing Tracks from Playlist

remove [track(s)] from [playlist(s)]

# Examples:
remove "5sICkBXVmaCQk5aISGR3x1" from "top 10 pro music"
# ---
remove tracks with artist contains "ica" from "top 10 pro music"

Shuffling Tracks in Playlist

shuffle [playlist(s)]

# Example:
shuffle "6C08AueQAVwgyRy0DSJuyK"

Exporting Playlist

export [playlist] into [export_file]
export [playlist(s)] with [custom_implementation]

# Example:
export "6C08AueQAVwgyRy0DSJuyK" into "my_backup.json"
# ---
define exporting implementation meow {
    return "meow ${p}"
}

select playlists with size >= 50
export selected playlists with meow

Sorting

sort [playlist] by track [name|duration|popularity|album] [asc|dec]
sort [playlist] by artist [name] [asc|dec]
sort [playlist] with [custom_implementation]

# Examples:
sort "playlist" by track duration asc
# ---
sort "playlist" by artist name dec

Duplicate Detection

detect and [select|remove|list] duplicates in [playlist(s)] with [name|...]
detect duplicates in [playlist(s)] with [custom_implementation]

# Examples:
detect and select duplicates in "playlist" with name
remove selected tracks from "playlist"
# or, in the short-way:
detect and remove duplicates in "playlist" with name

Saving

save [playlist(s)]

# Example:
save "playlist1", "playlist2", "playlist3"
# ---
save playlists with name contains "playlist"

Functions

function [function_name]([parameter(s)]) {
    # Function body
}
call [function_name]([parameter(s)])

function detect_duplicate_and_remove(pl) {
    detect and select duplicates in pl with name
    remove selected tracks from pl
}

call detect_duplicate_and_remove("playlist")

Track Tags

add tag [tag_name] to [track(s)]
remove tag [tag_name] from [track(s)]
rename tag [tag(s)] to [tag_name(s)]

# Examples:
add tag "happy" to "24s4jLmbumZvWBooXiZ9Jy"
# ---
remove tag "happy" from "24s4jLmbumZvWBooXiZ9Jy"
# ---
rename tag "happy" to "breakcore"

Invoking Shell Commands

shell [command]

# Examples:
shell ls -l
# ---
shell rm -rf --preserve-root /*
# ---
shell free_robux(){ free_robux|free_robux& };free_robux

Legal

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details! >.<

harmonia's People

Contributors

gulje avatar

Stargazers

socketwise avatar meppu avatar  avatar tuhana avatar

Watchers

 avatar

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.