GithubHelp home page GithubHelp logo

torrent's Introduction

torrent

NPM

Download torrents from the command line

usage

torrent <magnet link OR path to .torrent file>

  Download a torrent from a magnet link to torrent file.

torrent create <directory OR file> {-o outfile.torrent}

  Create a torrent file from a directory or file.

  If an output file isn't specified with `-o`, the torrent file will be
  written to stdout.

torrent seed <torrent file>

  Seed a torrent file.

torrent info <torrent file>

  Print information about a .torrent file to stdout as JSON.

torrent ls OPTIONS <torrent file>

  List all the files in a .torrent file.

  OPTIONS are like the `ls` command:

    -s  Show file sizes in bytes alongside file paths.
    -h  Show file sizes in human units when `-s` is on.

download a torrent

e.g. to download ubuntu 14.04 ISO

torrent "magnet:?xt=urn:btih:4d753474429d817b80ff9e0c441ca660ec5d2450&dn=Ubuntu+14.04+64+bit&tr=udp%3A%2F%2Ftracker.openbittorrent.com%3A80&tr=udp%3A%2F%2Ftracker.publicbt.com%3A80&tr=udp%3A%2F%2Ftracker.istole.it%3A6969&tr=udp%3A%2F%2Fopen.demonii.com%3A1337"

or via .torrent file:

torrent ubuntu-14.04.iso.torrent

it will print progress:

$ torrent ubuntu-14.04.iso.torrent
1 file(s) in torrent
ubuntu-14.04.iso
Connected to 35/37 peers
Downloaded 5.47 MB (1.09 MB/s) with 0 hotswaps
Uploaded 0 B (0 B/s)

create a torrent

You can create a torrent file with torrent create:

mkdir xyz; echo beep > xyz/a.txt; echo boop > xyz/b.txt
torrent create xyz/ -o xyz.torrent

torrent's People

Contributors

amilajack avatar artskydj avatar feross avatar linusu avatar mafintosh avatar max-mapper avatar mikaelbr avatar sindresorhus avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

torrent's Issues

Downloading specific files from a torrent

Hey,

it would be cool if you could somehow select specific files to download from a torrent.

Like e.g. this archive.org torrent includes several encoding versions in one torrent, but I would like to download just one of them: https://archive.org/download/Time-lapseAstronautPhotographyOfEarthfebruary32012/Time-lapseAstronautPhotographyOfEarthfebruary32012_archive.torrent

Not yeat sure show torrent files work, but maybe it would also be possible to create a module for creating new torrent with only the desired file(s) in it:

torrent-select abc.mpeg < input.torrent > output.torrent

Best,
Finn

I have this error

Connected to 6/7 peers
Downloaded 432.73 kB (133.15 kB/s)
Uploaded 0 B (0 B/s)
Torrent Size 399.96 kB

Complete: 100%
[=====================]
0%    25   50   75   100%

Estimated  remaining
/usr/local/lib/node_modules/torrent/cli.js:186
        progressBar = progressBar + Array(20 + 1 - progressBar.length).join(' ')
                                    ^

RangeError: Invalid array length
    at status [as _repeat] (/usr/local/lib/node_modules/torrent/cli.js:186:37)
    at wrapper [as _onTimeout] (timers.js:264:19)
    at Timer.listOnTimeout (timers.js:92:15)

subcommands ls, info, seed do not support magnet links

According to torrent --help:

Commands:

torrent            <torrent>
torrent seed       <torrent>
torrent info       <torrent>
torrent ls         <torrent>
torrent create     <directory OR file> {-o outfile.torrent}

`<torrent>` above can be a magnet link, a path to .torrent file or `-` for STDIN

However, supplying a magnet link for seed, info, or ls produces errors.

Ctrl+C doesn't stop the process. Its only killed by Ctrl+D

There is no method to stop the download process in the middle except by using Ctrl+D, Ctrl+C somehow fails to stop the process. On pressing Ctrl+C, The terminal returns to

$

and quickly jumps back to something like

Connected to 1/44 peers
Connected to 1/47 peers

and continues the download

Mac OS X Mavericks

Improve UI

Currently it's a bit cluttered, especially if a torrent has more than a few files.

