Documentation ¶
Overview ¶
Copyright © 2022 NAME HERE <EMAIL ADDRESS>
Copyright © 2022 NAME HERE <EMAIL ADDRESS>
Copyright © 2022 NAME HERE <EMAIL ADDRESS>
Copyright © 2022 NAME HERE <EMAIL ADDRESS>
Copyright © 2022 NAME HERE <EMAIL ADDRESS>
Copyright © 2022 NAME HERE <EMAIL ADDRESS>
Copyright © 2022 NAME HERE <EMAIL ADDRESS>
Copyright © 2022 NAME HERE <EMAIL ADDRESS>
Index ¶
- Variables
- func CreateInsertMovieActorParams(moviePage *MoviePage, movieUuid string) []database.InsertMovieActorParams
- func CreateInsertMovieDirectorParams(moviePage *MoviePage, movieUuid string) []database.InsertMovieDirectorParams
- func CreateInsertMovieGenreParams(moviePage *MoviePage, movieUuid string) []database.InsertMovieGenreParams
- func CreateInsertMovieParams(moviePage *MoviePage) (*database.InsertMovieParams, error)
- func CreateInsertMovieRatingParams(ratings []Rating, movieUuid string) []database.InsertMovieRatingParams
- func CreateInsertMovieReviewParams(movieReviewPage *MovieReviewPage, movieUuid string) *database.InsertReviewParams
- func CreateInsertMovieWatchParams(movieWatch *MovieWatchPage, movieUuid string) *database.InsertMovieWatchParams
- func CreateInsertMovieWriterParams(moviePage *MoviePage, movieUuid string) []database.InsertMovieWriterParams
- func Execute()
- func GetMovieImdbIdFromWatchFile(fileContents []byte) (string, error)
- func GetMovieTitleFromWatchFile(fileContents []byte) (string, error)
- func ParseReleased(releasedString string) (string, error)
- func ParseRuntime(runtimeString string) (int, error)
- func SplitOnCommaAndTrim(toSplit string) []string
- type MovieDetailUuids
- type MoviePage
- type MovieParser
- type MovieReviewPage
- type MovieReviewParser
- type MovieWatchPage
- type MovieWatchParser
- type OmdbClient
- type OmdbMovieResponse
- type Rating
Constants ¶
This section is empty.
Variables ¶
View Source
var DB string = "./data/movies.db"
View Source
var GRIST_DOCUMENT_ID string
View Source
var GRIST_KEY string
View Source
var IMDB_ID_EXTRACTOR *regexp.Regexp = regexp.MustCompile(
`imdb_id::\s+(tt\d{7})`,
)
View Source
var MOVIE_TEMPLATE = `` /* 944-byte string literal not displayed */
View Source
var MOVIE_WATCH_TEMPLATE = `` /* 422-byte string literal not displayed */
View Source
var OMDB_KEY string
View Source
var WATCHED_DATE_EXTRACTOR *regexp.Regexp = regexp.MustCompile(
`watched::\s*\[\[(\d{4}-\d{2}-\d{2})\]\]`,
)
Functions ¶
func CreateInsertMovieActorParams ¶
func CreateInsertMovieActorParams( moviePage *MoviePage, movieUuid string, ) []database.InsertMovieActorParams
func CreateInsertMovieDirectorParams ¶
func CreateInsertMovieDirectorParams( moviePage *MoviePage, movieUuid string, ) []database.InsertMovieDirectorParams
func CreateInsertMovieGenreParams ¶
func CreateInsertMovieGenreParams( moviePage *MoviePage, movieUuid string, ) []database.InsertMovieGenreParams
func CreateInsertMovieParams ¶
func CreateInsertMovieParams( moviePage *MoviePage, ) (*database.InsertMovieParams, error)
func CreateInsertMovieRatingParams ¶
func CreateInsertMovieRatingParams( ratings []Rating, movieUuid string, ) []database.InsertMovieRatingParams
func CreateInsertMovieReviewParams ¶
func CreateInsertMovieReviewParams( movieReviewPage *MovieReviewPage, movieUuid string, ) *database.InsertReviewParams
func CreateInsertMovieWatchParams ¶
func CreateInsertMovieWatchParams(movieWatch *MovieWatchPage, movieUuid string) *database.InsertMovieWatchParams
func CreateInsertMovieWriterParams ¶
func CreateInsertMovieWriterParams( moviePage *MoviePage, movieUuid string, ) []database.InsertMovieWriterParams
func Execute ¶
func Execute()
Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.
func ParseReleased ¶
func ParseRuntime ¶
func SplitOnCommaAndTrim ¶
Types ¶
type MovieDetailUuids ¶
type MoviePage ¶
type MoviePage struct { Title string ImdbLink string Genres []string Directors []string Actors []string Writers []string Year int RuntimeMinutes int Rating string Released string Plot string Country string Language string BoxOffice string Production string CallFelissa bool Slasher bool Zombies bool Beast bool Godzilla bool WallpaperFu bool }
func CreateMoviePage ¶
func CreateMoviePage( omdbResponse *OmdbMovieResponse, movieWatch *MovieWatchPage, ) (*MoviePage, error)
type MovieParser ¶
func CreateMovieParser ¶
func CreateMovieParser() (*MovieParser, error)
type MovieReviewPage ¶
type MovieReviewParser ¶
type MovieReviewParser struct { DataExtractor *regexp.Regexp TitleExtractor *regexp.Regexp ReviewExtractor *regexp.Regexp }
func CreateMovieReviewParser ¶
func CreateMovieReviewParser() (*MovieReviewParser, error)
func (*MovieReviewParser) ParseMovieReviewPage ¶
func (p *MovieReviewParser) ParseMovieReviewPage(filename string) ( *MovieReviewPage, error, )
type MovieWatchPage ¶
type MovieWatchPage struct { Title string FileTitle string Watched string ImdbLink string ImdbId string FirstTime bool JoeBob bool CallFelissa bool Beast bool Godzilla bool Zombies bool Slasher bool WallpaperFu bool Service string Notes string }
func CreateMovieWatchPage ¶
func CreateMovieWatchPage(row *database.GetAllMovieWatchesRow) *MovieWatchPage
type MovieWatchParser ¶
type MovieWatchParser struct { DataExtractor *regexp.Regexp NotesExtractor *regexp.Regexp TitleExtractor *regexp.Regexp }
func CreateMovieWatchParser ¶
func CreateMovieWatchParser() (*MovieWatchParser, error)
func (*MovieWatchParser) ParsePage ¶
func (p *MovieWatchParser) ParsePage(fileName string) (*MovieWatchPage, error)
type OmdbClient ¶
type OmdbClient struct {
// contains filtered or unexported fields
}
func NewOmdbClient ¶
func NewOmdbClient(key string) *OmdbClient
func (*OmdbClient) GetMovie ¶
func (c *OmdbClient) GetMovie(movieId string) (*OmdbMovieResponse, error)
type OmdbMovieResponse ¶
type OmdbMovieResponse struct { Title string `json:"Title"` Year string `json:"Year"` Rated string `json:"Rated"` Released string `json:"Released"` Runtime string `json:"Runtime"` Genre string `json:"Genre"` Director string `json:"Director"` Writer string `json:"Writer"` Actors string `json:"Actors"` Plot string `json:"Plot"` Language string `json:"Language"` Country string `json:"Country"` Awards string `json:"Awards"` Poster string `json:"Poster"` Ratings []Rating `json:"Ratings"` Metascore string `json:"Metascore"` ImdbRating string `json:"imdbRating"` ImdbVotes string `json:"imdbVotes"` ImdbID string `json:"imdbID"` Type string `json:"Type"` DVD string `json:"DVD"` BoxOffice string `json:"BoxOffice"` Production string `json:"Production"` Website string `json:"Website"` Response string `json:"Response"` }
Click to show internal directories.
Click to hide internal directories.