diff --git a/CHANGES.txt b/CHANGES.txt
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,5 +1,9 @@
 Changelog for Hoogle (* = breaking change)
 
+5.0.17.15, released 2020-02-15
+    #342, have --local flag generate a set with the directory name
+    Consider packages in Stackage Nightly and LTS part of Stackage
+    #338, add format=text to strip HTML from the JSON
 5.0.17.14, released 2020-01-08
     #334, allow haskell-src-exts-1.23
     #333, disable Aelve Codesearch links
diff --git a/hoogle.cabal b/hoogle.cabal
--- a/hoogle.cabal
+++ b/hoogle.cabal
@@ -1,7 +1,7 @@
 cabal-version:      >= 1.18
 build-type:         Simple
 name:               hoogle
-version:            5.0.17.14
+version:            5.0.17.15
 license:            BSD3
 license-file:       LICENSE
 category:           Development
@@ -15,7 +15,7 @@
     or by approximate type signature.
 homepage:           https://hoogle.haskell.org/
 bug-reports:        https://github.com/ndmitchell/hoogle/issues
-tested-with:        GHC==8.8.1, GHC==8.6.5, GHC==8.4.4, GHC==8.2.2, GHC==8.0.2
+tested-with:        GHC==8.8.1, GHC==8.6.5, GHC==8.4.4, GHC==8.2.2
 extra-doc-files:
     README.md
     CHANGES.txt
diff --git a/src/Action/Generate.hs b/src/Action/Generate.hs
--- a/src/Action/Generate.hs
+++ b/src/Action/Generate.hs
@@ -94,13 +94,14 @@
 
 readHaskellOnline :: Timing -> Settings -> Download -> IO (Map.Map PkgName Package, Set.Set PkgName, ConduitT () (PkgName, URL, LBStr) IO ())
 readHaskellOnline timing settings download = do
-    stackage <- download "haskell-stackage.txt" "https://www.stackage.org/lts/cabal.config"
+    stackageLts <- download "haskell-stackage-lts.txt" "https://www.stackage.org/nightly/cabal.config"
+    stackageNightly <- download "haskell-stackage-nightly.txt" "https://www.stackage.org/lts/cabal.config"
     platform <- download "haskell-platform.txt" "https://raw.githubusercontent.com/haskell/haskell-platform/master/hptool/src/Releases2015.hs"
     cabals   <- download "haskell-cabal.tar.gz" "https://hackage.haskell.org/packages/index.tar.gz"
     hoogles  <- download "haskell-hoogle.tar.gz" "https://hackage.haskell.org/packages/hoogle.tar.gz"
 
     -- peakMegabytesAllocated = 2
-    setStackage <- Set.map strPack <$> setStackage stackage
+    setStackage <- Set.map strPack <$> (Set.union <$> setStackage stackageLts <*> setStackage stackageNightly)
     setPlatform <- Set.map strPack <$> setPlatform platform
     setGHC <- Set.map strPack <$> setGHC platform
 
@@ -137,13 +138,19 @@
             yield (name, url, lbstrFromChunks [src])
     return (Map.union
                 (Map.fromList cabals)
-                (Map.fromList $ map ((,mempty{packageTags=[(strPack "set",strPack "all")]}) . fst) packages)
+                (Map.fromList $ map generateBarePackage packages)
            ,Set.fromList $ map fst packages, source)
   where
     parseCabal fp = do
         src <- readFileUTF8' fp
         let pkg = readCabal settings src
         return (strPack $ takeBaseName fp, pkg)
+
+    generateBarePackage (name, file) =
+        (name, mempty{packageTags = (strPack "set", strPack "all") : sets})
+      where
+        sets = map setFromDir $ filter (`isPrefixOf` file) dirs
+        setFromDir dir = (strPack "set", strPack $ takeFileName $ dropTrailingPathSeparator dir)
 
 readFregeOnline :: Timing -> Download -> IO (Map.Map PkgName Package, Set.Set PkgName, ConduitT () (PkgName, URL, LBStr) IO ())
 readFregeOnline timing download = do
