Napolean Paced Mischeviously

    aria2c-test-1

    1.0.5 • Public • Published

    aria2c

    This is an unofficial npm package containing the unmodified versions of the linux, darwin and win32 binaries of aria2c, obtained from here.

    All the licenses and credits belong to the original authors of the tool.

    Usage:

    The package has been specifically published because most of the other downloading libraries and solutions failed for a particular use case. While it's not recommended to use this if you've other options to download files in Node.js, you can use it like this if you absoutely have to:

    const Exec = require('child_process').execFile
    
    let execPath = './node_modules/aria2c-unofficial/'
    
    switch (process.platform) {
      case 'win32':
        execPath += 'aria2c-win32.exe'
        break
      case 'darwin':
        execPath += 'aria2c-darwin'
      default:
        execPath += 'aria2c-linux'
        break
    }
    
    const downloader = Exec(execPath, ['-i', './files.txt', '--auto-file-renaming=false'])
    
    downloader.stdout.on('data', data => {
      console.log(data)
    })

    In the above example, a files.txt file is generated before the above snippet. For more information on the file structure and other possible options, refer to the official documentation of aria2c.

    Note: The package only consists of the 64-bit version of the Windows binary.

    Keywords

    none

    Install

    npm i aria2c-test-1

    DownloadsWeekly Downloads

    10

    Version

    1.0.5

    License

    none

    Unpacked Size

    15.2 MB

    Total Files

    5

    Last publish

    Collaborators

    • hrishikeshk