update usage and logging

This commit is contained in:
idk
2022-07-15 18:38:19 -04:00
parent 8f3a5594c6
commit 415004c430
3 changed files with 40 additions and 96 deletions

View File

@ -352,7 +352,7 @@ usagemd:
@echo "### Options:" | tee -a USAGE.md
@echo "" | tee -a USAGE.md
@echo '```sh' | tee -a USAGE.md
TOR_MANAGER_CLEARNET_MIRROR=true TOR_MANAGER_REQUIRE_PASSWORD=false ./i2p.plugins.tor-manager --p2p=false --help=true 2>&1 | grep -v $(DATE) | grep -v $(HOME) | tee -a USAGE.md
TOR_MANAGER_CLEARNET_MIRROR=true TOR_MANAGER_REQUIRE_PASSWORD=false ./i2p.plugins.tor-manager --p2p=false --help=true | tee -a USAGE.md
@echo '```' | tee -a USAGE.md
@echo "" | tee -a USAGE.md

130
USAGE.md
View File

@ -1,6 +1,12 @@
TorrentDownloaded: Torrent Download complete: tor-browser-linux64-11.5_en-US.tar.xz 110909932 110909932 9 9
UnpackSite: /home/idk/go/src/i2pgit.org/idk/i2p.plugins.tor-manager/tmp-i2pbrowser/tor-browser/www
comparing sizes: 1109 1109
Tor(And sometimes Firefox) Manager for I2P
===========================================
## Usage: i2p.plugins.tor-manager [options]
### Options:
```sh
Usage: i2p.plugins.tor-manager [options]
Downloads, verifies and unpacks Tor Browser. Manages the Tor Browser
@ -55,102 +61,40 @@ Options:
Available Languages:
- cs
- en-US
- id
- nl
- ro
- zh-TW
- ar
- de
- es-AR
- it
- ka
- nb-NO
- zh-CN
- fa
- is
- lt
- sv-SE
- el
- fr
- he
- ko
- vi
- ro
- zh-CN
- ca
- el
- es-ES
- mk
- is
- ms
- pt-BR
- th
- ga-IE
- my
- pl
- ru
- da
- sv-SE
- mk
- nb-NO
- tr
- de
- hu
- it
- ja
- en-US
- es-AR
- lt
- th
- zh-TW
- ar
- da
- pt-BR
- ru
- ga-IE
- id
- vi
- fa
- my
- nl
- cs
- ka
- ko
- pl
Usage: ./firefox.real [ options ... ] [URL]
where options include:
X11 options
--display=DISPLAY X display to use
--sync Make X calls synchronous
--g-fatal-warnings Make all warnings fatal
Firefox options
-h or --help Print this message.
-v or --version Print Firefox version.
--full-version Print Firefox version, build and platform build ids.
-P <profile> Start with <profile>.
--profile <path> Start with profile at <path>.
--migration Start with migration wizard.
--ProfileManager Start with ProfileManager.
--no-remote (default) Do not accept or send remote commands; implies
--new-instance.
--allow-remote Accept and send remote commands.
--new-instance Open new instance, not a new window in running instance.
--safe-mode Disables extensions and themes for this session.
--MOZ_LOG=<modules> Treated as MOZ_LOG=<modules> environment variable,
overrides it.
--MOZ_LOG_FILE=<file> Treated as MOZ_LOG_FILE=<file> environment variable,
overrides it. If MOZ_LOG_FILE is not specified as an
argument or as an environment variable, logging will be
written to stdout.
--headless Run without a GUI.
--browser Open a browser window.
--new-window <url> Open <url> in a new window.
--new-tab <url> Open <url> in a new tab.
--private-window <url> Open <url> in a new private window.
--preferences Open Preferences dialog.
--screenshot [<path>] Save screenshot to <path> or in working directory.
--window-size width[,height] Width and optionally height of screenshot.
--search <term> Search <term> with your default search engine.
--setDefaultBrowser Set this app as the default browser.
--first-startup Run post-install actions before opening a new window.
--kiosk Start the browser in kiosk mode.
--disable-pinch Disable touch-screen and touch-pad pinch gestures.
--jsconsole Open the Browser Console.
--jsdebugger [<path>] Open the Browser Toolbox. Defaults to the local build
but can be overridden by a firefox path.
--wait-for-jsdebugger Spin event loop until JS debugger connects.
Enables debugging (some) application startup code paths.
Only has an effect when `--jsdebugger` is also supplied.
--devtools Open DevTools on initial load.
--start-debugger-server [ws:][ <port> | <path> ] Start the devtools server on
a TCP port or Unix domain socket path. Defaults to TCP port
6000. Use WebSocket protocol if ws: prefix is specified.
--recording <file> Record drawing for a given URL.
--recording-output <file> Specify destination file for a drawing recording.
--remote-debugging-port [<port>] Start the Firefox remote agent,
which is a low-level debugging interface based on the CDP protocol.
Defaults to listen on localhost:9222.
Tor Browser Script Options
--verbose Display Tor and Firefox output in the terminal
--log [file] Record Tor and Firefox output in file (default: tor-browser.log)
--detach Detach from terminal and run Tor Browser in the background.
--register-app Register Tor Browser as a desktop app for this user
--unregister-app Unregister Tor Browser as a desktop app for this user

View File

@ -292,11 +292,11 @@ func TorrentDownloaded(ietf, rtpair string) bool {
if info.Size() == int64(cmpsize) {
sizeString := fmt.Sprintf("%d", info.Size())
cmpString := fmt.Sprintf("%d", cmpsize)
fmt.Fprintf(os.Stderr, "TorrentDownloaded: Torrent Download complete:", path, info.Size(), int64(cmpsize), len(sizeString), len(cmpString))
fmt.Fprintf(os.Stderr, "TorrentDownloaded: Torrent Download complete: %v %v %v %v %v", path, info.Size(), int64(cmpsize), len(sizeString), len(cmpString))
found = true
return nil
} else {
fmt.Fprintf(os.Stderr, "TorrentDownloaded: Torrent Download incomplete:", path, info.Size(), int64(cmpsize))
fmt.Fprintf(os.Stderr, "TorrentDownloaded: Torrent Download incomplete: %v %v %v", path, info.Size(), int64(cmpsize))
return fmt.Errorf("TorrentDownloaded: Torrent Download found but size is too small: %s", path)
}
}