Skip to content

Commit

Permalink
Copy Screenshots and Spelling fixes (#18)
Browse files Browse the repository at this point in the history
* Fixed overwrite logic (even though it's not used)
* Fixed file read/write logic, was not reading as binary
  Windows was mangeling 0x0D and 0x0A
* Bump version
* It's a good idea to install a spell checker in VSCode!
  • Loading branch information
hossimo authored May 23, 2020
1 parent 7f4bfd5 commit cb1b22b
Show file tree
Hide file tree
Showing 13 changed files with 59 additions and 59 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ Download the latest release [here](https://github.com/hossimo/GMA3Plugins/releas
### Tested on 1.0.0.3 - 1.1.4.2
* [Appearance Builder 1.1.0.4](https://github.com/hossimo/GMA3Plugins/tree/master/grandMA3/shared/resource/lib_plugins/Appearance%20Builder)
* [Random Select 1.1.0.1](https://github.com/hossimo/GMA3Plugins/tree/master/grandMA3/shared/resource/lib_plugins/Random%20Select)
* [Copy Screenshots 1.0.0.3](https://github.com/hossimo/GMA3Plugins/tree/master/grandMA3/shared/resource/lib_plugins/Copy%20Screenshots)
* [Assign AutoStart Fix 1.0.0.3](https://github.com/hossimo/GMA3Plugins/tree/master/grandMA3/shared/resource/lib_plugins/Assign%20AutoStart%20Fix)
* [Copy Screenshots 1.1.0.4](https://github.com/hossimo/GMA3Plugins/tree/master/grandMA3/shared/resource/lib_plugins/Copy%20Screenshots)
* [Assign AutoStart Fix 1.1.0.1](https://github.com/hossimo/GMA3Plugins/tree/master/grandMA3/shared/resource/lib_plugins/Assign%20AutoStart%20Fix)
* [Rem Dim 1.1.0.1](https://github.com/hossimo/GMA3Plugins/tree/master/grandMA3/shared/resource/lib_plugins/Rem%20Dim)
* [Fade Master 1.1.0.2](https://github.com/hossimo/GMA3Plugins/tree/master/grandMA3/shared/resource/lib_plugins/Fade%20Master)

### Source not released
* [Kinetic Set 1.0.0.1](https://github.com/hossimo/GMA3Plugins/tree/master/grandMA3/shared/resource/lib_plugins/KineticSet)

## Documentation
* [Unoffical API documentation Wiki](https://github.com/hossimo/GMA3Plugins/wiki)
* [Unofficial API documentation Wiki](https://github.com/hossimo/GMA3Plugins/wiki)
6 changes: 3 additions & 3 deletions grandMA3/shared/resource/lib_plugins/Appearance Builder.lua
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ local function Main (display_handle, argument)
if count == 0 or messageBoxResult["result"] == 0 then
return
end
-- have to filter out the numbers because non text inputs dont respect the black/white Filters.
-- have to filter out the numbers because non text inputs don't respect the black/white Filters.
local v = "[^0123456789.]"

fillS = string.gsub(messageBoxResult["inputs"][messageBoxQuestions[2]], v, "") -- valid characters only
Expand All @@ -134,7 +134,7 @@ local function Main (display_handle, argument)

continueString = string.format("Continue? Count: %d\nFill Saturation: %f\nFill Brightness: %f\nOutline Saturation: %f\nOutline Brightness: %f\nAppearance Start Index: %d\nMacro Start Index: %d\nOverwrite: %s", count, fillS, fillB, outlineS, outlineB, appearanceStartIndex, macroStartIndex, overwriteString)
else
-- sanatize our inputs
-- sanitize our inputs
arguments = Drt.split(argument, ",")
--count (int)
count = Drt.clamp(math.floor(tonumber(arguments[1]) or 15 ), 1, 360)
Expand Down Expand Up @@ -228,7 +228,7 @@ local function Main (display_handle, argument)

-- build macros
-- Overwrite Macros
--TODO: This should do an overwrite insted of a delete
--TODO: This should do an overwrite instead of a delete
if overwrite == 1 then
Cmd(string.format("Delete Macro %d /NC", macroIndex), undo)
end
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
AppearanceBuilder v1.1.0.1

Please note that this will likly break in future version of the console. and to use at your own risk.
Please note that this will likely break in future version of the console. and to use at your own risk.

This plugin creates the specified number of Appearance colors by spinning the Hue wheel eavenly. it trys to give the colors names based on a small list of editable RGB values and names in the plugin.
This plugin creates the specified number of Appearance colors by spinning the Hue wheel evenly. it tries to give the colors names based on a small list of editable RGB values and names in the plugin.

Usage:
`Plugin Appearance Builder "COUNT, [FillSaturation], [FillBrightness], [OutlineSaturation], [OutlineBrightness], [AppearanceStartIndex], [MacroStartIndex]"'`
Expand All @@ -16,7 +16,7 @@ If no properties are called with with the plugin a series of text boxes will ask
![AppearanceBuilder Example](https://github.com/hossimo/GMA3Plugins/blob/master/Images/AppearanceBuilderExample.png)

Properties:
COUNT between 1 and 360 defalts to 15
COUNT between 1 and 360 defaults to 15
FillSaturation between 0.0 and 1.0 defaults to 1.0
FillBrightness between 0.0 and 1.0 defaults to 1.0
FillSaturation between 0.0 and 1.0 defaults to <FillSaturation>
Expand All @@ -25,17 +25,17 @@ AppearanceStartIndex between 0 - 10000 defaults to 101
AppearanceStartIndex between 0 - 10000 defaults to AppearanceStartIndex

Things todo:
- The name is curretly taken from the outline color, and has a small list of colors.
- The name is currently taken from the outline color, and has a small list of colors.
- Better Macro overwriting, currently deletes and creates, if not overwriting adds additional lines with the INSERT command
- Eficancies and Consistantly issues
- Efficacies and Consistently issues

Releases:
- 1.0.0.1 - Inital Release
- 1.0.0.1 - Initial Release
- 1.0.0.2 - Added Text input when no arguments
- 1.0.0.3 - Changed Text input confirmation to Confirm() from PopupInput()
- 1.0.0.4 - Added Undo/Oops
- 1.0.0.5 - Cleanup and making functions local
- 1.1.0.1 - Uses MessageBox() and better Apperance Overwriting.
- 1.1.0.2 - Message Box fields use the correct types. Fixed a bug where canceling at continue proceded anyway.
- 1.1.0.1 - Uses MessageBox() and better Appearance Overwriting.
- 1.1.0.2 - Message Box fields use the correct types. Fixed a bug where canceling at continue proceeded anyway.
- 1.1.0.3 - Fixed Undo
- 1.1.0.4 - When overwriting, clear out any overwritten images
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
Assign AutoStart Fix v1.0.0.3
Assign AutoStart Fix v1.1.0.1

Please note that this will likly break in future version of the console. and to use at your own risk.
Please note that this will likely break in future version of the console. and to use at your own risk.

This plugin applys a [workaround](https://forum.malighting.com/thread/3712-playbacks/?postID=8769) to AutoStart always running the next cue even when the executor is already active.
This plugin applies a [workaround](https://forum.malighting.com/thread/3712-playbacks/?postID=8769) to AutoStart always running the next cue even when the executor is already active.

Usage:
* `Plugin "Assign AutoStart Fix" "2"` - Assigns the Macos to Sequence 2
* `Plugin "Assign AutoStart Fix" "1,10-11"` - Assigns the Macos to Sequence 1, 10 and 11
* `Plugin "Assign AutoStart Fix" "2"` - Assigns the MacOS to Sequence 2
* `Plugin "Assign AutoStart Fix" "1,10-11"` - Assigns the MacOS to Sequence 1, 10 and 11
* Calling the plugin without a argument will popup a Dialog asking for the Sequences.



Issues:
* ***NOTE: This will OVERWRITE any CMD's in the Selected Sequences CueZero and OffCue!***
* Does not currently check if the Sequence exists, probably no need since when the issue gets fixed this plugin will be depricated.
* Does not currently check if the Sequence exists, probably no need since when the issue gets fixed this plugin will be deprecated.

Releases:
* 1.0.0.1 - Inital release
* 1.0.0.1 - Initial release
* 1.0.0.2 - Added Oops, better checks for non valid inputs
* 1.0.0.3 - Makeing functions local
* 1.0.0.3 - Making functions local
* 1.1.0.1 - Spelling Corrections
12 changes: 6 additions & 6 deletions grandMA3/shared/resource/lib_plugins/Assign Autostart Fix.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--[[
Assign AutoStart Fix v1.0.0.3
Assign AutoStart Fix v1.1.0.1
See README.md for more information
MIT License
Expand Down Expand Up @@ -52,20 +52,20 @@ local function Main(display_handle,argument)
input = argument
else
-- no argument prompt in the UI
input = TextInput("Enter Sequance Number or range (e.g. 1,2-4)")
input = TextInput("Enter Sequence Number or range (e.g. 1,2-4)")
end

local sequances, stringSequances = Drt.calculateRange(input)
if sequances == nil then
local sequences, stringSequences = Drt.calculateRange(input)
if sequences == nil then
Echo("No Valid Ranges")
return
end

-- create an undo session.
local undo = CreateUndo("Adding Macros AutoStart Macros to Sequences " .. stringSequances)
local undo = CreateUndo("Adding Macros AutoStart Macros to Sequences " .. stringSequences)

-- use our returned sequences to insert the CueZero and CueEnd Macros
for k, v in pairs(sequances) do
for k, v in pairs(sequences) do
-- make sure object exists!
-- assign the macros
local cmdString = string.format('Set Seq %d "CmdEnable" "Yes"', v)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<GMA3 DataVersion="1.0.0.3">
<Plugin Name="Assign AutoStart Fix" Author="hoss" Version="1.0.0.3">
<Plugin Name="Assign AutoStart Fix" Author="hoss" Version="1.1.0.1">
<ComponentLua Name="Assign AutoStart Fix" FileName="Assign Autostart Fix.lua" Installed="Yes" LoadOnDemand="Yes" />
<ComponentLua Name="DRT Utilities" FileName="Drt-Utilities.lua" />
</Plugin>
Expand Down
19 changes: 9 additions & 10 deletions grandMA3/shared/resource/lib_plugins/Copy Screenshots.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--[[
Copy Screenshots v1.0.0.3
Copy Screenshots v1.1.0.4
See README.md for more information
MIT License
Expand Down Expand Up @@ -72,7 +72,7 @@ local function Main(display_handle,argument)
-- files to copy

-- get someone else to do it.
local result = copyFileToUSB(files, true)
local result = copyFileToUSB(files, false)
end

-- ****************************************************************
Expand Down Expand Up @@ -119,7 +119,7 @@ function copyFileToUSB(sourceFiles, overwrite)

for k, v in pairs(sourceFiles) do
--Echo("srcFileHandle: %s", v)
local srcFileHandle = assert(io.open(v, "r"))
local srcFileHandle = assert(io.open(v, "rb"))
local fileContent = srcFileHandle:read("*all")

for i, d in ipairs(Root().Temp.DriveCollect) do
Expand All @@ -130,16 +130,15 @@ function copyFileToUSB(sourceFiles, overwrite)
if i ~= 1 then
local path = d.path
local exportFilePath = GetPathOverrideFor("lib_images", path) .. sep
local file = io.open(exportFilePath .. k, "r")
if overwrite and file ~= nil then
local fileCheck = io.open(exportFilePath .. k, "r")
if overwrite == false and fileCheck ~= nil then
E("Skipping Existing: %s", exportFilePath)
skipCount = skipCount + 1
io.close(file)
io.close(fileCheck)
goto continue
end


local file, err = io.open(exportFilePath .. k, "w+")
local file, err = io.open(exportFilePath .. k, "wb")
if file then
assert(file:write(fileContent))
io.close(file)
Expand Down Expand Up @@ -169,7 +168,7 @@ end


-- ****************************************************************
-- return the entry points of this plugin :
-- return the entry points of this plugin :
-- ****************************************************************

return Main,Cleanup,Execute
return Main,Cleanup,Execute
2 changes: 1 addition & 1 deletion grandMA3/shared/resource/lib_plugins/Copy Screenshots.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<GMA3 DataVersion="1.0.0.3">
<Plugin Name="Copy Screenshots" Author="hoss" Version="1.0.0.3">
<Plugin Name="Copy Screenshots" Author="hoss" Version="1.1.0.4">
<ComponentLua Name="Copy Screenshots" FileName="Copy Screenshots.lua" Installed="Yes" LoadOnDemand="Yes" />
<ComponentLua Name="DRT Utilities" FileName="Drt-Utilities.lua" />
</Plugin>
Expand Down
14 changes: 7 additions & 7 deletions grandMA3/shared/resource/lib_plugins/Copy Screenshots/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Copy Screenshots v1.0.0.3
Copy Screenshots v1.1.0.4

Please note that this will likly break in future version of the console. and to use at your own risk.
Please note that this will likely break in future version of the console. and to use at your own risk.

Usage:
* `Plugin "Copy Screenshots"`
Expand All @@ -13,15 +13,15 @@ Issues:
* The console currently enumerates all disk connected to the console including
pervious versions (?) This may cause some skipped files even with the USB key
dot not include the selected file
* The copied files are not checked for consistancy, this could be done but did
not seem nessassary
* The copied files are not checked for consistency, this could be done but did
not seem necessary
* If a file exists on a key with the exact name the fill will be skipped and noted
in the System Monitor
* if the key does not have the grandMA3 folder structure the copy will fail and all
files will be skipped. Store a show to the stick first.

Releases:
* 1.0.0.1 - Inital release
* 1.0.0.1 - Initial release
* 1.0.0.2 - Fixed a path parsing bug causing the plugin to not work on the console.
* 1.0.0.3 - Makeing functions local

* 1.0.0.3 - Making functions local
* 1.1.0.4 - Fixed Image copy on windows.
10 changes: 5 additions & 5 deletions grandMA3/shared/resource/lib_plugins/Fade Master/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Fade Master
*v1.1.0.2*
Please note that this will likly break in future version of the console. and to use at your own risk.
Please note that this will likely break in future version of the console. and to use at your own risk.

![Fade Master Example](../../../../../Images/FadeMaster.gif)

Expand All @@ -19,12 +19,12 @@ Added in v1.1.0.2:
* No longer need `Page` or `Sequence` arguments, if you enter a number with a `.` it will be a page and without a sequence.


Additionally, if you have a long running fade that you need to abort you can delete the User Vraiable and the fade will stop.
Additionally, if you have a long running fade that you need to abort you can delete the User Variable and the fade will stop.

### Note:

* The plugin does it's best to make sure a user does not run the same executor twice, However there are edge cases like assigining Sequence 2 to Page 1.201 and dunning both Page and Sequence modes on the same executor will do undefined things.
* If the Fade Master plugin is already running it will not start again until the previous move is complete (thus its corasponding UserVar is deleted.)
* The plugin does it's best to make sure a user does not run the same executor twice, However there are edge cases like assigning Sequence 2 to Page 1.201 and dunning both Page and Sequence modes on the same executor will do undefined things.
* If the Fade Master plugin is already running it will not start again until the previous move is complete (thus its corresponding UserVar is deleted.)
* Fades are limited to 1 Hour, only for a sensible limit.
* Fades are currently always calculated in seconds.
* Spacing between arguments is optional but arguments must be delimited by comma ","
Expand All @@ -49,5 +49,5 @@ Additionally, if you have a long running fade that you need to abort you can del
`DelUserVar "FMS4"`

### Releases:
- 1.1.0.1 - Inital Release
- 1.1.0.1 - Initial Release
- 1.1.0.2 - Added no argument dialog, and some additional sanity checking.
4 changes: 2 additions & 2 deletions grandMA3/shared/resource/lib_plugins/KineticSet/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

Moves the selected fixture according to Incoming or Internal Art-Net

[Youtube Link](https://www.youtube.com/watch?v=iBeWw8SVQKE)
[YouTube Link](https://www.youtube.com/watch?v=iBeWw8SVQKE)

[![In Action](https://img.youtube.com/vi/iBeWw8SVQKE/0.jpg)](https://www.youtube.com/watch?v=iBeWw8SVQKE)

Expand Down Expand Up @@ -55,7 +55,7 @@ Things to-do:

- Add Distance Scale for Position X, Y, Z (Just need to code it up)
- Add `Call Plugin x "Store"` to Store the current positions in UserVars
- Add `Call Plugin x "Racall"` to put the fixtures back in their original position/rotations.
- Add `Call Plugin x "Recall"` to put the fixtures back in their original position/rotations.
- Change Start and Stop to UserVars to avoid conflicting plugins being out of sync.
- Fix BUGS!

Expand Down
6 changes: 3 additions & 3 deletions grandMA3/shared/resource/lib_plugins/Random Select/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Random Select v1.1.0.1
Please note that this will likly break in future version of the console. and to use at your own risk.
Please note that this will likely break in future version of the console. and to use at your own risk.

![Example Image](https://github.com/hossimo/GMA3Plugins/blob/master/Images/RandomSelect.gif)

Expand All @@ -9,8 +9,8 @@ Please note that this will likly break in future version of the console. and to
* Your selection is now in a random order, if you don't like the order call the selection again.

#### Releases:
1.0.0.1 - Inital release
1.0.0.2 - Makeing functions local
1.0.0.1 - Initial release
1.0.0.2 - Making functions local
1.1.0.1 - Fixes Selection of SubFixtures

#### Notes:
Expand Down
4 changes: 2 additions & 2 deletions grandMA3/shared/resource/lib_plugins/Rem Dim/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Based on your selection, sets the dimmer of _other_ fixtures to 0.

Using the plugin without arguments will restrict the operation to fixtures of the selected ID Type. The "All" argument will execute Rem Dim on ALL patched fixtures however Global Fixtures will be ignored.

Makes sensable selections so should work with any number of fixtures.
Makes sensible selections so should work with any number of fixtures.

### Note:

Expand Down Expand Up @@ -54,4 +54,4 @@ Result:
Fixtures 2 Thru 10 + Channel 2 Thru 10 At 0

### Releases:
- 1.1.0.1 - Inital Release
- 1.1.0.1 - Initial Release

0 comments on commit cb1b22b

Please sign in to comment.