formatted / restructured app folder

This commit is contained in:
Philipp Häfelfinger 2019-02-23 22:02:12 +01:00
parent 894a039591
commit 37f6aefe5e
6 changed files with 18 additions and 20 deletions

View File

@ -3,7 +3,7 @@ package main
import ( import (
"flag" "flag"
"github.com/sirupsen/logrus" "github.com/sirupsen/logrus"
"haefelfinger.net/piwigo/DirectoriesToAlbums/internal/app/DirectoriesToAlbums" "haefelfinger.net/piwigo/DirectoriesToAlbums/internal/app"
"os" "os"
) )
@ -28,4 +28,4 @@ func InitializeLog() {
logrus.SetLevel(logrus.DebugLevel) logrus.SetLevel(logrus.DebugLevel)
logrus.SetOutput(os.Stdout) logrus.SetOutput(os.Stdout)
logrus.Infoln("Starting Piwigo directories to albums...") logrus.Infoln("Starting Piwigo directories to albums...")
} }

View File

@ -14,24 +14,24 @@ func ScanLocalDirectories(root string) {
logrus.Debugln("filepath.Walk() returned %v\n", fileNodes) logrus.Debugln("filepath.Walk() returned %v\n", fileNodes)
} }
func GetAllCategoriesFromServer() { func GetAllCategoriesFromServer() {
// get all categories from server and flatten structure to match directory names // get all categories from server and flatten structure to match directory names
// 2018/2018 album blah // 2018/2018 album blah
logrus.Warnln("Loading all categories from the server (NotImplemented)") logrus.Warnln("Loading all categories from the server (NotImplemented)")
} }
func FindMissingAlbums() { func FindMissingAlbums() {
logrus.Warnln("Looking up missing albums (NotImplemented)") logrus.Warnln("Looking up missing albums (NotImplemented)")
} }
func CreateMissingAlbums() { func CreateMissingAlbums() {
logrus.Warnln("Creating missing albums (NotImplemented)") logrus.Warnln("Creating missing albums (NotImplemented)")
} }
func FindMissingImages() { func FindMissingImages() {
logrus.Warnln("Finding missing images (NotImplemented)") logrus.Warnln("Finding missing images (NotImplemented)")
} }
func UploadImages() { func UploadImages() {
logrus.Warnln("Uploading missing images (NotImplemented)") logrus.Warnln("Uploading missing images (NotImplemented)")
} }

View File

@ -16,11 +16,11 @@ func ScanLocalFileStructure(path string) map[string]FileNode {
//TODO: Only allow jpg and png files here //TODO: Only allow jpg and png files here
fileMap[p] = FileNode{ fileMap[p] = FileNode{
key:p, key: p,
name:info.Name(), name: info.Name(),
isDir:info.IsDir(), isDir: info.IsDir(),
} }
return nil; return nil
}) })
if err != nil { if err != nil {

View File

@ -1,8 +1,7 @@
package localFileStructure package localFileStructure
type FileNode struct { type FileNode struct {
key string key string
name string name string
isDir bool isDir bool
} }

View File

@ -1,8 +1,7 @@
package authentication package authentication
type PiwigoConfig struct { type PiwigoConfig struct {
url string url string
username string username string
password string password string
} }

View File

@ -1,7 +1,7 @@
package category package category
type PiwigoCategory struct { type PiwigoCategory struct {
id int id int
name string name string
key string key string
} }