almaany

package
v0.0.0-...-be62af6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 11, 2019 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const EndPoint = "https://www.almaany.com/ar/dict/ar-ar/%s/"

Variables

This section is empty.

Functions

func AddUser

func AddUser(user *tgbotapi.User)

Adds a user

func FormatMaany

func FormatMaany(maana Manaa) string

func GetSearchedWord

func GetSearchedWord(word string) []string

Return a list of words from a searched string

func InitDatabase

func InitDatabase() bool

Open a database connection and create tables.

func SaveWords

func SaveWords(searched string, words []Manaa) bool

Save words to the database

Types

type Manaa

type Manaa struct {
	Word         string
	WordType     string
	Explanations []string
}

func GetExplanation

func GetExplanation(exactWord string) Manaa

Returns full Manna struct from an exactWord

func ScrapePages

func ScrapePages(word string) []Manaa

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL