diff --git a/cmd.bat b/cmd.bat index 14d136d..53d912e 100644 --- a/cmd.bat +++ b/cmd.bat @@ -1,3 +1,28 @@ +:: # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # +:: # +:: software : ImpraStorage # +:: version : 0.7 # +:: date : 2012 # +:: licence : GPLv3.0 # +:: author : a-Sansara # +:: copyright : pluie.org # +:: # +:: # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # +:: +:: This file is part of ImpraStorage. +:: +:: ImpraStorage is free software (free as in speech) : you can redistribute it +:: and/or modify it under the terms of the GNU General Public License as +:: published by the Free Software Foundation, either version 3 of the License, +:: or (at your option) any later version. +:: +:: ImpraStorage is distributed in the hope that it will be useful, but WITHOUT +:: ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +:: FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +:: more details. +:: +:: You should have received a copy of the GNU General Public License +:: along with ImpraStorage. If not, see . @echo off TITLE ImpraStorage (GNU GPLv3) set cmd='' diff --git a/impra/cli.py b/impra/cli.py index def3198..b715ff9 100644 --- a/impra/cli.py +++ b/impra/cli.py @@ -3,7 +3,7 @@ # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # software : ImpraStorage # -# version : 0.6 # +# version : 0.7 # # date : 2012 # # licence : GPLv3.0 # # author : a-Sansara # diff --git a/impra/core.py b/impra/core.py index c84f943..c0944c4 100644 --- a/impra/core.py +++ b/impra/core.py @@ -3,7 +3,7 @@ # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # software : ImpraStorage # -# version : 0.6 # +# version : 0.7 # # date : 2012 # # licence : GPLv3.0 # # author : a-Sansara # diff --git a/impra/crypt.py b/impra/crypt.py index f937fbb..38f5111 100644 --- a/impra/crypt.py +++ b/impra/crypt.py @@ -3,7 +3,7 @@ # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # software : ImpraStorage # -# version : 0.4 # +# version : 0.7 # # date : 2012 # # licence : GPLv3.0 # # author : a-Sansara # diff --git a/impra/imap.py b/impra/imap.py index 9c2405d..f3c5120 100644 --- a/impra/imap.py +++ b/impra/imap.py @@ -3,7 +3,7 @@ # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # software : ImpraStorage # -# version : 0.6 # +# version : 0.7 # # date : 2012 # # licence : GPLv3.0 # # author : a-Sansara # diff --git a/impra/util.py b/impra/util.py index 9254aef..e62810f 100644 --- a/impra/util.py +++ b/impra/util.py @@ -3,7 +3,7 @@ # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # software : ImpraStorage # -# version : 0.6 # +# version : 0.7 # # date : 2012 # # licence : GPLv3.0 # # author : a-Sansara # diff --git a/impra/w32color.py b/impra/w32color.py index 1c65155..6d275d5 100644 --- a/impra/w32color.py +++ b/impra/w32color.py @@ -1,3 +1,31 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- +# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # +# # +# software : ImpraStorage # +# version : 0.7 # +# date : 2012 # +# licence : GPLv3.0 # +# author : a-Sansara # +# copyright : pluie.org # +# # +# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # +# +# This file is part of ImpraStorage. +# +# ImpraStorage is free software (free as in speech) : you can redistribute it +# and/or modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation, either version 3 of the License, +# or (at your option) any later version. +# +# ImpraStorage is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +# more details. +# +# You should have received a copy of the GNU General Public License +# along with ImpraStorage. If not, see . + """ Colors text in console mode application (win32). Uses ctypes and Win32 methods SetConsoleTextAttribute and @@ -6,19 +34,19 @@ GetConsoleScreenBufferInfo. $Id: color_console.py 534 2009-05-10 04:00:59Z andre $ """ -from ctypes import windll, Structure, c_short as SHORT, c_ushort as WORD, byref +from ctypes import windll, Structure as Struct, c_short as SHORT, c_ushort as WORD, byref -class COORD(Structure): +class Coord(Struct): """struct in wincon.h.""" _fields_ = [("X", SHORT),("Y", SHORT)] -class SMALL_RECT(Structure): +class SmallRect(Struct): """struct in wincon.h.""" _fields_ = [("Left", SHORT),("Top", SHORT),("Right", SHORT),("Bottom", SHORT)] -class CONSOLE_SCREEN_BUFFER_INFO(Structure): +class ConsoleScreenBufferInfo(Struct): """struct in wincon.h.""" - _fields_ = [("dwSize", COORD),("dwCursorPosition", COORD),("wAttributes", WORD),("srWindow", SMALL_RECT),("dwMaximumWindowSize", COORD)] + _fields_ = [("dwSize", Coord),("dwCursorPosition", Coord),("wAttributes", WORD),("srWindow", SmallRect),("dwMaximumWindowSize", Coord)] # winbase.h STD_INPUT_HANDLE = -10 @@ -32,7 +60,7 @@ GetConsoleScreenBufferInfo = windll.kernel32.GetConsoleScreenBufferInfo def get_text_attr(): """Returns the character attributes (colors) of the console screen buffer.""" - csbi = CONSOLE_SCREEN_BUFFER_INFO() + csbi = ConsoleScreenBufferInfo() GetConsoleScreenBufferInfo(stdout_handle, byref(csbi)) return csbi.wAttributes diff --git a/imprastorage.py b/imprastorage.py index 8113f3d..236c008 100644 --- a/imprastorage.py +++ b/imprastorage.py @@ -3,7 +3,7 @@ # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # software : ImpraStorage # -# version : 0.6 # +# version : 0.7 # # date : 2012 # # licence : GPLv3.0 # # author : a-Sansara # diff --git a/launcher.bat b/launcher.bat index 4c40a2b..66d2e07 100644 --- a/launcher.bat +++ b/launcher.bat @@ -1,3 +1,28 @@ +:: # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # +:: # +:: software : ImpraStorage # +:: version : 0.7 # +:: date : 2012 # +:: licence : GPLv3.0 # +:: author : a-Sansara # +:: copyright : pluie.org # +:: # +:: # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # +:: +:: This file is part of ImpraStorage. +:: +:: ImpraStorage is free software (free as in speech) : you can redistribute it +:: and/or modify it under the terms of the GNU General Public License as +:: published by the Free Software Foundation, either version 3 of the License, +:: or (at your option) any later version. +:: +:: ImpraStorage is distributed in the hope that it will be useful, but WITHOUT +:: ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +:: FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +:: more details. +:: +:: You should have received a copy of the GNU General Public License +:: along with ImpraStorage. If not, see . @Echo Off Set _Title=ImpraStorage Set _Height=60 @@ -19,4 +44,4 @@ Reg Add "HKCU\Console\%~5" /V ScreenColors /T REG_DWORD /D 0x%2 /F Reg Add "HKCU\Console\%~5" /V WindowPosition /T REG_DWORD /D %3 /F Reg Add "HKCU\Console\%~5" /V WindowSize /T REG_DWORD /D %4 /F Start "%~5" %COMSPEC% /K %6 -exit \ No newline at end of file +exit diff --git a/setup_build.py b/setup_build.py index e0eb1d6..e4c211d 100644 --- a/setup_build.py +++ b/setup_build.py @@ -1,3 +1,31 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- +# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # +# # +# software : ImpraStorage # +# version : 0.7 # +# date : 2012 # +# licence : GPLv3.0 # +# author : a-Sansara # +# copyright : pluie.org # +# # +# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # +# +# This file is part of ImpraStorage. +# +# ImpraStorage is free software (free as in speech) : you can redistribute it +# and/or modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation, either version 3 of the License, +# or (at your option) any later version. +# +# ImpraStorage is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +# more details. +# +# You should have received a copy of the GNU General Public License +# along with ImpraStorage. If not, see . + import sys from cx_Freeze import setup, Executable @@ -31,7 +59,7 @@ if 'bdist_msi' in sys.argv: ) setup( name="ImpraStorage.exe", - version="0.6", + version="0.7", author="a-Sansara", description="ImpraStorage provided a private imap access to store large files. License GNU GPLv3 Copyright 2012 pluie.org", executables=[exe], @@ -43,7 +71,7 @@ if 'bdist_msi' in sys.argv: else : setup( name = "ImpraStorage", - version = "0.5", + version = "0.7", description = "ImpraStorage provided a private imap access to store large files", options = {"build_exe": build_exe_options}, executables = [Executable("imprastorage.py", base=base)]) diff --git a/test.py b/test.py new file mode 100644 index 0000000..f800124 --- /dev/null +++ b/test.py @@ -0,0 +1,116 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- +# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # +# # +# software : ImpraStorage # +# version : 0.4 # +# date : 2012 # +# licence : GPLv3.0 # +# author : a-Sansara # +# copyright : pluie.org # +# # +# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # +# +# This file is part of ImpraStorage. +# +# ImpraStorage is free software (free as in speech) : you can redistribute it +# and/or modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation, either version 3 of the License, +# or (at your option) any later version. +# +# ImpraStorage is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +# more details. +# +# You should have received a copy of the GNU General Public License +# along with ImpraStorage. If not, see . + +from impra.core import ImpraConf, ImpraStorage +from impra.util import IniFile, RuTime, get_file_path, PColor +from impra.cli import Cli +import sys, os + +if __name__ == '__main__': + #~ try : + #~ print('\033[1;30mGray like Ghost\033[1;m') + #~ print('\033[1;31mRed like Radish\033[1;m') + #~ print('\033[1;32mGreen like Grass\033[1;m') + #~ print('\033[1;33mYellow like Yolk\033[1;m') + #~ print('\033[1;34mBlue like Blood\033[1;m') + #~ print('\033[1;35mMagenta like Mimosa\033[1;m') + #~ print('\033[1;36mCyan like Caribbean\033[1;m') + #~ print('\033[1;37mWhite like Whipped Cream\033[1;m') + #~ print('\033[1;38mCrimson like Chianti\033[1;m') + #~ print('\033[1;41mHighlighted Red like Radish\033[1;m') + #~ print('\033[1;42mHighlighted Green like Grass\033[1;m') + #~ print('\033[1;43mHighlighted Brown like Bear\033[1;m') + #~ print('\033[1;44mHighlighted Blue like Blood\033[1;m') + #~ print('\033[1;45mHighlighted Magenta like Mimosa\033[1;m') + #~ print('\033[1;46mHighlighted Cyan like Caribbean\033[1;m') + #~ print('\033[1;47mHighlighted Gray like Ghost\033[1;m') + #~ print('\033[1;48mHighlighted Crimson like Chianti\033[1;m') + from re import finditer as regfinditer + data = ' ==> MaClasse.maMethod "mon param","other Param" ' + qp = (int(a.start()) for a in list(regfinditer('\(', data))) + print(data) + print([m.start() for m in regfinditer('"', data)]) + sp = [m.start() for m in regfinditer('\(', data)] + ep = [m.start() for m in regfinditer('\)', data)] + + Clz = PColor() + if len(sp) > 0 : + Clz.print(data[:sp[0]+1], Clz.fgb3, False) + Clz.print(data[sp[0]+1:ep[0]], Clz.fgn2, False) + Clz.print(data[ep[0]:], Clz.fgb3, False) + else: Clz.print(data, Clz.fgb2, False) + #~ clz.print(' -- ImpraStorage -- ',clz.BG4+clz.fgB3,False,True) + #~ clz.print(' [',clz.fgB0,False) + #~ clz.print('account',clz.fgB3,False) + #~ clz.print(':',clz.fgB0,False) + #~ clz.print('gplslot.001',clz.fgB4,False) + #~ clz.print('] ',clz.fgB0) + #~ print() + #~ clz.print('color0',clz.fgb0) + #~ clz.print('color1',clz.fgb1) + #~ clz.print('color2',clz.fgb2) + #~ clz.print('color3',clz.fgb3) + #~ clz.print('color4',clz.fgb4) + #~ clz.print('color5',clz.fgb5) + #~ clz.print('color6',clz.fgb6) + #~ clz.print('color7',clz.fgb7) + #~ print() + #~ clz.print('color0',clz.fgB0) + #~ clz.print('color1',clz.fgB1) + #~ clz.print('color2',clz.fgB2) + #~ clz.print('color3',clz.fgB3) + #~ clz.print('color4',clz.fgB4) + #~ clz.print('color5',clz.fgB5) + #~ clz.print('color6',clz.fgB6) + #~ clz.print('color7',clz.fgB7) + #~ print() + #~ clz.print('color0',clz.bg0+clz.fgb0) + #~ clz.print('color1',clz.bg1+clz.fgb0) + #~ clz.print('color2',clz.bg2+clz.fgb0) + #~ clz.print('color3',clz.bg3+clz.fgb0) + #~ clz.print('color4',clz.bg4+clz.fgb0) + #~ clz.print('color5',clz.bg5+clz.fgb0) + #~ clz.print('color6',clz.bg6+clz.fgb0) + #~ clz.print('color7',clz.bg7+clz.fgb0) + #~ print() + #~ clz.print('color0',clz.BG0+clz.fgB0) + #~ clz.print('color1',clz.BG1+clz.fgB0) + #~ clz.print('color2',clz.BG2+clz.fgB0) + #~ clz.print('color3',clz.BG3+clz.fgB0) + #~ clz.print('color4',clz.BG4+clz.fgB0) + #~ clz.print('color5',clz.BG5+clz.fgB0) + #~ clz.print('color6',clz.BG6+clz.fgB0) + #~ clz.print('color7',clz.BG7+clz.fgB0) + #~ print() + #Cli(get_file_path(__file__ )) + #os.system('echo python imprastorage data -l') + + #~ except Exception as e : + #~ print(e) + +#python -O -m compileall impra/*.py