Explorar o código

Merge branch 'master' of https://github.com/gildas-lormeau/SingleFile

Gildas %!s(int64=7) %!d(string=hai) anos
pai
achega
6702eca528
Modificáronse 4 ficheiros con 14 adicións e 9 borrados
  1. 1 1
      README.MD
  2. 2 2
      cli/README.MD
  3. 1 2
      cli/package.json
  4. 10 4
      maff2html/README.MD

+ 1 - 1
README.MD

@@ -61,7 +61,7 @@ See https://addons.mozilla.org/en-US/firefox/addon/single-file/statistics/?last=
   - For security reasons, you cannot save pages hosted on https://chrome.google.com or https://addons.mozilla.org.
   - The last saved path cannot be remembered by default. To circumvent this limitation, disable the option "Misc > Save pages in background".
   - The following characters are replaced with _ in filenames: ~, \\, ?, %, *, :, |, ", <, >
-  - If the filename of a saved page looks like "56833935-156b-4d8c-a00f-19599c6513d3", disable the option "Misc > Save pages in background".
+  - If the filename of a saved page looks like "56833935-156b-4d8c-a00f-19599c6513d3", disable the option "Misc > Save pages in background". Reinstalling Chrome may also fix this issue.
 - Chrome/Opera:
   - You must enable the option "Allow access to file URLs" in the extension page to display the infobar when viewing a saved page, or to save a page stored on the filesystem.
 

+ 2 - 2
cli/README.MD

@@ -13,8 +13,8 @@ This is a **work in progress**.
 - [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 current 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 current folder. Otherwise you will need to set the `--browser-executable-path` option to help SingleFile locating the binary file.
+- 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.
 
 ### Install

+ 1 - 2
cli/package.json

@@ -10,8 +10,7 @@
 		"puppeteer-core": "*",
 		"request-promise-native": "*",
 		"selenium-webdriver": "4.0.0-alpha.1",
-		"selenium-webdriver-legacy": "selenium-webdriver:*",
 		"strong-data-uri": "*",
 		"yargs": "*"
 	}
-}
+}

+ 10 - 4
maff2html/README.MD

@@ -9,9 +9,9 @@ SingleFile can be launched from the command line to convert MAFF files into HTML
 ### Prerequisites
 
 - [Node.js](https://nodejs.org) must be installed. 
-- You must use specific versions of Firefox and Selenium WebDriver component. You must install respectively [Firefox version 56.0.2](https://ftp.mozilla.org/pub/firefox/releases/56.0.2/) and [Mozilla geckodriver version 0.20.1](https://github.com/mozilla/geckodriver/releases/tag/v0.20.1).
-- It is recommended that the Firefox binary can be found through the `PATH` environment variable or the current folder. Otherwise you will need to set the `--browser-executable-path` option..
-- It is also recommended that the Mozilla geckodriver binary can be found through the `PATH` environment variable or the current folder. Otherwise you will need to set the `--web-driver-executable-path` option.
+- You must also install [Firefox version 56.0.2](https://ftp.mozilla.org/pub/firefox/releases/56.0.2/) and [Mozilla geckodriver version 0.20.1](https://github.com/mozilla/geckodriver/releases/tag/v0.20.1).
+- It is recommended that the Firefox binary can be found through the `PATH` environment variable or the `maff2html` folder. Otherwise you will need to set the `--browser-executable-path` option..
+- It is also recommended that the Mozilla geckodriver binary can be found through the `PATH` environment variable or the `maff2html` folder. Otherwise you will need to set the `--web-driver-executable-path` option.
 
 ### Install
 
@@ -47,7 +47,13 @@ SingleFile can be launched from the command line to convert MAFF files into HTML
 
 - Examples
 
-  - Convert a MAFF file (e.g. `wikipedia.maff`) into `wikipedia.html` with Firefox installed in the folder "~/firefox-56.0.2/" (Linux/Unix/BSD etc.) or "C:\Program Files\Mozilla Firefox 56.0.2\" (Windows)
+  - Convert `wikipedia.maff` (located in the user directory) into `wikipedia.html`
+
+  `$ ./single-file.js file:///home/gildas/wikipedia.maff wikipedia.html` (Linux/Unix/BSD etc.)
+  
+  `> node single-file.js file:///C:/Users/Gildas/wikipedia.maff wikipedia.html` (Windows)
+
+  - Convert `wikipedia.maff` (located in the user directory) into `wikipedia.html` with Firefox installed in the folder "~/firefox-56.0.2/" (Linux/Unix/BSD etc.) or "C:\Program Files\Mozilla Firefox 56.0.2\" (Windows)
 
   `$ ./single-file.js file:///home/gildas/wikipedia.maff wikipedia.html --browser-executable-path=~/firefox-56.0.2/firefox` (Linux/Unix/BSD etc.)