dart_tags 0.1.0 dart_tags: ^0.1.0 copied to clipboard
The library for work with music tags like ID3. Written on pure Dart. It can be used in flutter, web, and vm projects.
Dart Tags #
The library for parsing ID3 tags, written in pure Dart.
You can found sample app written with flutter framework here.
License #
project under MIT license
Changelogs #
0.1.0 #
- added writers (currently v2 writer not fully implemented)
- fixed custom tags (TXXX / WXXX) reading
- wrote some rough tests for writers
Instalation #
add dependency in pubsec.yaml
dependencies:
dart_tags: ^0.1.0
Usage #
A simple usage example:
import 'dart:io';
import 'package:dart_tags/dart_tags.dart';
main(List<String> args) {
TagProcessor tp = new TagProcessor();
File f = new File(args[0]);
tp.getTagsFromByteArray(f.readAsBytes()).then((l) => l.forEach((f) => print(f)));
}
Experimental #
And since 0.1.0 you can write some tags into the byte array:
import 'dart:io';
import 'package:dart_tags/dart_tags.dart';
main(List<String> args) {
TagProcessor tp = new TagProcessor();
final f = new File(args[0]);
final tag = Tag()
..tags = {
'title': 'foo',
'artist': 'bar',
'album': 'baz',
'year': '2010',
'comment': 'lol it is a comment',
'track': '6',
'genre': 'Dream'
}
..type = 'ID3'
..version = '2.4';
List<int> newByteArrayWithTags = tp.putTagsToByteArray(f.readAsBytes(), [tag]);
}
Features and bugs #
Please feel free for feature requests and bugs at the issue tracker.