mirror of
https://github.com/rwinkhart/MUTN.git
synced 2026-08-28 04:46:41 -04:00
Re-write argument parsing, implement skeleton of copy functionality
This commit is contained in:
@@ -3,9 +3,11 @@ package cli
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/rwinkhart/MUTN/src/offline"
|
||||
"os"
|
||||
)
|
||||
|
||||
// EntryReader prints the decrypted contents of a libmutton entry in a human-readable format
|
||||
// TODO implement password hiding
|
||||
func EntryReader(decryptedEntry []string) {
|
||||
fmt.Println()
|
||||
|
||||
@@ -54,4 +56,13 @@ func EntryReader(decryptedEntry []string) {
|
||||
if notesFlag {
|
||||
fmt.Println()
|
||||
}
|
||||
os.Exit(0)
|
||||
}
|
||||
|
||||
func EntryReaderShortcut(targetLocation string) {
|
||||
if isFile, _ := offline.TargetIsFile(targetLocation, true); isFile {
|
||||
EntryReader(offline.DecryptGPG(targetLocation))
|
||||
} else {
|
||||
fmt.Println(offline.AnsiError + "Failed to read \"" + targetLocation + "\" - it is a directory" + offline.AnsiReset)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user