-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4d322a6
commit 955c1fd
Showing
10 changed files
with
127 additions
and
95 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
import os | ||
import json | ||
import zipfile | ||
|
||
# Define selected folders | ||
selected_folders = ['scripts', 'styles', 'assets', 'templates', 'languages', 'packs', 'storage'] | ||
|
||
def read_module_json(): | ||
with open(file, 'r', encoding='utf-8') as file: | ||
data = json.load(file) | ||
module_id = data['id'] | ||
module_version = data['version'] | ||
return module_id, module_version | ||
|
||
def create_dist_folder(): | ||
if not os.path.exists('dist'): | ||
os.makedirs('dist') | ||
|
||
def add_folder_to_zip(zip_file, folder): | ||
if os.path.exists(folder): | ||
for root, dirs, files in os.walk(folder): | ||
for file in files: | ||
file_path = os.path.join(root, file) | ||
relative_path = os.path.relpath(file_path, folder) | ||
zip_file.write(file_path, os.path.join(folder, relative_path)) | ||
else: | ||
print(f"Warning: {folder} is missing. Skipping.") | ||
|
||
def create_zip(module_id, module_version, folders): | ||
zip_filename = f'dist/{module_id}-{module_version}.zip' | ||
with zipfile.ZipFile(zip_filename, 'w', zipfile.ZIP_DEFLATED) as zip_file: | ||
zip_file.write('module.json') | ||
|
||
for folder in folders: | ||
add_folder_to_zip(zip_file, folder) | ||
|
||
print(f"Zip file '{zip_filename}' created successfully.") | ||
|
||
def main(): | ||
module_id, module_version = read_module_json() | ||
create_dist_folder() | ||
|
||
create_zip(module_id, module_version, selected_folders) | ||
|
||
if __name__ == "__main__": | ||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,72 +1,72 @@ | ||
{ | ||
"title": "Wall Height", | ||
"id": "wall-height", | ||
"description": "Adds the ability to set wall height for walls so that tokens can look and move over them.", | ||
"version": "4.1.2", | ||
"authors": [ | ||
{ | ||
"name": "theripper93", | ||
"email": "[email protected]", | ||
"url": "https://theripper93.com/" | ||
}, | ||
{ | ||
"name": "Ian Murphy", | ||
"discord": "Erithtotl#5139" | ||
}, | ||
{ | ||
"name": "Cole Schultz", | ||
"discord": "cole#9640" | ||
} | ||
], | ||
"languages": [ | ||
{ | ||
"lang": "en", | ||
"name": "English", | ||
"path": "lang/en.json" | ||
}, | ||
{ | ||
"lang": "es", | ||
"name": "Español", | ||
"path": "lang/es.json" | ||
} | ||
], | ||
"esmodules": [ | ||
"scripts/wall-height.js" | ||
], | ||
"packs": [ | ||
{ | ||
"name": "wall-height-macros", | ||
"label": "Wall Height Macros", | ||
"path": "packs/macros.db", | ||
"type": "Macro", | ||
"private": false | ||
} | ||
], | ||
"styles": [ | ||
"styles/wall-height.css" | ||
], | ||
"url": "https://github.com/theripper93/wall-height", | ||
"manifest": "https://github.com/theripper93/wall-height/releases/latest/download/module.json", | ||
"download": "https://github.com/theripper93/wall-height/releases/download/4.1.1/module.zip", | ||
"relationships": { | ||
"requires": [ | ||
{ | ||
"id": "lib-wrapper", | ||
"type": "module", | ||
"compatibility": {} | ||
} | ||
], | ||
"recommends": [ | ||
{ | ||
"id": "theripper-premium-hub", | ||
"type": "module", | ||
"reason": "TheRipper93's Module Hub will alert you of critical updates and give you easy access to documentation in the configure settings screen", | ||
"compatibility": {} | ||
} | ||
] | ||
}, | ||
"compatibility": { | ||
"minimum": "11", | ||
"verified": "11" | ||
} | ||
{ | ||
"title": "Wall Height", | ||
"id": "wall-height", | ||
"description": "Adds the ability to set wall height for walls so that tokens can look and move over them.", | ||
"version": "4.1.2", | ||
"authors": [ | ||
{ | ||
"name": "theripper93", | ||
"email": "[email protected]", | ||
"url": "https://theripper93.com/" | ||
}, | ||
{ | ||
"name": "Ian Murphy", | ||
"discord": "Erithtotl#5139" | ||
}, | ||
{ | ||
"name": "Cole Schultz", | ||
"discord": "cole#9640" | ||
} | ||
], | ||
"languages": [ | ||
{ | ||
"lang": "en", | ||
"name": "English", | ||
"path": "lang/en.json" | ||
}, | ||
{ | ||
"lang": "es", | ||
"name": "Español", | ||
"path": "lang/es.json" | ||
} | ||
], | ||
"esmodules": [ | ||
"scripts/wall-height.js" | ||
], | ||
"packs": [ | ||
{ | ||
"name": "wall-height-macros", | ||
"label": "Wall Height Macros", | ||
"path": "packs/macros.db", | ||
"type": "Macro", | ||
"private": false | ||
} | ||
], | ||
"styles": [ | ||
"styles/wall-height.css" | ||
], | ||
"url": "https://github.com/theripper93/wall-height", | ||
"manifest": "https://github.com/theripper93/wall-height/releases/latest/download/module.json", | ||
"download": "https://github.com/theripper93/wall-height/releases/download/4.1.1/module.zip", | ||
"relationships": { | ||
"requires": [ | ||
{ | ||
"id": "lib-wrapper", | ||
"type": "module", | ||
"compatibility": {} | ||
} | ||
], | ||
"recommends": [ | ||
{ | ||
"id": "theripper-premium-hub", | ||
"type": "module", | ||
"reason": "TheRipper93's Module Hub will alert you of critical updates and give you easy access to documentation in the configure settings screen", | ||
"compatibility": {} | ||
} | ||
] | ||
}, | ||
"compatibility": { | ||
"minimum": "11", | ||
"verified": "11" | ||
} | ||
} |
Binary file not shown.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
MANIFEST-001272 | ||
MANIFEST-000002 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1 @@ | ||
2023/11/28-12:34:53.636 7094 Recovering log #1271 | ||
2023/11/28-12:34:53.639 7094 Delete type=0 #1271 | ||
2023/11/28-12:34:53.639 7094 Delete type=3 #1270 | ||
2023/12/03-12:44:47.360 13cc0 Delete type=3 #1 |
This file was deleted.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters