|
@@ -4,25 +4,22 @@
|
|
|
|
|
|
|
|
SingleFile can be launched from the command line by running it into a (headless) browser. It runs through Node.js as a standalone script injected into the web page instead of being embedded into a WebExtension. To connect to the browser, it can use [Puppeteer](https://github.com/GoogleChrome/puppeteer) or [Selenium WebDriver](https://www.npmjs.com/package/selenium-webdriver). Alternatively, it can also emulate a browser with JavaScript disabled by using [jsdom](https://github.com/jsdom/jsdom).
|
|
SingleFile can be launched from the command line by running it into a (headless) browser. It runs through Node.js as a standalone script injected into the web page instead of being embedded into a WebExtension. To connect to the browser, it can use [Puppeteer](https://github.com/GoogleChrome/puppeteer) or [Selenium WebDriver](https://www.npmjs.com/package/selenium-webdriver). Alternatively, it can also emulate a browser with JavaScript disabled by using [jsdom](https://github.com/jsdom/jsdom).
|
|
|
|
|
|
|
|
|
|
+You can also convert MAFF pages to HTML. For this, you must use specific versions of SingleFile CLI and Firefox. See here for more info: https://github.com/gildas-lormeau/SingleFile/blob/master/maff2html/README.MD.
|
|
|
|
|
+
|
|
|
This is a **work in progress**.
|
|
This is a **work in progress**.
|
|
|
|
|
|
|
|
## Run SingleFile
|
|
## Run SingleFile
|
|
|
|
|
|
|
|
-### Prerequisites
|
|
|
|
|
|
|
+### Install
|
|
|
|
|
|
|
|
-- [Node.js](https://nodejs.org) must be installed.
|
|
|
|
|
-- By default SingleFile will use Puppeteer to connect to [Chrome/Chromium](https://www.google.com/chrome/). With Puppeteer, Chrome/Chromium must also be installed.
|
|
|
|
|
-- With Selenium WebDriver, you can use [Firefox](https://www.mozilla.org/en/firefox/new/) or Chrome/Chromium. At least one of them must be installed.
|
|
|
|
|
-- If you use [Selenium WebDriver](https://www.npmjs.com/package/selenium-webdriver) instead of Puppeteer, you only need to download the component (e.g. `geckodriver` or `chromedriver`) for your browser and ensure it can be found through the `PATH` environment variable or the `cli` folder. Otherwise you will need to set the `--web-driver-executable-path` option to help SingleFile locating the binary file.
|
|
|
|
|
-- It is recommended that the browser binaries can be found through the `PATH` environment variable or the `cli` folder. Otherwise you will need to set the `--browser-executable-path` option to help SingleFile locating the binary file.
|
|
|
|
|
- - You can also convert MAFF pages to HTML. For this, you must use specific versions of SingleFile CLI and Firefox. See here for more info: https://github.com/gildas-lormeau/SingleFile/blob/master/maff2html/README.MD.
|
|
|
|
|
|
|
+- Make sure Chrome or Firefox is installed and the executable can be found through the `PATH` environment variable. Otherwise you will need to set the `--browser-executable-path` option to help SingleFile locating it.
|
|
|
|
|
|
|
|
-### Install
|
|
|
|
|
|
|
+- Install [Node.js](https://nodejs.org)
|
|
|
|
|
|
|
|
- Unzip the [master archive](https://github.com/gildas-lormeau/SingleFile/archive/master.zip) somewhere on your disk in an empty folder.
|
|
- Unzip the [master archive](https://github.com/gildas-lormeau/SingleFile/archive/master.zip) somewhere on your disk in an empty folder.
|
|
|
|
|
|
|
|
`$ unzip master.zip .`
|
|
`$ unzip master.zip .`
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
- Go into the `cli` directory.
|
|
- Go into the `cli` directory.
|
|
|
|
|
|
|
|
`$ cd cli`
|
|
`$ cd cli`
|
|
@@ -35,6 +32,8 @@ This is a **work in progress**.
|
|
|
|
|
|
|
|
`$ chmod +x single-file`
|
|
`$ chmod +x single-file`
|
|
|
|
|
|
|
|
|
|
+- To use Firefox instead of Chrome, you must download the [Selenium WebDriver](https://www.npmjs.com/package/selenium-webdriver) component (i.e. `geckodriver` for Firefox). Make sure it can be found through the `PATH` environment variable or the `cli` folder. Otherwise you will need to set the `--web-driver-executable-path` option to help SingleFile locating the executable.
|
|
|
|
|
+
|
|
|
### Run
|
|
### Run
|
|
|
|
|
|
|
|
- Syntax
|
|
- Syntax
|