Git Product home page Git Product logo

mktorrent's Introduction

mktorrent

A Ruby Gem for easily creating .torrent files.

To get started:

git clone https://github.com/mukaibot/mktorrent.git
gem build mktorrent.gemspec
gem install mktorrent

Then in your Ruby code:

require 'mktorrent'
t = Torrent.new("http://your.tracker.com")
t.add_file("path/to/your.file")
t.add_file("path/to/another.file")
t.add_tracker("udp://your.secondtracker.tk:80") # Optional
t.add_tracker("http://third.tracker.com:6500/announce") # Optional
t.add_directory("path/to/directory")
t.add_webseed("http://your.webseed.com") # Optional!
t.defaultdir = "Your Torrent"
t.write_torrent("Yourtorrent.torrent")

Development

Pull requests are very welcome!

Running unit tests

The unit tests just use minitest

bundle exec rake test

Running the acceptance tests

The acceptance tests run the command from the contents of

test/acceptance_test_command

On a torrent created from sample data. The string <TORRENT_FILE> will be replaced with the path to the created torrent. If the command exits with 0 the torrent is deemed to be valid.

A sample file could look like this:

/usr/local/Cellar/torrentcheck/1.00/bin/torrentcheck -t <TORRENT_FILE>

mktorrent's People

Contributors

avantheim avatar gerep avatar mauriciopasquier avatar mukaibot avatar sovietaced avatar

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.