Updates, Improvements, and Fixes

* Moved scripts / runner to separate package
    allows future replacement with PS Plugin.
* Fixed issues with Refresh and removed "layer" function.
* Added github documentation via godocdown.
* Reduced number of calls to Panic.
* Updated Tests
* Updated documentation.
* Fixed warnings.
* .gitignore now ignores .test and .out files.
This commit is contained in:
Spencer Brower
2018-06-18 23:51:52 -04:00
parent 47f24275b1
commit 206b94dcac
43 changed files with 450 additions and 298 deletions

View File

@@ -1,7 +1,5 @@
package ps
import "fmt"
// ModeEnum determines how aggressively the package will attempt to sync with Photoshop.
// Loading Photoshop files from scratch takes a long time, so the package saves
// the state of the document in a JSON file in the /data folder whenever you call
@@ -11,36 +9,24 @@ type ModeEnum int
// Mode holds the current mode.
var Mode ModeEnum
const (
// Normal Mode only verifies layers as they are operated on. The first time a
// layer's properties would be checked, it first overwrites the data from the
// Dump with data pulled directly from Photoshop. This allows you to quickly
// load documents in their current form.
Normal ModeEnum = iota
// Normal Mode only verifies layers as they are operated on. The first time a
// layer's properties would be checked, it first overwrites the data from the
// Dump with data pulled directly from Photoshop. This allows you to quickly
// load documents in their current form.
const Normal ModeEnum = 0
// Safe Mode always loads the document from scratch, ignoring any dumped data.
// (Very Slow). If a function panics due to outdated data, often times re-running
// the function in safe mode is enough to remediate it.
Safe
// Safe Mode always loads the document from scratch, ignoring any dumped data.
// (Very Slow). If a function panics due to outdated data, often times re-running
// the function in safe mode is enough to remediate it.
const Safe ModeEnum = 1
// Fast mode skips all verification. Use Fast mode only when certain that the
// .psd file hasn't changed since the last time Document.Dump() was called.
Fast
)
// const Fast ModeEnum = 2
// const Normal ModeEnum = 0
// const Safe ModeEnum = 1
// Fast mode skips all verification. Use Fast mode only when certain that the
// .psd file hasn't changed since the last time Document.Dump() was called.
const Fast ModeEnum = 2
// SaveOption is an enum for options when closing a document.
type SaveOption int
func (p *SaveOption) String() string {
return fmt.Sprint("", *p) // TODO: Fix
}
// SaveChanges Saves changes before closing documents.
const SaveChanges SaveOption = 1