Skip to content

Commit

Permalink
spaces converted to underscores in Submission Tree tool. Issue 114
Browse files Browse the repository at this point in the history
  • Loading branch information
ethoms-usgs committed Aug 6, 2024
1 parent 0a85f11 commit 87b4fb4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
Binary file modified GeMS_Tools.tbx
Binary file not shown.
4 changes: 3 additions & 1 deletion Scripts/GeMS_SubmissionTree.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
import subprocess
from pathlib import Path

version_string = "GeMS_SubmissionTree.py, version of 4/30/2024 "
version_string = "GeMS_SubmissionTree.py, version of 8/6/2024 "
rawurl = "https://raw.githubusercontent.com/DOI-USGS/gems-tools-pro/master/Scripts/GeMS_SubmissionTree.py"
guf.checkVersion(version_string, rawurl, "gems-tools-pro")

Expand Down Expand Up @@ -146,12 +146,14 @@ def write_readme(f_path, readme_list):
postal_code = arcpy.GetParameterAsText(1)
year = arcpy.GetParameterAsText(2)
mapped_area = arcpy.GetParameterAsText(3)
mapped_area = mapped_area.replace(" ", "_")

if arcpy.GetParameterAsText(4) != "#":
version = arcpy.GetParameterAsText(4)
else:
version = ""

version = version.replace(" ", "_")
basedata = guf.convert_bool(arcpy.GetParameterAsText(5))

make_tree(parent_dir, postal_code, year, mapped_area, version, basedata)
6 changes: 3 additions & 3 deletions Scripts/gems_mkdir.bat
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,18 @@ if not %argC%==3 (
)

set parent=%~1
set fullname=%2
set fullname=%~2
set basedata=%3

REM top-level submittal folder and fullname child folder
mkdir "%parent%/%fullname%-submittal/%fullname%"
mkdir "%parent%/%fullname%-submittal/%fullname%

REM database folder
mkdir "%parent%/%fullname%-submittal/%fullname%/%fullname%-database
mkdir "%parent%/%fullname%-submittal/%fullname%/%fullname%-database/resources

REM Include a basedata folder?
if "%basedata%"=="y" (
if "%basedata%"=="y"
mkdir "%parent%/%fullname%-submittal/%fullname%/%fullname%-database/basedata
mkdir "%parent%/%fullname%-submittal/%fullname%/%fullname%-database/basedata/resources
)

0 comments on commit 87b4fb4

Please sign in to comment.