mirror of
https://github.com/KRTirtho/spotube.git
synced 2025-09-13 16:05:18 +00:00
61 lines
3.0 KiB
Plaintext
61 lines
3.0 KiB
Plaintext
---
|
|
layout: "layouts/DocLayout.astro"
|
|
title: Introduction
|
|
description: Learn how to develop plugins for Spotube
|
|
order: 0
|
|
---
|
|
|
|
Plugins in Spotube are used for fetching metadata (Playlist, Album, Artist, Track Info, Search etc) and scrobbling. It gives developers
|
|
access to Spotube's internal APIs to create custom metadata providers and audio [scrobblers][scrobbler_wiki].
|
|
|
|
Plugins needs to be written in [hetu_script][hetu_script_link], which is a Dart-based scripting language.
|
|
You probably never heard of it before.
|
|
|
|
## Requirements
|
|
|
|
To develop plugins for Spotube, you need to have the following requirements:
|
|
|
|
- Basic programming knowledge
|
|
- [Dart][dart] and [Flutter][flutter] knowledge
|
|
- [Visual Studio Code][vscode] or any other code editor
|
|
|
|
Spotube uses [hetu_script][hetu_script_link]. It's kind of similar to Typescript.
|
|
Learning it shouldn't take much time if you already know Dart or Javascript.
|
|
|
|
Go to Hetu Script's [official website and documentation][hetu_script_link] to learn more about it.
|
|
|
|
## Resources
|
|
|
|
The [`hetu_script`][hetu_script_link] programming/scripting language is relatively new. So there's no ecosystem around it yet.
|
|
However, we created some helpful libraries to aid with Spotube plugin development. The [hetu-community][hetu_community] is a
|
|
community driven effort to create libraries and tools for Hetu Script. Below are available libraries:
|
|
|
|
#### Core Libraries
|
|
|
|
- [**hetu-community/hetu_std**][hetu_std]: A standard library for Hetu Script. Provides basic functionality like Http client, DateTime, Cryptography API,
|
|
encoding/decoding (JSON, Utf8, Base32) etc.
|
|
- [**KRTirtho/hetu_spotube_plugin**][hetu_spotube_plugin]: A library for Spotube plugin development. It provides access to Spotube's internal APIs
|
|
(Webview, Forms, LocalStorage etc.) and utilities for fetching metadata and scrobbling.
|
|
|
|
> You can find more libraries in the [hetu-community GitHub organization][hetu_community].
|
|
|
|
#### Programming aid
|
|
|
|
- [Hetu Script Plugin for VSCode][hetu_script_vscode]: A VSCode extension for Hetu Script. It provides basic syntax highlighting
|
|
support. But it doesn't support [LSP (Language Server Protocol)][lsp] yet so no autocompletion or linting is available.
|
|
- [hetu_script_dev_tools][hetu_script_dev_tools]: A CLI tool for compiling hetu script files to bytecode or directly running them and a REPL
|
|
|
|
{/* Link Variables */}
|
|
[hetu_script_link]: https://hetu-script.github.io/
|
|
[scrobbler_wiki]: https://en.wikipedia.org/wiki/Scrobbling
|
|
[dart]: https://dart.dev/
|
|
[flutter]: https://flutter.dev/
|
|
[vscode]: https://code.visualstudio.com/
|
|
[lsp]: https://en.wikipedia.org/wiki/Language_Server_Protocol
|
|
[hetu_script_vscode]: https://marketplace.visualstudio.com/items?itemName=hetu-script.hetuscript
|
|
[hetu_community]: https://github.com/hetu-community
|
|
[hetu_std]: https://github.com/hetu-community/hetu_std
|
|
[hetu_otp_util]: https://github.com/hetu-community/hetu_otp_util
|
|
[hetu_spotube_plugin]: https://github.com/KRTirtho/hetu_spotube_plugin
|
|
[hetu_script_dev_tools]: https://pub.dev/packages/hetu_script_dev_tools
|