diff --git a/add-gpl-header.sh b/add-gpl-header.sh new file mode 100644 index 0000000..fe20142 --- /dev/null +++ b/add-gpl-header.sh @@ -0,0 +1,47 @@ +#!/bin/bash + +# Directory to start searching from (default to current directory) +DIR="${1:-.}" + +# Define the GPLv3 header content +GPL_HEADER="Macrame is a program that enables the user to create keyboard macros and button panels. +The macros are saved as simple JSON files and can be linked to the button panels. The panels can +be created with HTML and CSS. + +Copyright (C) 2025 Jesse Malotaux + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see ." + +# Loop through all files in the directory (and subdirectories), excluding node_modules +find "$DIR" \( -iname \*.go -o \( -path "$DIR/fe/src/*.js" -o -path "$DIR/fe/src/*.vue" -o -path "$DIR/fe/src/*.css" \) \) ! -path "*/node_modules/*" | while read file +do + # Check if the file already has a GPL header + if ! grep -q "Copyright (C) 2025 Jesse Malotaux" "$file"; then + # Check if it's a Vue file and handle it carefully + if [[ "$file" == *.vue ]]; then + echo "Adding GPL header to: $file" + # Prepend the GPL header to Vue files as raw text + # Make sure we don't add comment marks that break Vue syntax + echo -e "\n\n$(cat "$file")" > "$file" + else + echo "Adding GPL header to: $file" + # Prepend the GPL header to other files (go, js, ts, etc.) as comments + echo -e "/*\n$GPL_HEADER\n*/\n\n$(cat "$file")" > "$file" + fi + else + echo "GPL header already present in: $file" + fi +done + +echo "GPL header addition complete!" diff --git a/be/app/api.go b/be/app/api.go index e6f4166..7f2ebc0 100644 --- a/be/app/api.go +++ b/be/app/api.go @@ -1,3 +1,24 @@ +/* +Macrame is a program that enables the user to create keyboard macros and button panels. +The macros are saved as simple JSON files and can be linked to the button panels. The panels can +be created with HTML and CSS. + +Copyright (C) 2025 Jesse Malotaux + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + package app import ( diff --git a/be/app/device.go b/be/app/device.go index d0c169e..8c83f43 100644 --- a/be/app/device.go +++ b/be/app/device.go @@ -1,3 +1,24 @@ +/* +Macrame is a program that enables the user to create keyboard macros and button panels. +The macros are saved as simple JSON files and can be linked to the button panels. The panels can +be created with HTML and CSS. + +Copyright (C) 2025 Jesse Malotaux + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + package app import ( diff --git a/be/app/helper/api-helper.go b/be/app/helper/api-helper.go index ce91eea..10f1bfb 100644 --- a/be/app/helper/api-helper.go +++ b/be/app/helper/api-helper.go @@ -1,3 +1,24 @@ +/* +Macrame is a program that enables the user to create keyboard macros and button panels. +The macros are saved as simple JSON files and can be linked to the button panels. The panels can +be created with HTML and CSS. + +Copyright (C) 2025 Jesse Malotaux + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + package helper import ( diff --git a/be/app/helper/browser-helper.go b/be/app/helper/browser-helper.go index 579bc9e..5b2e3d0 100644 --- a/be/app/helper/browser-helper.go +++ b/be/app/helper/browser-helper.go @@ -1,3 +1,24 @@ +/* +Macrame is a program that enables the user to create keyboard macros and button panels. +The macros are saved as simple JSON files and can be linked to the button panels. The panels can +be created with HTML and CSS. + +Copyright (C) 2025 Jesse Malotaux + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + package helper import ( diff --git a/be/app/helper/device-helper.go b/be/app/helper/device-helper.go index b0cd334..30d7c56 100644 --- a/be/app/helper/device-helper.go +++ b/be/app/helper/device-helper.go @@ -1,3 +1,24 @@ +/* +Macrame is a program that enables the user to create keyboard macros and button panels. +The macros are saved as simple JSON files and can be linked to the button panels. The panels can +be created with HTML and CSS. + +Copyright (C) 2025 Jesse Malotaux + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + package helper import ( diff --git a/be/app/helper/encrypt-helper.go b/be/app/helper/encrypt-helper.go index 551ac3f..ad883c5 100644 --- a/be/app/helper/encrypt-helper.go +++ b/be/app/helper/encrypt-helper.go @@ -1,3 +1,24 @@ +/* +Macrame is a program that enables the user to create keyboard macros and button panels. +The macros are saved as simple JSON files and can be linked to the button panels. The panels can +be created with HTML and CSS. + +Copyright (C) 2025 Jesse Malotaux + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + package helper import ( diff --git a/be/app/helper/env-helper.go b/be/app/helper/env-helper.go index 9fc3c9b..848a78b 100644 --- a/be/app/helper/env-helper.go +++ b/be/app/helper/env-helper.go @@ -1,3 +1,24 @@ +/* +Macrame is a program that enables the user to create keyboard macros and button panels. +The macros are saved as simple JSON files and can be linked to the button panels. The panels can +be created with HTML and CSS. + +Copyright (C) 2025 Jesse Malotaux + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + package helper import ( diff --git a/be/app/helper/macro-helper.go b/be/app/helper/macro-helper.go index ca990b5..a49dc57 100644 --- a/be/app/helper/macro-helper.go +++ b/be/app/helper/macro-helper.go @@ -1,3 +1,24 @@ +/* +Macrame is a program that enables the user to create keyboard macros and button panels. +The macros are saved as simple JSON files and can be linked to the button panels. The panels can +be created with HTML and CSS. + +Copyright (C) 2025 Jesse Malotaux + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + package helper import ( @@ -14,7 +35,8 @@ import ( func FormatMacroFileName(s string) string { // Remove invalid characters - re := regexp.MustCompile(`[\/\?\*\>\<\:\\"\|\n]`) + re := regexp.MustCompile(`[\/\?\*\>\<\:\"\| +]`) s = re.ReplaceAllString(s, "") // Replace spaces with underscores diff --git a/be/app/helper/translation-helper.go b/be/app/helper/translation-helper.go index b0207f1..2bb9983 100644 --- a/be/app/helper/translation-helper.go +++ b/be/app/helper/translation-helper.go @@ -1,3 +1,24 @@ +/* +Macrame is a program that enables the user to create keyboard macros and button panels. +The macros are saved as simple JSON files and can be linked to the button panels. The panels can +be created with HTML and CSS. + +Copyright (C) 2025 Jesse Malotaux + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + package helper import ( @@ -50,8 +71,8 @@ var translations = map[string]string{ "Quote": "'", "Semicolon": ";", "Backquote": "`", - "Backslash": "\\", - "IntlBackslash": "\\", + "Backslash": "\", + "IntlBackslash": "\", "Slash": "/", "Comma": ",", "Period": ".", @@ -67,7 +88,7 @@ func Translate(code string) string { } func ReverseTranslate(name string) string { - if name == "\\" { + if name == "\" { return "Backslash" } @@ -126,8 +147,8 @@ func ReverseTranslate(name string) string { // "Quote": "'", // "Semicolon": ";", // "Backquote": "`", -// "Backslash": "\\", -// "IntlBackslash": "\\", +// "Backslash": "\", +// "IntlBackslash": "\", // "Slash": "/", // "Comma": ",", // "Period": ".", diff --git a/be/app/log.go b/be/app/log.go index e7202bd..894d1da 100644 --- a/be/app/log.go +++ b/be/app/log.go @@ -1,3 +1,24 @@ +/* +Macrame is a program that enables the user to create keyboard macros and button panels. +The macros are saved as simple JSON files and can be linked to the button panels. The panels can +be created with HTML and CSS. + +Copyright (C) 2025 Jesse Malotaux + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + package app import ( diff --git a/be/app/macro.go b/be/app/macro.go index 84b289a..0b9f254 100644 --- a/be/app/macro.go +++ b/be/app/macro.go @@ -1,3 +1,24 @@ +/* +Macrame is a program that enables the user to create keyboard macros and button panels. +The macros are saved as simple JSON files and can be linked to the button panels. The panels can +be created with HTML and CSS. + +Copyright (C) 2025 Jesse Malotaux + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + package app import ( diff --git a/be/app/panel.go b/be/app/panel.go index d402f6b..e642ce4 100644 --- a/be/app/panel.go +++ b/be/app/panel.go @@ -1,3 +1,24 @@ +/* +Macrame is a program that enables the user to create keyboard macros and button panels. +The macros are saved as simple JSON files and can be linked to the button panels. The panels can +be created with HTML and CSS. + +Copyright (C) 2025 Jesse Malotaux + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + package app import ( diff --git a/be/app/structs/api-struct.go b/be/app/structs/api-struct.go index 0a77ac8..7fc7889 100644 --- a/be/app/structs/api-struct.go +++ b/be/app/structs/api-struct.go @@ -1,3 +1,24 @@ +/* +Macrame is a program that enables the user to create keyboard macros and button panels. +The macros are saved as simple JSON files and can be linked to the button panels. The panels can +be created with HTML and CSS. + +Copyright (C) 2025 Jesse Malotaux + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + package structs type Allowed struct { diff --git a/be/app/structs/device-struct.go b/be/app/structs/device-struct.go index 39586cd..dcad84b 100644 --- a/be/app/structs/device-struct.go +++ b/be/app/structs/device-struct.go @@ -1,3 +1,24 @@ +/* +Macrame is a program that enables the user to create keyboard macros and button panels. +The macros are saved as simple JSON files and can be linked to the button panels. The panels can +be created with HTML and CSS. + +Copyright (C) 2025 Jesse Malotaux + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + package structs type Settings struct { diff --git a/be/app/structs/macro-struct.go b/be/app/structs/macro-struct.go index 71120b4..94e1fef 100644 --- a/be/app/structs/macro-struct.go +++ b/be/app/structs/macro-struct.go @@ -1,3 +1,24 @@ +/* +Macrame is a program that enables the user to create keyboard macros and button panels. +The macros are saved as simple JSON files and can be linked to the button panels. The panels can +be created with HTML and CSS. + +Copyright (C) 2025 Jesse Malotaux + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + package structs type MacroRequest struct { diff --git a/be/app/structs/panel-struct.go b/be/app/structs/panel-struct.go index df17b88..7d1bb97 100644 --- a/be/app/structs/panel-struct.go +++ b/be/app/structs/panel-struct.go @@ -1,3 +1,24 @@ +/* +Macrame is a program that enables the user to create keyboard macros and button panels. +The macros are saved as simple JSON files and can be linked to the button panels. The panels can +be created with HTML and CSS. + +Copyright (C) 2025 Jesse Malotaux + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + package structs type PanelJSON struct { diff --git a/be/main.go b/be/main.go index c367cef..383340c 100644 --- a/be/main.go +++ b/be/main.go @@ -1,3 +1,24 @@ +/* +Macrame is a program that enables the user to create keyboard macros and button panels. +The macros are saved as simple JSON files and can be linked to the button panels. The panels can +be created with HTML and CSS. + +Copyright (C) 2025 Jesse Malotaux + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + package main import ( diff --git a/be/setup/setup.go b/be/setup/setup.go index f6938b2..5ca5505 100644 --- a/be/setup/setup.go +++ b/be/setup/setup.go @@ -1,3 +1,24 @@ +/* +Macrame is a program that enables the user to create keyboard macros and button panels. +The macros are saved as simple JSON files and can be linked to the button panels. The panels can +be created with HTML and CSS. + +Copyright (C) 2025 Jesse Malotaux + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + package main import "be/app/helper" diff --git a/fe/src/App.vue b/fe/src/App.vue index d25eb83..99eb1ba 100644 --- a/fe/src/App.vue +++ b/fe/src/App.vue @@ -1,3 +1,24 @@ + +