bwu_dart_archive_downloader 0.3.0+6

  • README.md
  • CHANGELOG.md
  • Installing
  • Versions
  • 25

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

with Flutter:


$ flutter packages get

Alternatively, your editor might support pub get or flutter packages 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...

Analysis

We analyzed this package on Jun 19, 2018, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.0.0-dev.63.0
  • pana: 0.11.3

Scores

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

Platforms

Detected platforms: Flutter, other

Primary library: package:bwu_dart_archive_downloader/bwu_dart_archive_downloader.dart with components: io.

Suggestions

  • Package is too old.

    The package was released more than two years ago.

  • Fix analysis and formatting issues.

    Analysis or formatting checks reported 3 errors 12 hints.

    Strong-mode analysis of lib/src/cli.dart failed with the following error:

    line: 10 col: 8
    Target of URI doesn't exist: 'package:stack_trace/stack_trace.dart'.

    Strong-mode analysis of lib/src/dart_update.dart failed with the following error:

    line: 96 col: 51
    The argument type 'List' can't be assigned to the parameter type 'Iterable<Future<File>>'.

    Similar analysis of the following files failed:

    • lib/src/dart_archive_downloader.dart (hint)
  • Package is pre-v1 release.

    While there is nothing inherently wrong with versions of 0.*.*, it usually means that the author is still experimenting with the general direction API.

  • Maintain an example.

    None of the files in your example/ directory matches a known example patterns. Common file name patterns include: main.dart, example.dart or you could also use bwu_dart_archive_downloader.dart.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.10.0 <2.0.0
archive ^1.0.19 1.0.33 2.0.0
http ^0.11.2 0.11.3+16
path >=1.0.0 <2.0.0 1.6.1
pub_semver ^1.2.1 1.4.1
quiver_log >=1.0.3 <2.0.0 1.0.5
unscripted ^0.6.1+1 0.6.2
Transitive dependencies
ansicolor 0.0.9 0.1.0
args 0.13.7 1.4.3
async 2.0.7
charcode 1.1.1
collection 1.14.10
convert 2.0.1
crypto 2.0.5
http_parser 3.1.2
intl 0.15.6
logging 0.11.3+1
mockable_filesystem 0.0.3
source_span 1.4.0
string_scanner 1.0.2
supports_color 0.1.1
typed_data 1.1.5
Dev dependencies
bwu_grinder_tasks ^0.1.0
bwu_utils ^0.1.0-dev.2
grinder ^0.7.1+3
test ^0.12.2