diff --git a/.gitignore b/.gitignore index 43bef57..6ed4df6 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,8 @@ -.idea demos -#www/images/programs -workspace.xml *.secret -.idea/ runtime/ + +**/.idea/workspace.xml +**/.idea/tasks.xml + +**/.idea/dataSources* \ No newline at end of file diff --git a/.idea/.name b/.idea/.name new file mode 100644 index 0000000..7d709dc --- /dev/null +++ b/.idea/.name @@ -0,0 +1 @@ +www.mikescher.de \ No newline at end of file diff --git a/.idea/Source.iml b/.idea/Source.iml new file mode 100644 index 0000000..c956989 --- /dev/null +++ b/.idea/Source.iml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/codeStyleSettings.xml b/.idea/codeStyleSettings.xml new file mode 100644 index 0000000..965792d --- /dev/null +++ b/.idea/codeStyleSettings.xml @@ -0,0 +1,13 @@ + + + + + + \ No newline at end of file diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml new file mode 100644 index 0000000..b3295c5 --- /dev/null +++ b/.idea/codeStyles/Project.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/.idea/codeStyles/codeStyleConfig.xml b/.idea/codeStyles/codeStyleConfig.xml new file mode 100644 index 0000000..a55e7a1 --- /dev/null +++ b/.idea/codeStyles/codeStyleConfig.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/.idea/copyright/profiles_settings.xml b/.idea/copyright/profiles_settings.xml new file mode 100644 index 0000000..e7bedf3 --- /dev/null +++ b/.idea/copyright/profiles_settings.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/.idea/deployment.xml b/.idea/deployment.xml new file mode 100644 index 0000000..b4bc9e2 --- /dev/null +++ b/.idea/deployment.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/dictionaries/Mike.xml b/.idea/dictionaries/Mike.xml new file mode 100644 index 0000000..2fe4951 --- /dev/null +++ b/.idea/dictionaries/Mike.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/.idea/encodings.xml b/.idea/encodings.xml new file mode 100644 index 0000000..e206d70 --- /dev/null +++ b/.idea/encodings.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/.idea/frameworkRootSettings.xml b/.idea/frameworkRootSettings.xml new file mode 100644 index 0000000..91f96f9 --- /dev/null +++ b/.idea/frameworkRootSettings.xml @@ -0,0 +1,19 @@ + + + + + + + diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml new file mode 100644 index 0000000..c66df00 --- /dev/null +++ b/.idea/inspectionProfiles/Project_Default.xml @@ -0,0 +1,11 @@ + + + + \ No newline at end of file diff --git a/.idea/inspectionProfiles/profiles_settings.xml b/.idea/inspectionProfiles/profiles_settings.xml new file mode 100644 index 0000000..3b31283 --- /dev/null +++ b/.idea/inspectionProfiles/profiles_settings.xml @@ -0,0 +1,7 @@ + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..28a804d --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..30c3b65 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/scopes/scope_settings.xml b/.idea/scopes/scope_settings.xml new file mode 100644 index 0000000..922003b --- /dev/null +++ b/.idea/scopes/scope_settings.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/.idea/sqldialects.xml b/.idea/sqldialects.xml new file mode 100644 index 0000000..56782ca --- /dev/null +++ b/.idea/sqldialects.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..c80f219 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,7 @@ + + + + + + + diff --git a/.idea/watcherTasks.xml b/.idea/watcherTasks.xml new file mode 100644 index 0000000..e6dd317 --- /dev/null +++ b/.idea/watcherTasks.xml @@ -0,0 +1,45 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/www.mikescher.de.iml b/.idea/www.mikescher.de.iml new file mode 100644 index 0000000..547ac33 --- /dev/null +++ b/.idea/www.mikescher.de.iml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/data/css_compress/compress.py b/data/css_compress/compress.py index 76dedf5..01f7826 100644 --- a/data/css_compress/compress.py +++ b/data/css_compress/compress.py @@ -24,39 +24,64 @@ def countnl(str, start, end): if (str[i] == '\n'): cnt = cnt+1; return cnt; -finput = str.replace(sys.argv[1], '\\', '/') -foutput = str.replace(sys.argv[2], '\\', '/') +fsource = str.replace(sys.argv[1], '\\', '/') # scss +finput = str.replace(sys.argv[2], '\\', '/') # css +foutput = str.replace(sys.argv[3], '\\', '/') # min.css ftemp = '__temp_compresss_py_yui.tmp.css'; print('======== INPUT ========'); print(); +print(fsource); print(finput); print(foutput); 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) +print('STDOUT:') +print(out.stdout.decode('utf-8')) +print('STDERR:') +print(out.stderr.decode('utf-8')) -print('======== CALL ========'); -#os.system("java -jar yuicompressor.jar \""+finput+"\" -o \""+ftemp+"\"") +print('') +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+'"') print('STDOUT:'); print(out.stdout.decode('utf-8')) print('STDERR:'); print(out.stderr.decode('utf-8')) +print('') +print('') + print('======== READ ========'); with open(ftemp, 'r') as tf: data = tf.read() +print('') +print('') + print('======== REM ========'); try: os.remove(ftemp); except e: print(e) +print('') +print('') + print('======== REGEX ========'); data = re.sub(r'(\}*\})', '\g<1>\n', data); +print('') +print('') + print('======== MEDIA ========'); ins = [] for i in range(len(data)): @@ -78,6 +103,13 @@ for i in range(len(data)): for (l, c) in reversed(ins): data = data[:l] + c + data[l:] +print('') +print('') + print('======== WRITE ========'); with open(foutput, "w") as tf: - tf.write(data) \ No newline at end of file + tf.write(data) + +print('') +print('') +print('Sinished.')