dart_tags 0.0.8

  • README.md
  • CHANGELOG.md
  • Example
  • Installing
  • Versions
  • 33

Dart Tags #

pub package

The library for parsing ID3 tags, written in pure Dart.

This library under active development! With all the consequences.

You can found sample app written with flutter framework here.

License #

project under MIT license

Changelogs #

full changelog

  • v0.0.8
    • added BASE64 for imageData in attached pictures
    • .toString() now returns JSON
    • small changes in example
    • fix README formating

Instalation #

add dependency in pubsec.yaml

dependencies:
  dart_tags: ^0.0.8

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)));
}

Features and bugs #

Please file feature requests and bugs at the issue tracker.

0.0.1 #

  • Initial version
  • Supports Id3 v1.1 tags

0.0.2 #

  • Basic support of ID3 v2.4 tags
    • support main frames include APIC
  • TagProcessor now can get tags from file and from ByteData
  • You can select which type of tag do you want to get
  • Small fix in id3 v1 parser

0.0.3 #

  • Removed dependency from [dart:io]
  • Some API changes

0.0.4 #

  • Formating sources

0.0.5 #

  • Update static analyzer rules
  • API Changes: AttachedPicture.imageType now returns String value .imageTypeCode return byte value

0.0.6 #

  • Fixed compile-time issue

0.0.7 #

  • Removed assertion in parser
  • Fixed some crashes.
  • Added clearing from null bytes in id3v2 and unsync bytes
  • UTF16 crash fixed
  • Improve stability

0.0.8 #

  • added BASE64 for imageData in attached pictures
  • small changes in example
  • fix README formating

example/example.dart

import 'dart:io';

import 'package:dart_tags/dart_tags.dart';

void main(List<String> args) {
  if (args.isNotEmpty) {
    args.forEach((s) => _proceedArg(s));
  } else {
    print('args please!');
  }
}

void _proceedArg(String path) {
  final fileType = FileStat.statSync(path).type;
  switch (fileType) {
    case FileSystemEntityType.directory:
      new Directory(path)
          .list(recursive: true, followLinks: false)
          .listen((FileSystemEntity entity) {
        if (entity.statSync().type == FileSystemEntityType.file &&
            entity.path.endsWith('.mp3')) {
          printFileInfo(entity.path);
        }
      });
      break;
    case FileSystemEntityType.file:
      if (path.endsWith('.mp3')) {
        printFileInfo(path);
      }
      break;
    case FileSystemEntityType.notFound:
      print('file not found');
      break;
    default:
      print('sorry dude I don`t know what I must to do with that...\n');
  }
}

void printFileInfo(String fileName) async {
  final file = new File(fileName);
  new TagProcessor().getTagsFromByteArray(file.readAsBytes()).then((l) {
    print('FILE: $fileName');
    l.forEach((f) => print(f));
    print('\n');
  });
}

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  dart_tags: ^0.0.8

2. Install it

You can install packages from the command line:

with pub:


$ pub get

Alternatively, your editor might support pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:dart_tags/dart_tags.dart';
  
Version Uploaded Documentation Archive
0.1.2 May 13, 2019 Go to the documentation of dart_tags 0.1.2 Download dart_tags 0.1.2 archive
0.1.1 Mar 22, 2019 Go to the documentation of dart_tags 0.1.1 Download dart_tags 0.1.1 archive
0.1.0 Mar 20, 2019 Go to the documentation of dart_tags 0.1.0 Download dart_tags 0.1.0 archive
0.0.9 Jul 18, 2018 Go to the documentation of dart_tags 0.0.9 Download dart_tags 0.0.9 archive
0.0.8 May 22, 2018 Go to the documentation of dart_tags 0.0.8 Download dart_tags 0.0.8 archive
0.0.7 May 14, 2018 Go to the documentation of dart_tags 0.0.7 Download dart_tags 0.0.7 archive
0.0.6 May 14, 2018 Go to the documentation of dart_tags 0.0.6 Download dart_tags 0.0.6 archive
0.0.5 May 11, 2018 Go to the documentation of dart_tags 0.0.5 Download dart_tags 0.0.5 archive
0.0.4 May 10, 2018 Go to the documentation of dart_tags 0.0.4 Download dart_tags 0.0.4 archive
0.0.3 May 10, 2018 Go to the documentation of dart_tags 0.0.3 Download dart_tags 0.0.3 archive

All 11 versions...

Popularity:
Describes how popular the package is relative to other packages. [more]
66
Health:
Code health derived from static analysis. [more]
--
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
--
Overall:
Weighted score of the above. [more]
33
Learn more about scoring.

The package version is not analyzed, because it does not support Dart 2. Until this is resolved, the package will receive a health and maintenance score of 0.

Analysis issues and suggestions

Support Dart 2 in pubspec.yaml.

The SDK constraint in pubspec.yaml doesn't allow the Dart 2.0.0 release. For information about upgrading it to be Dart 2 compatible, please see https://dart.dev/dart-2#migration.

Maintenance issues and suggestions

Make sure dartdoc successfully runs on your package's source files. (-10 points)

Dependencies were not resolved.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.20.1 <2.0.0