bwu_dart_archive_downloader 0.3.0+6

  • README.md
  • CHANGELOG.md
  • Installing
  • Versions
  • 0

BWU Dart Archive Downloader

Star this Repo Pub Package Build Status Coverage Status

BWU Dart Archive Downloader makes it easy to download files like API docs, Dartium or content-shell, Dartium for Android APK, Dart Eclipse plugin, or the Dart SDK from http://gsdview.appspot.com/dart-archive/channels/
Its main purpose is to make maintenance tasks and automatic setup for continuous integration (CI) as easy as possible.

Activate the command line tool

To activate the command line tool globally use this command:

pub global activate bwu_dart_archive_downloader

Now you can call the command line tool using

pub global run bwu_dart_archive_downloader:darc ...

or if you have added the ~/.pub-cache/bin directory to the PATH environment variable just:

darc

Example 1

Download Dart SDK 1.5.2 from the command line:

darc down -v1.5.2

downloads dartsdk-linux-x64-release.zip to the curent working directory. Linux x64 is derived from my operating system, but can also be specified by a parameter.
If you omit the -v... parameter the latest version is downloaded.

Example 2

Download chromedriver 1.5.2 from the command line:

darc down -adartium -fchromedriver -o_output -v1.5.2 -cstable/release  -e -dxxx -t_extract

This results in two subdirectories in the current working directory

  • _output
  • _extract

_output is the directory where the downloaded file chromedriver-linux-x64-release.zip is stored because of the -o parameter.
_extract is where the content of the ZIP file is extracted to as specified by the -t parameter.
Because we passed -dxxx, the content (chromedriver-lucid64-full-stable-37942.0 from chromedriver-linux-x64-release.zip) was extracted as _extract/xxx which now contains the file chromedriver.
-cstable/release can be omitted because it is the default, but it shows how to select a specific channel.

Example 3

Download a file from latest using the API:

import 'dart:io' as io;
import 'package:bwu_dart_archive_downloader/bwu_dart_archive_downloader.dart';

main() async {
  // create an instance of the downloader and specify the download directory.
  final downloader = new DartArchiveDownloader(new io.Directory('temp'));

  // specify the file to download
  final file = new DartiumFile.contentShellZip(
      Platform.getFromSystemPlatform(prefer64bit: true));

  // build the uri for the download file.
  final uri =
      DownloadChannel.stableRelease.getUri(file);

  // start the download
  await downloader.downloadFile(uri);
}

Example 4

Download a file from a specific release using the API:

final channel = DownloadChannel.stableRelease;
final downloader =
    new DartArchiveDownloader(new io.Directory('temp/install'));
final version =
    await downloader.findVersion(channel, new Version.parse('1.2.0'));
final uri = await channel.getUri(new SdkFile.dartSdk(
    Platform.getFromSystemPlatform(prefer64bit: true)), version: version);
final file = await downloader.downloadFile(uri);

The dart_update library provides functions to extract the downloaded archive.

0.3.0+6

  • fix devRelease constant (copy-paste-error)
  • apply new dartformat and organize imports

0.3.0+5

  • find the directory for a specified version

0.3.0+4

  • add quiver_log dependency

0.3.0+3

  • use Grinder tasks from bwu_grinder_tasks instead of bwu_utils_dev

0.3.0+2

  • change print to log and default log level to info
  • add verbose to print all log output (log level finest).

0.3.0+1

  • fix a bug with default version

0.3.0

  • added a command line tool (darc) to download files

0.2.0+1

  • enable travis
  • add badges to README.md
  • user bwu_utils_dev default Grinder tasks
  • make methods getZipRootDirectory and installArchive of DartUpdate top-level functions

0.2.0

  • download a file from a specific release (incorporating recent changes)

0.1.0

  • initial version

Use this package as an executable

1. Install it

You can install the package from the command line:


$ pub global activate bwu_dart_archive_downloader

2. Use it

The package has the following executables:


$ darc

Use this package as a library

1. Depend on it

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


dependencies:
  bwu_dart_archive_downloader: ^0.3.0+6

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:bwu_dart_archive_downloader/bwu_dart_archive_downloader.dart';
  
Version Uploaded Documentation Archive
0.3.0+6 Aug 10, 2015 Go to the documentation of bwu_dart_archive_downloader 0.3.0+6 Download bwu_dart_archive_downloader 0.3.0+6 archive
0.3.0+4 Jun 15, 2015 Go to the documentation of bwu_dart_archive_downloader 0.3.0+4 Download bwu_dart_archive_downloader 0.3.0+4 archive
0.3.0+3 Jun 15, 2015 Go to the documentation of bwu_dart_archive_downloader 0.3.0+3 Download bwu_dart_archive_downloader 0.3.0+3 archive
0.3.0+2 Jun 8, 2015 Go to the documentation of bwu_dart_archive_downloader 0.3.0+2 Download bwu_dart_archive_downloader 0.3.0+2 archive
0.3.0+1 Jun 8, 2015 Go to the documentation of bwu_dart_archive_downloader 0.3.0+1 Download bwu_dart_archive_downloader 0.3.0+1 archive
0.3.0 Jun 8, 2015 Go to the documentation of bwu_dart_archive_downloader 0.3.0 Download bwu_dart_archive_downloader 0.3.0 archive
0.2.0+1 Jun 5, 2015 Go to the documentation of bwu_dart_archive_downloader 0.2.0+1 Download bwu_dart_archive_downloader 0.2.0+1 archive
0.2.0 Jun 2, 2015 Go to the documentation of bwu_dart_archive_downloader 0.2.0 Download bwu_dart_archive_downloader 0.2.0 archive
0.1.0+1 May 30, 2015 Go to the documentation of bwu_dart_archive_downloader 0.1.0+1 Download bwu_dart_archive_downloader 0.1.0+1 archive
0.1.0 May 30, 2015 Go to the documentation of bwu_dart_archive_downloader 0.1.0 Download bwu_dart_archive_downloader 0.1.0 archive

All 23 versions...

Popularity:
Describes how popular the package is relative to other packages. [more]
0
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]
0
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://www.dartlang.org/dart-2#migration.

Maintenance issues and suggestions

Running dartdoc failed. (-10 points)

Make sure dartdoc runs without any issues.

Dependencies

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