1
0

programs_view

This commit is contained in:
2018-01-20 03:05:15 +01:00
parent 40ca6e8d96
commit b241500129
58 changed files with 737 additions and 109 deletions

View File

@@ -38,8 +38,8 @@ print();
print();
print('======== CALL SCSS ========');
out = subprocess.run(['C:/TOOLS/Ruby/bin/scss.bat', '--no-cache', '--update', fsource + ':' + finput], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
print('> C:/TOOLS/Ruby/bin/scss.bat --no-cache --update ' + fsource + ':' + finput)
out = subprocess.run(['scss.bat', '--no-cache', '--update', fsource + ':' + finput], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
print('> scss.bat --no-cache --update ' + fsource + ':' + finput)
print('STDOUT:')
print(out.stdout.decode('utf-8'))
print('STDERR:')
@@ -50,8 +50,8 @@ print('')
print('======== CALL YUI ========');
out = subprocess.run(['java', '-jar', 'yuicompressor.jar', finput, '-o', ftemp], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
print('> java -jar yuicompressor.jar "'+finput+'" -o "'+ftemp+'"')
out = subprocess.run(['java', '-jar', 'yuicompressor.jar', '--verbose', finput, '-o', ftemp], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
print('> java -jar yuicompressor.jar --verbose "'+finput+'" -o "'+ftemp+'"')
print('STDOUT:');
print(out.stdout.decode('utf-8'))
print('STDERR:');
@@ -63,6 +63,7 @@ print('')
print('======== READ ========');
with open(ftemp, 'r') as tf:
data = tf.read()
print(str(len(data)) + ' characters read from ' + ftemp)
print('')
print('')
@@ -70,6 +71,7 @@ print('')
print('======== REM ========');
try:
os.remove(ftemp);
print(ftemp + ' deleted')
except e:
print(e)
@@ -79,6 +81,8 @@ print('')
print('======== REGEX ========');
data = re.sub(r'(\}*\})', '\g<1>\n', data);
print('css data modified (1)')
print('')
print('')
@@ -99,6 +103,7 @@ for i in range(len(data)):
tp =(i+1, '\t')
ins.append( tp )
ins.append((cclose, '\n'))
print('media query at idx:' + str(i) + ' formatted')
for (l, c) in reversed(ins):
data = data[:l] + c + data[l:]
@@ -109,7 +114,8 @@ print('')
print('======== WRITE ========');
with open(foutput, "w") as tf:
tf.write(data)
print(str(len(data)) + ' characters written to ' + foutput)
print('')
print('')
print('Sinished.')
print('Finished.')

22
data/css_compress/scss Normal file
View File

@@ -0,0 +1,22 @@
#!C:/TOOLS/Ruby/bin/ruby.exe
#
# This file was generated by RubyGems.
#
# The application 'sass' is installed as part of a gem, and
# this file is here to facilitate running it.
#
require 'rubygems'
version = ">= 0.a"
if ARGV.first
str = ARGV.first
str = str.dup.force_encoding("BINARY") if str.respond_to? :force_encoding
if str =~ /\A_(.*)_\z/ and Gem::Version.correct?($1) then
version = $1
ARGV.shift
end
end
load Gem.bin_path('sass', 'scss', version)

View File

@@ -0,0 +1,6 @@
@ECHO OFF
IF NOT "%~f0" == "~f0" GOTO :WinNT
@"C:\TOOLS\Ruby\bin\ruby.exe" "C:/TOOLS/Ruby/bin/scss" %1 %2 %3 %4 %5 %6 %7 %8 %9
GOTO :EOF
:WinNT
@"C:\TOOLS\Ruby\bin\ruby.exe" "%~dpn0" %*