PND(      !"#$%&'(c) 2014 Patrick BahrBSD3Patrick Bahr <paba@di.ku.dk> experimentalnon-portable (GHC Extensions)None2 2Alternative type representing queries for use in .%Type representing queries for use in .rThis function performs a query by performing an HTTP GET request at the url obtained by concatenating the first argument with the second one (after escaping it). The returned query takes a string as an argument and appends it to the base url to obtain the url that is used for the query. The result is then parsed as a JSON object. For example, for a Google search: R runQuery :: Query (Text,[Text]) runQuery = jsonQuery suggestURL suggestURL = " 4http://google.com/complete/search?client=firefox&q=" This function is a variant of U that takes a function as an additional argument that is used to transform the raw ( that is returned by the query. This can be helpful if the source does not provide valid UTF-8 formatted JSON. For example, for a Google search: o runQuery :: Query (Text,[Text]) runQuery = jsonQuery' (encodeUtf8 . decodeLatin1) suggestURL suggestURL = " 4http://google.com/complete/search?client=firefox&q=" )/Constructions a request for doing an XML query.rThis function performs a query by performing an HTTP GET request at the url obtained by concatenating the first argument with the second one (after escaping it). The returned query takes a string as an argument and appends it to the base url to obtain the url that is used for the query. The result is then parsed as an XML document. For example, for a DBLP search: ]runQuery :: Query (Node Text Text) runQuery query = xmlQuery suggestURL query suggestURL = " 0http://dblp.uni-trier.de/search/author?xauthor=" Lazy variant of l. This function may be useful if results tend to be lengthy and only a small prefix of the result is used.*&Generic function to construct queries.+/Constructions a request for doing a JSON query.Functorial map for .$Escapes the string for use in a URL."Escapes the text for use in a URL. )*+   )*+(c) 2014 Patrick BahrBSD3Patrick Bahr <paba@di.ku.dk> experimentalnon-portable (GHC Extensions)None DThis data type represents advanced standard search scripts used by '.;This data type represents standard search scripts used by &.4This type represents rendering functions as used by $.4This type represents rendering functions as used by %.Represents icons of an item.,A list of items._This type represents items that should be rendered by Alfred as the result of a script filter.# Default item.-Render an icon as XML element..Render an item as XML element./Render items as an XML element.0Render items as an XML 1.2Print items as XML to stdout.$This function runs a script consisting of a query function and a rendering function. The query function takes string parameters and produces an output that is then passed to the rendering function to produce items that are then passed to Alfred.3Normalise strange umlauts.%This function runs a script consisting of a query function and a rendering function. The query function takes string parameters and produces an output that is then passed to the rendering function to produce items that are then passed to Alfred.&This function produces a rendering function for standard search scripts. For example a Google search rendering function is defined as follows: h mkItems :: Renderer [Text] mkItems = searchRenderer Search { searchURL = s -> T.concat [" !https://www.google.com/search?q=", s], notFound = s -> T.concat ["No suggestion. Google for ", s, "."], found = s -> T.concat ["Search results for ", s]} 'lThis function produces a rendering function for standard search scripts. As opposed to the simpler variant &|, this function works on arbitrary query result types. For example a DBLP search rendering function is defined as follows:  mkItems :: Renderer [(Text, Text)] mkItems = searchRenderer' Search'{ simpleSearch = Search { searchURL = s -> T.concat [" /http://dblp.uni-trier.de/search/author?author=", s], notFound = s -> T.concat ["No suggestion. Search DBLP for ", s, "."], found = (s,_) -> T.concat ["Open bibliography of ", s]}, resultURL = (_,r) -> T.concat [" -http://dblp.uni-trier.de/pers/hd/",r,".html"]", resultTitle = fst} .In the above example the query result type is  (Text,Text) where the first component is the name of the result and the second component is used to construct a URL that leads directly to the search result.& , !"#-./02$query functionrendering function3%query functionrendering function&'  !"#$%&' !"#%$&'   ,  !"#-./02$3%&'4      !"#$%&'()*+,-./012(3*456 alfred-0.5 Alfred.QueryAlfred runScript' runScriptQuery'Query jsonQuery jsonQuery'xmlQuery xmlQueryLazytransformQuery escapeString escapeTextSearch' simpleSearch resultURL resultTitleSearch searchURLnotFoundfound Renderer'RendererIconIconFileFileTypeFileIconItemuidargisFilevalid autocompletetitlesubtitleiconitemsearchRenderersearchRenderer'bytestring-0.10.4.0Data.ByteString.Lazy.Internal ByteString mkJSONRequest genericQuery mkXMLRequestItemsxmlIconxmlItemxmlItems renderItemsData.ByteString.Internal printItemsumlaut