Batch script Pipedream for compiling all localizations in a Mods folder for 7 Days to Die





Batch Script Pipedream for Localization (as of 17.x)

  Needs to do the following:
  • Recognize the structure of the Mods folder in 7 days to die
  • Recognize and remember the name for the different mods in the mod folder 
  •  if folder in the Mods folder contains a localization file in any of it subfolders
    • add the modfoldername that makes any spaces in the name a _
    • add this modified modfoldername to the beginning of every localization line that follows proceeds a line that ends with ,,,,,
  • compile this into a master localization mod list and append the main localization
  • when ran again if it does not find a modfoldername that was previously added it will delete any of the related localizations that were attributed to that file.
Example

Mods> does mod contain localization in folder
Mods containing localization.txt in base directory=
  >mod1 name
  >mod2 name is
  >mod3 name is longer
  >mod4_Name_already_awesome
  >mod5 name_not as awesome
  >mod6 - whats in a - name

print list of Mods> containing localization.txt and replace space with _ and suffix with _
 mod1_name_
 mod2_name_is_
 mod3_name_is_longer_
 mod4_Name_already_awesome_
 Mod6_-_whats_in_a_-_name_

Print list of localization.txt from each mod that has a line that ends with ,,,,,
  prefix each line with appended mod name

Take appended modmaster localization.txt and append the main localization.txt





Research related to creating this Batch
  • https://superuser.com/questions/490306/how-do-i-copy-all-file-names-in-a-folder-to-notepad
    • (for %F in (*) do @echo %~dpnxF)|sort >filelist.txt
    • dir /a /b /-p /o:gen >names.txt






Comments