sloane 1.3 → 1.4
raw patch · 3 files changed
+6/−5 lines, 3 files
Files
- README.md +1/−1
- sloane.cabal +1/−1
- sloane.hs +4/−3
README.md view
@@ -1,5 +1,5 @@ ----title: SLOANE(1) Sloane User Manual | Version 1.3+title: SLOANE(1) Sloane User Manual | Version 1.4 date: March 9, 2014 ---
sloane.cabal view
@@ -1,5 +1,5 @@ Name: sloane-Version: 1.3+Version: 1.4 Synopsis: A command line interface to Sloane's On-Line Encyclopedia of Integer Sequences Description: A command line interface to Sloane's On-Line Encyclopedia of Integer Sequences. For usage see <http://github.com/akc/sloane>.
sloane.hs view
@@ -39,7 +39,7 @@ , limit = 5 &= name "n" &= help "Retrieve at most this many entries (default: 5)" , terms = def &= argPos 0 &= typ "SEARCH-TERMS" }- &= versionArg [summary "sloane 1.3"]+ &= versionArg [summary "sloane 1.4"] &= summary "Search Sloane's On-Line Encyclopedia of Integer Sequences" select :: Keys -> OEISEntries -> OEISEntries@@ -92,7 +92,6 @@ main = do args <- cmdArgsRun sloane- ncols <- getWidth let pick = if all args then id else select (keys args) let query = filter (`notElem` "[{}]") $ terms args hits <- searchOEIS (limit args) query@@ -100,5 +99,7 @@ newline if url args then put (urls hits)- else putEntries (ncols - 10) (pick hits)+ else do+ ncols <- getWidth+ putEntries (ncols - 10) (pick hits) newline