remind

package module
v0.0.0-...-412552d Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2023 License: MIT Imports: 15 Imported by: 0

README

journal-reminder

Journal Reminder is a tool to automatically send daily email summaries of past journal entries. It helps rediscover meaningful moments without having to manually skim through cumbersome journal files.

Overview

This app parses Google Docs containing past journal entries. It checks for an entry from the current day in a previous year, extracts the content, and emails it as a daily journal snippet.

Getting two or three reminders a week helps me remember my past, to see how far I've come, and share memories with my friends. with previous versions of oneself and relive meaningful memories that may have faded over time.

Usage

The app is currently setup to run as an AWS Lambda triggered on a CloudWatch schedule. It requires a service account with Google Docs access and sender credentials to enable email functionality.

To add documents for parsing: Share the Google Doc link with the service account email Add the document ID to the documentIDs list passed in from the CloudWatch event (or the CLI)

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetGoogleClient

func GetGoogleClient() (*docs.Service, error)

func RefreshGoogleAuth

func RefreshGoogleAuth() (authCode string)

func Remind

func Remind(documentIds []string) (err error)

func SendEmail

func SendEmail(recipientAddress string, senderAddress string, senderPassword string, body string) error

Types

type GoogleDocumentBody

type GoogleDocumentBody struct {
	Content []GoogleDocumentContentItem `json:"content"`
}

type GoogleDocumentContentItem

type GoogleDocumentContentItem struct {
	StartIndex int                     `json:"startIndex"`
	EndIndex   int                     `json:"endIndex"`
	Paragraph  GoogleDocumentParagraph `json:"paragraph"`
}

type GoogleDocumentElement

type GoogleDocumentElement struct {
	StartIndex int                   `json:"startIndex"`
	EndIndex   int                   `json:"endIndex"`
	TextRun    GoogleDocumentTextRun `json:"textRun"`
}

type GoogleDocumentParagraph

type GoogleDocumentParagraph struct {
	Elements       []GoogleDocumentElement      `json:"elements"`
	ParagraphStyle GoogleDocumentParagraphStyle `json:"paragraphStyle"`
}

type GoogleDocumentParagraphStyle

type GoogleDocumentParagraphStyle struct {
	HeadingId       string `json:"headingId"`
	NamedStyleType  string `json:"namedStyleType"`
	Direction       string `json:"direction"`
	PageBreakBefore bool   `json:"pageBreakBefore"`
}

type GoogleDocumentResponse

type GoogleDocumentResponse struct {
	Title      string             `json:"title"`
	Body       GoogleDocumentBody `json:"body"`
	DocumentId string             `json:"documentId"`
}

type GoogleDocumentTextRun

type GoogleDocumentTextRun struct {
	Content string `json:"content"`
}

Directories

Path Synopsis
cmd
aws-lambda command
cli command

Jump to

Keyboard shortcuts

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