module Main where import Text.Html.Consolidate import System.Console.CmdArgs.Explicit import System.IO import Network.URI import Network.Browser import Network.Browser.Simple -- | The entry point to the `jespresso` program. Can be run in two -- modes: -- * extraction; `jespresso [-e] []`. Takes text (HTML) via stdin -- and outputs all the JavaScript in it (including externally -- referenced) via stdout. If an (optional) url is supplied, the HTML -- is downloaded from that URL instead of reading it from the stdin. -- * normalization: `jespresso -n []`. Transforms the HTML and -- JavaScript into an equivalent one so that all the JavaScript is -- inlined and in a single