From: Ramakrishnan Muthukrishnan Date: Sun, 19 Jul 2015 09:58:44 +0000 (+0530) Subject: update REAME. X-Git-Url: https://git.rkrishnan.org/vdrive/%22file:/%22news.html/flags/%3C?a=commitdiff_plain;h=6c06e4dfd912a1371fb55ddfbba84140c4949b0c;p=functorrent.git update REAME. Builds with stack. It is a lot less hasstle now. --- diff --git a/README.md b/README.md index 6100197..0017f5a 100644 --- a/README.md +++ b/README.md @@ -6,19 +6,18 @@ ## Building -Functorrent can be build with [Cabal](https://www.haskell.org/cabal/) sandbox or +Functorrent can be build with [Stack](https://github.com/commercialhaskell/stack) or [Nix](https://nixos.org/nix/). -### Cabal sandbox +### Stack Sandboxes give you per project independent containers, just like Python's virtualenv. $ git clone https://github.com/vu3rdd/functorrent && cd functorrent - $ cabal sandbox init - $ cabal install --only-dependencies --enable-tests - $ cabal build # binaries in ./dist/built/functorrent/* + $ cabal install stack # or install stack by other means + $ stack build # binaries in $(pwd)/.stack-work/install/x86..../lts-2.16/7.8.4/bin/functorrent ### Building with Nix @@ -30,6 +29,19 @@ shell which has all the package dependencies installed. [...] [nix-shell] $ cabal configure && cabal build +### Usage + +If you invoke functorrent without any options, it expects the contents of a torrent file +to be given in stdin. So + +$ cat ubuntu-14.10-desktop-amd64.iso.torrent | functorrent +[....] + +Or one can explicitly specify the torrent file as input. + +$ functorrent ubuntu-14.10-desktop-amd64.iso.torrent +[...] + ## Goals - [Optimized for Fun](http://www.slideshare.net/autang/ofun-optimizing-for-fun). @@ -38,7 +50,7 @@ shell which has all the package dependencies installed. - Implement something non-trivial with Haskell (crypto, file operations, network operations, concurrency, bit twiddling, DHT). - Follow the spec ([official spec](http://bittorrent.org/beps/bep_0003.html), [unofficial spec](https://wiki.theory.org/BitTorrentSpecification)) -- Easy for newbies like me to read and understand along side the spec. +- Easy for newbies like me to read and understand alongside the spec. - doctest and quickcheck tests. - Follow Haskell Style Guide - https://github.com/tibbe/haskell-style-guide/blob/master/haskell-style.md