Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/moefront/muse-json-generator
Node.js JSON generator for the simple and diligent HTML5 audio player MUSE https://github.com/moefront/muse
https://github.com/moefront/muse-json-generator
muse
Last synced: 23 days ago
JSON representation
Node.js JSON generator for the simple and diligent HTML5 audio player MUSE https://github.com/moefront/muse
- Host: GitHub
- URL: https://github.com/moefront/muse-json-generator
- Owner: moefront
- Created: 2017-08-30T02:17:35.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2022-12-07T09:49:10.000Z (about 2 years ago)
- Last Synced: 2024-04-27T01:21:11.290Z (8 months ago)
- Topics: muse
- Language: TypeScript
- Homepage:
- Size: 298 KB
- Stars: 7
- Watchers: 3
- Forks: 2
- Open Issues: 14
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# muse-json-generator
[![npm](https://img.shields.io/npm/v/muse-json-generator.svg?style=flat)](https://www.npmjs.com/package/muse-json-generator)
[![Build Status](https://travis-ci.org/moefront/muse-json-generator.svg?branch=master)](https://travis-ci.org/moefront/muse-json-generator)
[![Coverage Status](https://coveralls.io/repos/github/moefront/muse-json-generator/badge.svg?branch=master)](https://coveralls.io/github/moefront/muse-json-generator?branch=master)
![built by](https://img.shields.io/badge/built_by-MoeFront-ff69b4.svg)Node.js JSON generator for the simple and diligent HTML5 audio player [MUSE](https://github.com/moefront/muse).
## Usage
### with Node.js API
```bash
$ npm install --save muse-json-generator
```Create a new file named `playlist.js`
```js
const generator = require('muse-json-generator');
generator(477331181, 480097777).then(playlist => {
console.log(playlist);
});
``````bash
node playlist.js > playlist.json
```### on CLI
```bash
$ npm install -g muse-json-generator
``````bash
$ muse 477331181 480097777
$ muse 477331181,480097777$ muse 477331181 480097777 --temporary
# If you want a temporary link like /m([0-9]).music.126.net/, please provide this option.
```This action would generate a `playlist.json` in your current working directory.
**Try `--stdout` option to write playlist to stdout without generating a file.**
```bash
$ muse 477331181 480097777 --stdout
```## API
```js
const generator = require('muse-json-generator');
```
### generator(id, [id], [id], ...)**Returns Promise.**
## Todo list
- [x] Adjust translation
- [x] test## License
© 2017-2020 MoeFront Studio | The MIT License (MIT).