From projeler-commits at pardus.org.tr Mon Feb 11 02:35:06 2008 From: projeler-commits at pardus.org.tr (projeler-commits at pardus.org.tr) Date: Mon, 11 Feb 2008 02:35:06 +0200 (EET) Subject: [Projeler-commits] r452 - rc4simpleviewer Message-ID: <20080211003506.B2ABB7C0108@liste.uludag.org.tr> Author: loker Date: Mon Feb 11 02:35:06 2008 New Revision: 452 Added: rc4simpleviewer/ rc4simpleviewer/TODO rc4simpleviewer/rc4simpleviewer.py Log: simpleviewer galerisi yapan bir python betiği From projeler-commits at pardus.org.tr Mon Feb 11 22:51:12 2008 From: projeler-commits at pardus.org.tr (projeler-commits at pardus.org.tr) Date: Mon, 11 Feb 2008 22:51:12 +0200 (EET) Subject: [Projeler-commits] r453 - rc4simpleviewer Message-ID: <20080211205112.CBC317C03CC@liste.uludag.org.tr> Author: loker Date: Mon Feb 11 22:51:12 2008 New Revision: 453 Modified: rc4simpleviewer/TODO rc4simpleviewer/rc4simpleviewer.py Log: customize gallery xml with user input Modified: rc4simpleviewer/TODO ================================================================= --- rc4simpleviewer/TODO (original) +++ rc4simpleviewer/TODO Mon Feb 11 22:51:12 2008 @@ -1,24 +1,14 @@ rc4simpleviewer (remote control for simpleviewer flash gallery template) 02.2008 +Html file should also be edited for proper title and etc.; + +Image captions may be added if exists; + Following attributes for gallery.xml should be added with user values; - maxImageWidth="480" - maxImageHeight="480" - textColor="0xFFFFFF" - frameColor="0xffffff" - frameWidth="20" - stagePadding="40" - thumbnailColumns="3" - thumbnailRows="3" - navPosition="left" - title="SimpleViewer Title" - enableRightClickOpen="true" - backgroundImagePath="" - imagePath="" - thumbPath="" + textColor="0xFFFFFF" # for caption texts if exists + -Html file should also be edited for proper title and etc.; -Image captions may be added if exists; Modified: rc4simpleviewer/rc4simpleviewer.py ================================================================= --- rc4simpleviewer/rc4simpleviewer.py (original) +++ rc4simpleviewer/rc4simpleviewer.py Mon Feb 11 22:51:12 2008 @@ -9,7 +9,7 @@ import zipfile, subprocess # Download simpleviewer and extract the necessary files -subprocess.call(["wget", "http://www.airtightinteractive.com/simpleviewer/simpleviewer.zip"]) +#subprocess.call(["wget", "http://www.airtightinteractive.com/simpleviewer/simpleviewer.zip"]) zfiles = zipfile.ZipFile('simpleviewer.zip') lofz = zfiles.infolist() @@ -21,8 +21,27 @@ cfile.close() os.remove('simpleviewer.zip') -os.makedirs('images', 0755) -os.makedirs('thumbs', 0755) + +print ("Simpleviewer has been downloaded and extracted successfully, now\n\ +please answer the following questions for creating your own gallery...") + +maxImageWidth = raw_input("Full image width? ") +maxImageHeight = raw_input("Full image height? ") +textColor = raw_input("Color of text? ") +frameColor = raw_input("Color of frame? ") +frameWidth = raw_input("Frame width? ") +stagePadding = raw_input("Thumbnail padding? ") +thumbnailColumns = raw_input("How many columns for thumbnails in a page? ") +thumbnailRows = raw_input("How many rows for thumbnails in a page? ") +navPosition = raw_input("Thumbnails will be on which side of the main image? ") +title = raw_input("Title of the gallery? ") +enableRightClickOpen = raw_input("true") +backgroundImagePath = raw_input("") +imagePath = raw_input("What shall be the name of the full images folder? ") +thumbPath = raw_input("What shall be the name of the full thumbs folder? ") + +os.makedirs(imagePath, 0755) +os.makedirs(thumbPath, 0755) # create gallery.xml file imagelist = [] From projeler-commits at pardus.org.tr Mon Feb 11 22:52:18 2008 From: projeler-commits at pardus.org.tr (projeler-commits at pardus.org.tr) Date: Mon, 11 Feb 2008 22:52:18 +0200 (EET) Subject: [Projeler-commits] r454 - rc4simpleviewer Message-ID: <20080211205218.A0D6A7C03CC@liste.uludag.org.tr> Author: loker Date: Mon Feb 11 22:52:18 2008 New Revision: 454 Added: rc4simpleviewer/AUTHORS Log: adet yerini bulsun madem ;) From projeler-commits at pardus.org.tr Mon Feb 11 22:54:13 2008 From: projeler-commits at pardus.org.tr (projeler-commits at pardus.org.tr) Date: Mon, 11 Feb 2008 22:54:13 +0200 (EET) Subject: [Projeler-commits] r455 - rc4simpleviewer Message-ID: <20080211205413.23AC57C03CC@liste.uludag.org.tr> Author: loker Date: Mon Feb 11 22:54:12 2008 New Revision: 455 Modified: rc4simpleviewer/rc4simpleviewer.py Log: forgotten local modification Modified: rc4simpleviewer/rc4simpleviewer.py ================================================================= --- rc4simpleviewer/rc4simpleviewer.py (original) +++ rc4simpleviewer/rc4simpleviewer.py Mon Feb 11 22:54:12 2008 @@ -9,7 +9,7 @@ import zipfile, subprocess # Download simpleviewer and extract the necessary files -#subprocess.call(["wget", "http://www.airtightinteractive.com/simpleviewer/simpleviewer.zip"]) +subprocess.call(["wget", "http://www.airtightinteractive.com/simpleviewer/simpleviewer.zip"]) zfiles = zipfile.ZipFile('simpleviewer.zip') lofz = zfiles.infolist() From projeler-commits at pardus.org.tr Mon Feb 11 23:01:48 2008 From: projeler-commits at pardus.org.tr (projeler-commits at pardus.org.tr) Date: Mon, 11 Feb 2008 23:01:48 +0200 (EET) Subject: [Projeler-commits] r456 - rc4simpleviewer Message-ID: <20080211210148.4026E7C03CE@liste.uludag.org.tr> Author: loker Date: Mon Feb 11 23:01:47 2008 New Revision: 456 Modified: rc4simpleviewer/rc4simpleviewer.py Log: lots of confused commits... this is the right script with customizable xml option Modified: rc4simpleviewer/rc4simpleviewer.py ================================================================= --- rc4simpleviewer/rc4simpleviewer.py (original) +++ rc4simpleviewer/rc4simpleviewer.py Mon Feb 11 23:01:47 2008 @@ -23,25 +23,62 @@ os.remove('simpleviewer.zip') print ("Simpleviewer has been downloaded and extracted successfully, now\n\ -please answer the following questions for creating your own gallery...") +please answer the following questions for customizing your gallery...") -maxImageWidth = raw_input("Full image width? ") -maxImageHeight = raw_input("Full image height? ") -textColor = raw_input("Color of text? ") -frameColor = raw_input("Color of frame? ") -frameWidth = raw_input("Frame width? ") -stagePadding = raw_input("Thumbnail padding? ") +maxImageWidth = raw_input("Max. width of the presented image (default is 640)? ") +maxImageHeight = raw_input("Max. height of the presented image (default is 480)? ") + +Color = raw_input("Choose frame color 1)red, 2)green, 3)blue, 4)yellow, 5)white, 6)black, 7)gray or enter hex value:") +if Color == ('1'): + frameColor = ('0xff0000') +elif Color == ('3'): + frameColor = ('0x00007f') +elif Color == ('2'): + frameColor = ('0x007f00') +elif Color == ('4'): + frameColor = ('0xffff00') +elif Color == ('5'): + frameColor = ('0xffffff') +elif Color == ('6'): + frameColor = ('0x000000') +elif Color == ('7'): + frameColor = ('0x333333') +else: + frameColor = '0x'+Color + +frameWidth = raw_input("Frame width in pixels (default is 20)? ") +stagePadding = raw_input("Stage padding (space between thumbs and page)? ") thumbnailColumns = raw_input("How many columns for thumbnails in a page? ") thumbnailRows = raw_input("How many rows for thumbnails in a page? ") -navPosition = raw_input("Thumbnails will be on which side of the main image? ") + +Position = raw_input("Which side do you want thumbnails will be (Left/Right/Top/Bottom)? ") +if Position == ('left'): + navPosition = ('left') +elif Position == ('right'): + navPosition = ('right') +elif Position == ('top'): + navPosition = ('top') +elif Position == ('bottom'): + navPosition = ('bottom') +else: + navPosition = ('right') + print ("Unrecognized value set as right") + title = raw_input("Title of the gallery? ") -enableRightClickOpen = raw_input("true") -backgroundImagePath = raw_input("") -imagePath = raw_input("What shall be the name of the full images folder? ") -thumbPath = raw_input("What shall be the name of the full thumbs folder? ") -os.makedirs(imagePath, 0755) -os.makedirs(thumbPath, 0755) +RightClickOpen = raw_input("An option for opening full image in right-click menu (y/N)? ") +if RightClickOpen == ('y'): + enableRightClickOpen = ('true') +elif RightClickOpen == ('n'): + enableRightClickOpen = ('false') +else: + enableRightClickOpen = ('false') + print ("Unrecognized value assigned as false") + +backgroundImagePath = raw_input("The full address of background image (eg. background/background.jpg)?" ) + +os.makedirs('images', 0755) +os.makedirs('thumbs', 0755) # create gallery.xml file imagelist = [] @@ -50,8 +87,18 @@ xml.dom.ext.PrettyPrint(doc, open(name, "w")) simpleviewer = doc.createElement("simpleviewerGallery") -doc.appendChild(simpleviewer) - +simpleviewer.setAttribute("maxImageWidth", maxImageWidth) +simpleviewer.setAttribute("maxImageHeight", maxImageHeight) +simpleviewer.setAttribute("frameColor", frameColor) +simpleviewer.setAttribute("frameWidth", frameWidth) +simpleviewer.setAttribute("stagePadding", stagePadding) +simpleviewer.setAttribute("thumbnailColumns", thumbnailColumns) +simpleviewer.setAttribute("thumbnailRows", thumbnailRows) +simpleviewer.setAttribute("navPosition", navPosition) +simpleviewer.setAttribute("title", title) +simpleviewer.setAttribute("enableRightClickOpen", enableRightClickOpen) +simpleviewer.setAttribute("backgroundImagePath", backgroundImagePath) +doc.appendChild(simpleviewer) #distribute images to folders jpgs = glob.glob("*.[Jj][Pp][Gg]") @@ -61,7 +108,7 @@ os.system('mv '+singlefile+' thumbs/') #resize thumbnails -os.chdir('thumbs/') +os.chdir('thumbs') jpgs = glob.glob("*.[Jj][Pp][Gg]") for singlefile in jpgs: im = Image.open(singlefile) From projeler-commits at pardus.org.tr Tue Feb 12 11:43:30 2008 From: projeler-commits at pardus.org.tr (projeler-commits at pardus.org.tr) Date: Tue, 12 Feb 2008 11:43:30 +0200 (EET) Subject: [Projeler-commits] r457 - rc4simpleviewer Message-ID: <20080212094330.CA33B2D1D1@liste.uludag.org.tr> Author: loker Date: Tue Feb 12 11:43:30 2008 New Revision: 457 Added: rc4simpleviewer/README Removed: rc4simpleviewer/AUTHORS Modified: rc4simpleviewer/TODO Log: authors da abartı oldu sanki on kişi program yazıyoruz... adam gibi readme yeter Modified: rc4simpleviewer/TODO ================================================================= --- rc4simpleviewer/TODO (original) +++ rc4simpleviewer/TODO Tue Feb 12 11:43:30 2008 @@ -1,12 +1,13 @@ rc4simpleviewer (remote control for simpleviewer flash gallery template) 02.2008 -Html file should also be edited for proper title and etc.; +* Ask user if simpleviewer should be downloaded? (or...) -Image captions may be added if exists; +* Html file should also be edited for proper title, background etc.; -Following attributes for gallery.xml should be added with user values; +* Image captions may be added if exists; - textColor="0xFFFFFF" # for caption texts if exists +* Following attributes for gallery.xml should be added with user values; + - textColor="0xFFFFFF" # for caption texts if exists From projeler-commits at pardus.org.tr Thu Feb 14 23:07:54 2008 From: projeler-commits at pardus.org.tr (projeler-commits at pardus.org.tr) Date: Thu, 14 Feb 2008 23:07:54 +0200 (EET) Subject: [Projeler-commits] r458 - rc4simpleviewer Message-ID: <20080214210754.EA2777C0159@liste.uludag.org.tr> Author: loker Date: Thu Feb 14 23:07:54 2008 New Revision: 458 Modified: rc4simpleviewer/README rc4simpleviewer/rc4simpleviewer.py Log: gurudan dersler... Modified: rc4simpleviewer/README ================================================================= --- rc4simpleviewer/README (original) +++ rc4simpleviewer/README Thu Feb 14 23:07:54 2008 @@ -12,9 +12,10 @@ When you run the script in a folder of images (they should be jpg files at the moment) it should download the script and prepare the gallery with necessary structure for you. -This version works with Simpleviewer 1.8. +This version works with Simpleviewer 1.8. Also you'll need python-imaging library (AKA PIL) +please check if it's installed before trying... For further, please check http://svn.pardus.org.tr/projeler/rc4simpleviewer/ -You may contact Koray Löker ( loker at pardus.org.tr ) for any questions/suggestions/bugreports etc. \ No newline at end of file +You may contact Koray Löker ( loker at pardus.org.tr ) for any questions/suggestions/bugreports etc. Modified: rc4simpleviewer/rc4simpleviewer.py ================================================================= --- rc4simpleviewer/rc4simpleviewer.py (original) +++ rc4simpleviewer/rc4simpleviewer.py Thu Feb 14 23:07:54 2008 @@ -51,16 +51,8 @@ thumbnailColumns = raw_input("How many columns for thumbnails in a page? ") thumbnailRows = raw_input("How many rows for thumbnails in a page? ") -Position = raw_input("Which side do you want thumbnails will be (Left/Right/Top/Bottom)? ") -if Position == ('left'): - navPosition = ('left') -elif Position == ('right'): - navPosition = ('right') -elif Position == ('top'): - navPosition = ('top') -elif Position == ('bottom'): - navPosition = ('bottom') -else: +navPosition = raw_input("Which side do you want thumbnails will be (left/right/top/bottom)? ") +if navPosition not in ("left", "right", "top", "bottom"): navPosition = ('right') print ("Unrecognized value set as right")