Skip to content

preciz/parse_torrent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ParseTorrent

Travis

ParseTorrent parses a .torrent file and returns a map

Installation

Add parse_torrent to your list of dependencies in mix.exs:

def deps do
  [
    {:parse_torrent, "~> 0.3"}
  ]
end

Usage

parse/1 will return a 2-tuple with :ok or return :error if torrent is invalid.

data = File.read!("mypath/myfile.torrent")
ParseTorrent.parse(data)

parse!/1 will return a map or raise if torrent is invalid.

ParseTorrent.parse!(data)

Credit

Based on parse-torrent-file by feross.

License

ParseTorrent is MIT licensed.

About

ParseTorrent is a .torrent parser written in Elixir

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages