CSScheme icon indicating copy to clipboard operation
CSScheme copied to clipboard

Command line script

Open robeady opened this issue 6 years ago • 5 comments

I have created a command line script to run the converter outside of Sublime, csscheme.py.

I've also fixed a few things. I don't have Sublime Text, perhaps you can test whether it still functions correctly in Sublime? Is there in any harm in the script I have added being present or does it need to be moved elsewhere?

My motivation is wanting to develop vscode syntax themes (which must be in tmTheme format).

"Hidden" themes are not supported, I don't understand their purpose...

robeady avatar Jan 07 '18 17:01 robeady

Coverage Status

Coverage remained the same at 98.113% when pulling c7c0687e328b37e126cf587823cafb098647a18e on rjeady:command-line-script into 6575b53d2c40a64839f86e624af33bf86f6b8e34 on FichteFoll:master.

coveralls avatar Jan 07 '18 17:01 coveralls

The way you integrated the script will have significant effects onto the embedded environment in SublimeText due to overriding sys.modules["sublime"], but I have something else in mind for this. I intend to separat the actual functionality entirely (and submit it to pypi) and then just use its interface in Sublime Text. The functionality is largely independant anyway and most of the ST-specific stuff revolves around better and more verbose error formatting. I'll need to add a dumper for the new .sublime-color-scheme format anyway in the future. Fortunately the architecture allows for that pretty easily.

Thank you for the script regardless. This will probably be useful for that process.

Edit: Actually, since you use Python 3.6 syntax, the file will just fail to load and cause a SyntaxError on ST's console. So I guess it won't break stuff at least, but it's not the proper solution.

FichteFoll avatar Jan 07 '18 17:01 FichteFoll

Just fixed the import business, that was a workaround before I removed the dependency of the converters on sublime (by passing in the shell argument from the outside)

robeady avatar Jan 07 '18 17:01 robeady

Ah, is ST still on python 2? or just an older version of 3?

Obviously I don't want Sublime Text to even look at the command line script. Don't know if that's possible.

robeady avatar Jan 07 '18 18:01 robeady

ST3 uses Python 3.3.

I would honestly just refactor the whole thing. Your script will work for the time, I suppose, but I'll do something about it eventually.

FichteFoll avatar Jan 07 '18 18:01 FichteFoll