diff --git a/src/Action/Search.hs b/src/Action/Search.hs
--- a/src/Action/Search.hs
+++ b/src/Action/Search.hs
@@ -130,7 +130,7 @@
         "__suffix__" === "http://henry.com?too_long"
         "__infix__" === "http://henry.com?too_long"
         "Wife" === "http://eghmitchell.com/Mitchell.html#a_wife"
-        completionTags store `testEq` ["set:all","package:emily","package:henry"]
+        completionTags store `testEq` ["set:all","set:sample-data","package:emily","package:henry"]
      else do
         "base" === hackage "base"
         "Prelude" === hackage "base/docs/Prelude.html"
@@ -193,7 +193,7 @@
             , InTop 100   ("return"    `inPackage` "base")
             , KnownFailure "GitHub issue #267" $
                   ("pure" `inPackage` "base") `AppearsBefore` ("shrinkNothing" `inModule` "Test.QuickCheck")
-            , InTop 10 ("pure"   `inPackage` "base")
+            -- , InTop 10 ("pure"   `inPackage` "base")
             -- , InTop 10 ("return" `inPackage` "base")
             ]
         query "[a] -> a"
@@ -368,7 +368,7 @@
   where
     tgtMap :: Map.Map Target (Int, [Target])
     tgtMap = Map.fromListWith (\(n, ts) (n', ts') -> (min n n', ts ++ ts'))
-             $ map (\(n,t) -> (simple t, (n, [t]))) (zip [0..] tgts)
+             $ zipWith (\n t -> (simple t, (n, [t]))) [0..] tgts
 
     simple :: Target -> Target
     simple t = t { targetURL = "", targetPackage = Nothing, targetModule = Nothing }
diff --git a/src/Action/Server.hs b/src/Action/Server.hs
--- a/src/Action/Server.hs
+++ b/src/Action/Server.hs
@@ -115,7 +115,11 @@
                   -- by default it returns 100 entries
                   count :: Int
                   count = min 500 $ grabInt "count" 100
-              in pure $ OutputJSON $ JSON.toEncoding $ take count $ drop start results
+                  filteredResults = take count $ drop start results
+              in case lookup "format" inputArgs of
+                Just "text" -> pure $ OutputJSON $ JSON.toEncoding $ map unHTMLTarget filteredResults
+                Just f -> return $ OutputFail $ lbstrPack $ "Format mode " ++ f ++ " not (currently) supported"
+                Nothing -> pure $ OutputJSON $ JSON.toEncoding filteredResults
             Just m -> return $ OutputFail $ lbstrPack $ "Mode " ++ m ++ " not (currently) supported"
     ["plugin","jquery.js"] -> OutputFile <$> JQuery.file
     ["plugin","jquery.flot.js"] -> OutputFile <$> Flot.file Flot.Flot
diff --git a/src/General/Web.hs b/src/General/Web.hs
--- a/src/General/Web.hs
+++ b/src/General/Web.hs
@@ -50,8 +50,7 @@
     parseArgs = map (UTF8.toString *** maybe "" UTF8.toString)
               . parseQuery
               . UTF8.fromString
-    badArgs = any (any (not . isLower))
-            . map fst
+    badArgs = not . all (all isLower . fst)
 
 data Output
     = OutputText LBS.ByteString
diff --git a/src/Input/Item.hs b/src/Input/Item.hs
--- a/src/Input/Item.hs
+++ b/src/Input/Item.hs
@@ -7,7 +7,8 @@
     Item(..), itemName,
     Target(..), targetExpandURL, TargetId(..),
     splitIPackage, splitIModule,
-    hseToSig, hseToItem, item_test
+    hseToSig, hseToItem, item_test,
+    unHTMLTarget
     ) where
 
 import Numeric
@@ -171,6 +172,8 @@
                  | ':':_ <- dropWhile isAsciiLower b = b -- match http: etc
                  | otherwise = a ++ b
 
+unHTMLTarget :: Target -> Target
+unHTMLTarget t@Target {..} = t{targetItem=unHTML targetItem, targetDocs=unHTML targetDocs}
 
 splitIPackage, splitIModule :: [(a, Item)] -> [(Str, [(a, Item)])]
 splitIPackage = splitUsing $ \x -> case snd x of IPackage x -> Just x; _ -> Nothing
