Documentation
¶
Index ¶
- Constants
- Variables
- func Block(tilbit Tilbit) string
- func FileRepositoryDir() string
- func GetBitString(tilbit Tilbit, format string) (str string, err error)
- func MakeTilLine(content string, source string) (tilLine string)
- func ParseIdsFromString(idString string) (ids []string)
- func ParseMarkdownFile(fileContent string, fileName string) (err error, tilbits []Tilbit, metadata SourceMetadata)
- func PrintMarkdown(text string) (out string)
- type Repository
- type SQLiteRepository
- func (r *SQLiteRepository) All() (all []Tilbit, err error)
- func (r *SQLiteRepository) ById(hash string) (tilbit Tilbit, err error)
- func (r *SQLiteRepository) ByIds(hashes []string) (foundBits []Tilbit, err error)
- func (r *SQLiteRepository) ByQuery(query string) (tilbits []Tilbit, err error)
- func (r *SQLiteRepository) Create(tilbit Tilbit) (*Tilbit, error)
- func (r *SQLiteRepository) Import(tilbits []Tilbit) error
- func (r *SQLiteRepository) SetSourceURI(source string) error
- func (r *SQLiteRepository) Setup() error
- type Source
- type SourceLocation
- type SourceMetadata
- type Style
- type Tilbit
- func GetTilbits(sources []string, query string, inputTilbits []Tilbit) (tilbits []Tilbit, err error)
- func ParseKindleClippingsFile(fileContent string, fileName string) (err error, tilbits []Tilbit)
- func ParseSource(source string) (tilbits []Tilbit, err error)
- func ParseSqliteFile(fileName string) (err error, tilbits []Tilbit)
- func ParseTextFile(fileContent string, fileName string) (err error, tilbits []Tilbit)
Constants ¶
View Source
const VERSION = "0.0.1"
Variables ¶
Functions ¶
func FileRepositoryDir ¶
func FileRepositoryDir() string
func MakeTilLine ¶
func ParseIdsFromString ¶
func ParseMarkdownFile ¶
func ParseMarkdownFile(fileContent string, fileName string) (err error, tilbits []Tilbit, metadata SourceMetadata)
func PrintMarkdown ¶
Types ¶
type Repository ¶
type Repository interface { All() ([]Tilbit, error) ById(hash string) (Tilbit, error) ByIds(hashes []string) ([]Tilbit, error) ByQuery(hash string) ([]Tilbit, error) Create(tilbit Tilbit) (*Tilbit, error) Import(tilbits []Tilbit) error // Update(id int64, updated Tilbit) (*Tilbit, error) // Delete(id int64) error Setup() error SetSourceURI(source string) error }
type SQLiteRepository ¶
type SQLiteRepository struct {
// contains filtered or unexported fields
}
func NewSQLiteRepository ¶
func NewSQLiteRepository() *SQLiteRepository
func (*SQLiteRepository) All ¶
func (r *SQLiteRepository) All() (all []Tilbit, err error)
func (*SQLiteRepository) ById ¶
func (r *SQLiteRepository) ById(hash string) (tilbit Tilbit, err error)
func (*SQLiteRepository) ByIds ¶
func (r *SQLiteRepository) ByIds(hashes []string) (foundBits []Tilbit, err error)
func (*SQLiteRepository) ByQuery ¶
func (r *SQLiteRepository) ByQuery(query string) (tilbits []Tilbit, err error)
func (*SQLiteRepository) Import ¶
func (r *SQLiteRepository) Import(tilbits []Tilbit) error
func (*SQLiteRepository) SetSourceURI ¶
func (r *SQLiteRepository) SetSourceURI(source string) error
func (*SQLiteRepository) Setup ¶
func (r *SQLiteRepository) Setup() error
type SourceLocation ¶
type SourceMetadata ¶
type Style ¶
type Style struct {
// contains filtered or unexported fields
}
func GetRandomStyle ¶
func GetRandomStyle() (style Style)
type Tilbit ¶
type Tilbit struct { Text string Data SourceMetadata Location SourceLocation DbID int64 // Temporary field for database transition DbHash string // Temporary field for database transition }
func GetTilbits ¶
func ParseSource ¶
func ParseSqliteFile ¶
func ParseTextFile ¶
Click to show internal directories.
Click to hide internal directories.