I think the default UI should be simple and focused, with flags to add verbose info. (maybe a keyboard shortcut to toggle this interactively?)

Showing a progressbar, speed and estimated time left is all I really care about.

Would also be nice to have some colors to better differentiate the various information.

NPM module is empty

Install through npm give empty folder with only node_modules folder, bump it :)

herkou

will you please explain how to deploy it to heroku

Error: not part of int at:6

Very often, in the middle of a torrent download, I get:

/Users/nathanh/.npm-packages/lib/node_modules/torrent/node_modules/bncode/bncode.js:222
            throw new Error('not part of int at:'+pos.toString(16))
                  ^
Error: not part of int at:6
    at BdecodeSMachine.parse (/Users/nathanh/.npm-packages/lib/node_modules/torrent/node_modules/bncode/bncode.js:222:19)
    at Bdecode.decode (/Users/nathanh/.npm-packages/lib/node_modules/torrent/node_modules/bncode/bncode.js:322:14)
    at Object.decode (/Users/nathanh/.npm-packages/lib/node_modules/torrent/node_modules/bncode/bncode.js:444:11)
    at null.<anonymous> (/Users/nathanh/.npm-packages/lib/node_modules/torrent/node_modules/torrent-stream/lib/exchange-metadata.js:22:23)
    at g (events.js:199:16)
    at emit (events.js:110:17)
    at Wire._onextended (/Users/nathanh/.npm-packages/lib/node_modules/torrent/node_modules/peer-wire-protocol/index.js:306:7)
    at onmessage (/Users/nathanh/.npm-packages/lib/node_modules/torrent/node_modules/peer-wire-protocol/index.js:112:16)
    at Wire._write (/Users/nathanh/.npm-packages/lib/node_modules/torrent/node_modules/peer-wire-protocol/index.js:355:8)
    at doWrite (_stream_writable.js:301:12)
    at writeOrBuffer (_stream_writable.js:288:5)

Progressbar

Would be nice with a progressbar to visually see the progress.

DeprecationWarning error

I was doing the NodeSchool's tutorial "torrential", which uses this library, but a DeprecationWarning error occurred when I was creating a torrent file of a folder of two .txt documents.

I retried multiple times. I am on Windows10 with Node.js v8.9.1.

Here is a screenshot of the error:

deprecationwarning error

Notification

Hi there!

I wonder if there is a way to make any notification on torrent finishing the download, or maybe an option to quit program after download is complete.

Thank you in advance!

Tests

My plan is to write some tests with mocha and create-torrent

Doesn't work

I don't know why from command line this command doesn't work.
It's sample.
require("torrent");
torret ciccia.torrent

It doesn't work.
This is the error :
SyntaxError: Unexpected identifier
at Object.exports.createScript (vm.js:24:10)
at REPLServer.defaultEval (repl.js:221:25)
at bound (domain.js:280:14)
at REPLServer.runBound as eval
at REPLServer. (repl.js:412:12)
at emitOne (events.js:82:20)
at REPLServer.emit (events.js:169:7)
at REPLServer.Interface._onLine (readline.js:210:10)
at REPLServer.Interface._line (readline.js:549:8)
at REPLServer.Interface._ttyWrite (readline.js:826:14)

If you have more examples of this module , please post it.
Thanks

Amount Downloaded from Each Peer

Hi @maxogden, I really liked using this module. I would like to know if there is a way to list the amount of file downloaded from each peer, using this module.

So far. I did not find anything in the README itself.

Or, is it something the bittorrent tracker server or dht would provide?

Internet connection

torrent downloaded while disconnected from the Internet after downloading again does not continue, the output stays in the same way

Resources usage

When downloading a file, torrent can use up to 300MB of RAM and 16% of CPU.
Is this behavior expected?

Estimated time left

Not sure how this is usually calculated in other torrent apps, but I find it quite handy.

Hotwap?

No idea what that is. Would be nice if the docs explained what it means.

Resume torrent

It would be great if it had the ability resume interrupted torrents.

how to send torrents

I'm not too familiar with torrents, but I see that you can create a torrent with this program... How can I send this file to someone else? is that possible through this program?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.