Documentation
¶
Index ¶
- Constants
- func ApplyOrientation(img image.Image, orientation int) image.Image
- func CopyFile(srcPath, dstPath string) error
- func EnsureDownloadDir(dir string) error
- func ExtractExifInfo(name string, cfg Config) interface{}
- func GRPhotoListURL() string
- func GetFileInfo(name string, cfg Config, existingFiles map[string]bool) (size int64, modTime time.Time, exists bool)
- func ScanCameraUsb(out *[]string, cfg Config)
- func ScanCameraWiFi(out *[]string, mock bool)
- func ScanDownloadDir(existingFiles map[string]bool, cfg Config)
- func SetLogText(logBox *tview.TextView)
- func SetupControls(app *tview.Application, photoListBox *tview.List, currentItem *int, ...)
- func WaitForConnection(cfg Config)
- func WriteLog(message string, logBox *tview.TextView)
- type Config
- type ConnectionMethod
- type Direction
- type GRPhotoList
- type PhotoInfo
- type UsbSettings
Constants ¶
View Source
const ( GRHost = "http://192.168.0.1/" PhotoListURI = "v1/photos" PropsURI = "v1/props" )
Variables ¶
This section is empty.
Functions ¶
func EnsureDownloadDir ¶
func ExtractExifInfo ¶
func GRPhotoListURL ¶
func GRPhotoListURL() string
func GetFileInfo ¶
func ScanCameraUsb ¶
func ScanCameraWiFi ¶
func ScanDownloadDir ¶
func SetLogText ¶
func SetupControls ¶
func SetupControls( app *tview.Application, photoListBox *tview.List, currentItem *int, photos []string, pages *tview.Pages, logBox *tview.TextView, setAppFocus func(t *tview.TextView, l *tview.List), itemIsSelected func(int) bool, toggleSelection func(int), downloadSelected func(), selectAll func(), deselectAll func(), renderPreviewModal func(string) tview.Primitive, )
SetupControls sets up the global keybindings for the app.
func WaitForConnection ¶
func WaitForConnection(cfg Config)
Types ¶
type Config ¶
type Config struct {
Mock bool `json:"-"` // for testing purposes, not actually in the config file
ConnectionMethod ConnectionMethod `json:"connection_method"`
DownloadDir string `json:"download_dir"`
UsbSettings UsbSettings `json:"usb"`
}
func LoadConfig ¶
type ConnectionMethod ¶
type ConnectionMethod string
const ( ConnectionMethodUSB ConnectionMethod = "usb" ConnectionMethodWiFi ConnectionMethod = "wifi" )
type GRPhotoList ¶
type PhotoInfo ¶
type PhotoInfo struct {
ErrCode int `json:"errCode"`
ErrMsg string `json:"errMsg"`
CameraModel string `json:"cameraModel"`
Dir string `json:"dir"`
File string `json:"file"`
Size int64 `json:"size"`
Datetime string `json:"datetime"`
Orientation int `json:"orientation"`
AspectRatio string `json:"aspectRatio"`
Av string `json:"av"`
Tv string `json:"tv"`
Sv string `json:"sv"`
Xv string `json:"xv"`
GpsInfo string `json:"gpsInfo"`
}
type UsbSettings ¶
type UsbSettings struct {
CameraDir string `json:"camera_dir"`
}
Click to show internal directories.
Click to hide internal directories.