Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ChromeBrowser for the chrome browser ChromeBrowser = "chrome" // FirefoxBrowser for the firefox browser FirefoxBrowser = "firefox" // ErrBrowser is the error returned when the browser type entered by the user is not firefox ErrBrowser = errors.New("the supported browser is firefox") )
Functions ¶
func ImageProcessing ¶
ImageProcessing does the optical character recognition(OCR)
This method takes in two parameters which are: filePath and the name the processed image is to be saved as.
Types ¶
type NewConfig ¶
type NewConfig struct {
// DriverPath is the webdriver for the browser
DriverPath string
// Address for the address e.g 127.0.0.1
Address string
// Port for the port to run the selenium server on e.g 8080
Port int
// DebugMode turn this to true if you want to get logs for the process happening
DebugMode bool
// BrowserName is the name of the browser to use
BrowserName string
// FirefoxBinary is the firefox binary to use as the browser
FirefoxBinary string
}
NewConfig is the config that sets up webshot for use
type Webshot ¶
type Webshot struct {
// webdriver is the selenium we driver
Webdriver selenium.WebDriver
// Service is the selenuim service
Service *selenium.Service
}
Webshot is the struct for the webdriver
func NewWebshot ¶
NewWebshot sets up a new browser with the config provided
Click to show internal directories.
Click to hide internal directories.
