spc-tag
v1.1.0
Published
🎮🎶 Node.js library and command line program to read or write Super Nintendo SPC ID666 tags.
Readme
Node.js library and command line program to read or write Super Nintendo SPC ID666 tags. It supports reading and writing both standard and extended ID666 tags.
Use as a command line program
Install
npm i -g spc-tagUse
Read tags
spc-tag file.spcWrite tags
spc-tag write songTitle="new title" file.spcTo write more than one tag at once, list them all before the file:
spc-tag write songTitle="new title" artist="new artist" file.spcA tag name that isn't one of the tags (like songTitel) is an error, which suggests the tag you may have meant, and nothing is written.
Use in Node.js
Install
npm i spc-tagUse
const { readSPCID666Tags, writeSPCID666Tags } = require('spc-tag')
const fs = require('fs')
// read tags
const readMetadata = readSPCID666Tags(fs.readFileSync('file.spc'))
console.log(readMetadata) // prints metadata
// write tags
const fileData = fs.readFileSync('file.spc') // open file as a buffer
const metadata = readSPCID666Tags(fileData) // get metadata
metadata.songTitle = 'new title' // change metadata
const editedFileData = writeSPCID666Tags(fileData, metadata) // write new metadata to the buffer
fs.writeFileSync('file.spc', editedFileData) // write buffer to file
const editedFile = fs.readFileSync('file.spc') // open edited file as a buffer
console.log(readSPCID666Tags(editedFile)) // print metadata with editsDevelopment
Run tests
- Clone this repo
npm cinpm t
