]> git.rkrishnan.org Git - functorrent.git/commitdiff
Main program
authorRamakrishnan Muthukrishnan <ram@rkrishnan.org>
Tue, 3 Feb 2015 23:26:27 +0000 (04:56 +0530)
committerRamakrishnan Muthukrishnan <ram@rkrishnan.org>
Tue, 3 Feb 2015 23:28:31 +0000 (04:58 +0530)
src/Main.hs

index 4af7af883e9f87d69fd1fd2f100691b2db39eaf8..7ab471258fdb0f70f9d5db6b32da77d5f69ce6c7 100644 (file)
@@ -1,3 +1,12 @@
 module Main where
 
-main = putStrLn "hello"
+import System.Environment (getArgs)
+import qualified Data.ByteString.Char8 as BC
+import qualified Bencode as Benc
+
+main :: IO ()
+main = do
+  args <- getArgs
+  torrentStr <- BC.readFile (head args)
+  let metadata = Benc.decode torrentStr
+  putStrLn "done"