JetBrains / colorSchemeTool

Apache License 2.0
452 stars 81 forks source link

Conversion Error (line 31: Python: command not found) while converting Andromeda VSCode Theme #47

Open escapingSamsara opened 1 year ago

escapingSamsara commented 1 year ago

I was trying to convert the Andromeda VSCode theme (link: https://marketplace.visualstudio.com/items?itemName=EliverLara.andromeda) from JSON to icls via this tool.

Steps:

  1. Download ZIP, extracted colorSchemeTool
  2. copied downloaded JSON File into the vscThemes folder
  3. ran ./convert.sh

Error encountered (terminal output after ./convert.sh `converting ./vscThemes/Andromeda-colorizer.json to ./tmThemes/Andromeda-colorizer.tmTheme ... /home/USERNAME/Downloads/colorSchemeTool-master/vscToTm.js:43 if (fromKey in this.vscThemeColors) { ^

TypeError: Cannot use 'in' operator to search for 'editorCursor.foreground' in undefined at SettingsMapper.addSetting (/home/jakobpusterhofer/Downloads/colorSchemeTool-master/vscToTm.js:43:21) at convert (/home/jakobpusterhofer/Downloads/colorSchemeTool-master/vscToTm.js:21:12) at Object. (/home/jakobpusterhofer/Downloads/colorSchemeTool-master/vscToTm.js:50:47) at Module._compile (node:internal/modules/cjs/loader:1105:14) at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10) at Module.load (node:internal/modules/cjs/loader:981:32) at Function.Module._load (node:internal/modules/cjs/loader:822:12) at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12) at node:internal/main/run_main_module:17:47 converting ./vscThemes/Andromeda-color-theme-bordered.json to ./tmThemes/Andromeda-color-theme-bordered.tmTheme ... converting ./vscThemes/Andromeda-color-theme.json to ./tmThemes/Andromeda-color-theme.tmTheme ... converting ./vscThemes/Andromeda-italic-color-theme-bordered.json to ./tmThemes/Andromeda-italic-color-theme-bordered.tmTheme ... converting ./vscThemes/Andromeda-italic-color-theme.json to ./tmThemes/Andromeda-italic-color-theme.tmTheme ... converting ./vscThemes/Monokai.json to ./tmThemes/Monokai.tmTheme ... converting ./tmThemes/Active4D.tmTheme to ./intellijThemes/Active4D.icls ... ./convert.sh: line 31: python: command not found converting ./tmThemes/All Hallow's Eve.tmTheme to ./intellijThemes/All Hallow's Eve.icls ... ./convert.sh: line 31: python: command not found converting ./tmThemes/Amy.tmTheme to ./intellijThemes/Amy.icls ... ./convert.sh: line 31: python: command not found converting ./tmThemes/Andromeda-color-theme-bordered.tmTheme to ./intellijThemes/Andromeda-color-theme-bordered.icls ... ./convert.sh: line 31: python: command not found converting ./tmThemes/Andromeda-color-theme.tmTheme to ./intellijThemes/Andromeda-color-theme.icls ... ./convert.sh: line 31: python: command not found converting ./tmThemes/Andromeda-italic-color-theme-bordered.tmTheme to ./intellijThemes/Andromeda-italic-color-theme-bordered.icls ... ./convert.sh: line 31: python: command not found converting ./tmThemes/Andromeda-italic-color-theme.tmTheme to ./intellijThemes/Andromeda-italic-color-theme.icls ... ./convert.sh: line 31: python: command not found converting ./tmThemes/Blackboard.tmTheme to ./intellijThemes/Blackboard.icls ... ./convert.sh: line 31: python: command not found converting ./tmThemes/Cobalt.tmTheme to ./intellijThemes/Cobalt.icls ... ./convert.sh: line 31: python: command not found converting ./tmThemes/Dawn.tmTheme to ./intellijThemes/Dawn.icls ... ./convert.sh: line 31: python: command not found converting ./tmThemes/Eiffel.tmTheme to ./intellijThemes/Eiffel.icls ... ./convert.sh: line 31: python: command not found converting ./tmThemes/Espresso Libre.tmTheme to ./intellijThemes/Espresso Libre.icls ... ./convert.sh: line 31: python: command not found converting ./tmThemes/Github.tmTheme to ./intellijThemes/Github.icls ... ./convert.sh: line 31: python: command not found converting ./tmThemes/IDLE.tmTheme to ./intellijThemes/IDLE.icls ... ./convert.sh: line 31: python: command not found converting ./tmThemes/iPlastic.tmTheme to ./intellijThemes/iPlastic.icls ... ./convert.sh: line 31: python: command not found converting ./tmThemes/LAZY.tmTheme to ./intellijThemes/LAZY.icls ... ./convert.sh: line 31: python: command not found converting ./tmThemes/Mac Classic.tmTheme to ./intellijThemes/Mac Classic.icls ... ./convert.sh: line 31: python: command not found converting ./tmThemes/MagicWB (Amiga).tmTheme to ./intellijThemes/MagicWB (Amiga).icls ... ./convert.sh: line 31: python: command not found converting ./tmThemes/Monokai Bright.tmTheme to ./intellijThemes/Monokai Bright.icls ... ./convert.sh: line 31: python: command not found converting ./tmThemes/Monokai.tmTheme to ./intellijThemes/Monokai.icls ... ./convert.sh: line 31: python: command not found converting ./tmThemes/Pastels on Dark.tmTheme to ./intellijThemes/Pastels on Dark.icls ... ./convert.sh: line 31: python: command not found converting ./tmThemes/Railscasts.tmTheme to ./intellijThemes/Railscasts.icls ... ./convert.sh: line 31: python: command not found converting ./tmThemes/Slush & Poppies.tmTheme to ./intellijThemes/Slush & Poppies.icls ... ./convert.sh: line 31: python: command not found converting ./tmThemes/Solarized (Dark).tmTheme to ./intellijThemes/Solarized (Dark).icls ... ./convert.sh: line 31: python: command not found converting ./tmThemes/Solarized (Light).tmTheme to ./intellijThemes/Solarized (Light).icls ... ./convert.sh: line 31: python: command not found converting ./tmThemes/SpaceCadet.tmTheme to ./intellijThemes/SpaceCadet.icls ... ./convert.sh: line 31: python: command not found converting ./tmThemes/Sunburst.tmTheme to ./intellijThemes/Sunburst.icls ... ./convert.sh: line 31: python: command not found converting ./tmThemes/Twilight.tmTheme to ./intellijThemes/Twilight.icls ... ./convert.sh: line 31: python: command not found converting ./tmThemes/Zenburnesque.tmTheme to ./intellijThemes/Zenburnesque.icls ... ./convert.sh: line 31: python: command not found `

Anyone can help me with this ? Best wishes

escapingSamsara commented 1 year ago

managed to run the script (./convert.sh) after installing python2 package. with python and python3 i got an error.

So the files got converted, yet the colorscheme permanently reverts back to the last used webstorm theme, instead of keeping the theme colors.

RipVampiretto commented 4 months ago

regarding the "line 31: python: command not found" problem, just open convert.sh, go to line 31 and instead of python colorSchemeTool.py "$FILE" "$IJ_OUTDIR$BASE.icls" >> ./colorSchemeTool.log put python3 colorSchemeTool.py "$FILE" "$IJ_OUTDIR$BASE.icls" >> ./colorSchemeTool.log and you can use the script with Python 3. I solved it like this, but I ran into another problem: the theme was not converted correctly, or rather, some colors were, while others were not, did this happen to you too? I don't know about restoring the colors to the last theme, I also tried restarting WebStorm several times and it still remains.