source

package
v0.0.0-...-920eab1 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2022 License: MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const AppConfigPath = "../appconfig.json" // TODO move

Variables

This section is empty.

Functions

func AddScores

func AddScores(res []search.SearchResult, query string) []search.SearchResult

func BatchDuplicateResults

func BatchDuplicateResults(slice []search.SearchResult) []search.SearchResult
func ConstructLink(path string) string

func ExtractContentAndMetadata

func ExtractContentAndMetadata(out io.Reader) []search.SearchResult

func GetReadwiseHighlights

func GetReadwiseHighlights(txt string) string

func IsReadwiseResult

func IsReadwiseResult(title string) bool

func UnmarshalEntriesFromCSV

func UnmarshalEntriesFromCSV(in *os.File) ([]*readwiseEntry, error)

Types

type BookmarkSearcher

type BookmarkSearcher struct {
	// contains filtered or unexported fields
}

func NewBookmarkSearcher

func NewBookmarkSearcher(bookmarkBashPath string) *BookmarkSearcher

func (BookmarkSearcher) Search

func (b BookmarkSearcher) Search(query string) ([]search.SearchResult, error)

type BrowserHistorySearcher

type BrowserHistorySearcher struct {
	// contains filtered or unexported fields
}

func NewBrowserHistorySearcher

func NewBrowserHistorySearcher(bashScriptPath string) *BrowserHistorySearcher

func (BrowserHistorySearcher) Search

func (b BrowserHistorySearcher) Search(query string) ([]search.SearchResult, error)

type FileSearch

type FileSearch struct {
	Rga    string
	Folder string
}

func NewFileSearcher

func NewFileSearcher(rgaPath, pathFolder string) *FileSearch

func (FileSearch) Search

func (f FileSearch) Search(query string) ([]search.SearchResult, error)

type GoogleDriveClient

type GoogleDriveClient struct {
	// contains filtered or unexported fields
}

func NewGdriveClient

func NewGdriveClient(path string, credentialReader io.Reader, tokenReader io.Reader, tokenWriter io.Writer) GoogleDriveClient

func (GoogleDriveClient) Search

func (client GoogleDriveClient) Search(keywords string) ([]search.SearchResult, error)

type InstapaperParser

type InstapaperParser struct {
	File *os.File
}

func NewInstapaperParser

func NewInstapaperParser(f *os.File) *InstapaperParser

func (InstapaperParser) TransformToData

func (i InstapaperParser) TransformToData() ([]*search.IndexData, error)

type PeopleParser

type PeopleParser struct {
	File *os.File
	Url  string
}

func NewPeopleParser

func NewPeopleParser(f *os.File) *PeopleParser

func (PeopleParser) TransformToData

func (p PeopleParser) TransformToData() ([]*search.IndexData, error)

type ReadwiseCSVParser

type ReadwiseCSVParser struct {
	File *os.File
}

func NewReadwiseCSVParser

func NewReadwiseCSVParser(file *os.File) *ReadwiseCSVParser

func (*ReadwiseCSVParser) Search

func (c *ReadwiseCSVParser) Search(keywords string) ([]search.SearchResult, error)

func (ReadwiseCSVParser) TransformToData

func (c ReadwiseCSVParser) TransformToData() ([]*search.IndexData, error)

TODO refactor to care less about search implementation

type TwitterParser

type TwitterParser struct {
	File *os.File
}

func (TwitterParser) TransformToData

func (t TwitterParser) TransformToData() ([]*search.IndexData, error)

Jump to

Keyboard shortcuts

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