Documentation ¶
Index ¶
Constants ¶
View Source
const LINGUEE = "linguee"
View Source
const LONGMAN = "longman"
View Source
const OUTPUT_TYPE_FULL_HTML = "full_html"
View Source
const OUTPUT_TYPE_IFRAME = "iframe"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Application ¶
func New ¶
func New(config *Config) (app *Application, err error)
func (*Application) Close ¶
func (app *Application) Close()
func (*Application) ScrapeAll ¶
func (app *Application) ScrapeAll(dictionary string, output_type string) error
func (*Application) ScrapeWord ¶
func (app *Application) ScrapeWord(dictionary string, output_type string, word string) (string, error)
Scrape a word from translator website
func (*Application) TranslateRequestHandler ¶
func (app *Application) TranslateRequestHandler(c echo.Context) error
type Config ¶
type Config struct { Level string `env:"LOG_LEVEL" envDefault:"info"` BaseUrl string `env:"TRANSLATOR_URL" envDefault:"https://www.ldoceonline.com/dictionary/"` CSVWordInputFile string `env:"WORD_CSV_INPUT_FILE" envDefault:"words.csv"` CSVWordOutputFile string `env:"WORD_CSV_OUT_PUTFILE" envDefault:"words_translated.csv"` }
Click to show internal directories.
Click to hide internal directories.