This is an automated notification sent by LCG Savannah.
It relates to:
                task #4084, project CDS Invenio

==============================================================================
 LATEST MODIFICATIONS of task #4084:
==============================================================================

Update of task #4084 (project cdsware):

                  Status:                    None => Done                   
        Percent Complete:                      0% => 100%                   
             Open/Closed:                    Open => Closed                 


==============================================================================
 OVERVIEW of task #4084:
==============================================================================

URL:
  <http://savannah.cern.ch/task/?4084>

                 Summary: thumbmaker: migrate from PHP to Python
                 Project: CDS Invenio
            Submitted by: simko
            Submitted on: 2006-11-28 21:06
         Should Start On: 2006-11-28 00:00
   Should be Finished on: 2006-11-28 00:00
                Category: WebSubmit
                Priority: 7 - High
                  Status: Done
                 Privacy: Public
        Percent Complete: 100%
             Assigned to: None
             Open/Closed: Closed
         Discussion Lock: Any
                  Effort: 0.00

    _______________________________________________________




    _______________________________________________________

Follow-up Comments:


-------------------------------------------------------
List-Post: [email protected]
Date: 2007-01-11 10:51              By: Tibor Simko <simko>
In addition to rewriting thumbmaker, the Create_Icon has to be introduced. 
Here's "Create_Icon" context and definition from CDSware 0.1.2 (the
latest version that had it) that needs to be migrated to Python:

$ grep -r Create_Icon .
./modules/miscutil/demo/democfgdata.sql.wml:INSERT INTO sbmFUNCTIONS VALUES
('FTT','PICT','Create_Icon',50,1);
./modules/miscutil/demo/democfgdata.sql.wml:INSERT INTO sbmFUNCTIONS VALUES
('FTT','RPICT','Create_Icon',50,1);
./modules/miscutil/sql/tabfill.sql.wml:INSERT INTO sbmALLFUNCDESCR VALUES
('Create_Icon','');
./modules/miscutil/sql/tabfill.sql.wml:INSERT INTO sbmFUNDESC VALUES
('Create_Icon','iconsize');
./modules/miscutil/sql/tabfill.sql.wml:INSERT INTO sbmFUNDESC VALUES
('Create_Icon','firstfile');
./modules/miscutil/sql/tabfill.sql.wml:INSERT INTO sbmFUNDESC VALUES
('Create_Icon','secondfile');
./modules/websubmit/doc/admin/functiondescription.php.wml:                   
          <a HREF="#Create_Icon">Create_Icon</A><br>
./modules/websubmit/doc/admin/functiondescription.php.wml:             
<br><br><A NAME="Create_Icon">
./modules/websubmit/doc/admin/functiondescription.php.wml:             
<TR><TD colspan=2
bgcolor=#ddddff><SMALL><b>Create_Icon</b></SMALL></TD></TR>
./modules/websubmit/lib/functions/Create_Icon.php.wml:## $Id:
Create_Icon.php.wml,v 1.1 2003/11/28 13:27:43 tibor Exp $
./modules/websubmit/lib/functions/Create_Icon.php.wml:## $Id:
Create_Icon.php.wml,v 1.1 2003/11/28 13:27:43 tibor Exp $
./modules/websubmit/lib/functions/Create_Icon.php.wml:   ## Name:         
Create_Icon.php
./modules/websubmit/lib/functions/Create_Icon.php.wml:   ## Description:  
function Create_Icon
./modules/websubmit/lib/functions/Create_Icon.php.wml:   function
Create_Icon($param_array,$MAINPATH)
./modules/websubmit/lib/functions/Create_Icon.php.wml:   }//end function
Create_Icon

$ cat ./modules/websubmit/lib/functions/Create_Icon.php.wml
## $Id: Create_Icon.php.wml,v 1.1 2003/11/28 13:27:43 tibor Exp $

## This file is part of the CERN Document Server Software (CDSware).
## Copyright (C) 2002 CERN.
##
## The CDSware is free software; 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 2 of the
## License, or (at your option) any later version.
##
## The CDSware 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 CDSware; if not, write to the Free Software Foundation, Inc.,
## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
<?
<protect>
## $Id: Create_Icon.php.wml,v 1.1 2003/11/28 13:27:43 tibor Exp $
## DO NOT EDIT THIS FILE!  IT WAS AUTOMATICALLY GENERATED FROM CDSware WML
SOURCES.
   
   ##
   ## Name:          Create_Icon.php
   ## Description:   function Create_Icon
   ##                In the case of a picture submission, this function uses
   ##                various system-dependant(!) software tools to create an
   ##                icon from a jpeg, gif or pdf picture
   ## Author:        T.Baron
   ##
   ## Created:             2002 T. Baron
   ## Last modified: 07/05/2002 T. Baron
   ##
   ## PARAMETERS:    iconsize: size of the resulting icon in pixels
   ##                firstfile: name of the directory in which the main file
   ##                           is stored
   ##                secondfile: name of the directory in which the
additional
   ##                            files are stored
   ## OUTPUT: HTML
   ##

   function Create_Icon($param_array,$MAINPATH)
   {
      global $HTDOCSDIR;

      $iconsize = $param_array[iconsize];
      $firstfile = $param_array[firstfile];
      $secondfile = $param_array[secondfile];

      $ICONPATH = "$MAINPATH/files/icons";

      if (!is_dir("$MAINPATH/files"))
         if (!mkdir ("$MAINPATH/files", 0777))
            outError("File System: Cannot create working directory "
               . "$MAINPATH/files");
      if (!is_dir("$ICONPATH"))
         if (!mkdir ("$ICONPATH", 0777))
            outError("File System: Cannot create working directory
$ICONPATH");

      //get the details concerning the last uploaded file
      if (file_exists("$MAINPATH/lastuploadedfile"))
      {
         $fp = fopen("$MAINPATH/lastuploadedfile","r");
         $file_name = fread($fp,filesize("$MAINPATH/lastuploadedfile"));
         fclose($fp);
   
         #Rename files and create icon name
         if (ereg("$secondfile",$file_name))
         {
            $no=1;
            $not="01";
            $noExists=`ls $ICONPATH | grep "icon01"`;
            while ( $noExists != "" )
            {
               $no++;
               if ($no < 10) { $not="0$no"; } else { $not="$no"; }
               $noExists=`ls $ICONPATH | grep "icon$not"`;
            }
            $icon_name = ereg_replace(".*/","",$file_name);
            $icon = "icon${not}.${icon_name}.gif";
         }
         else
            $icon = "icon.gif";                                              
                        
   
      if (!is_dir("$MAINPATH/files"))
         if (!mkdir ("$MAINPATH/files", 0777))
            outError("File System: Cannot create working directory "
               . "$MAINPATH/files");
      if (!is_dir("$ICONPATH"))
         if (!mkdir ("$ICONPATH", 0777))
            outError("File System: Cannot create working directory
$ICONPATH");

      //get the details concerning the last uploaded file
      if (file_exists("$MAINPATH/lastuploadedfile"))
      {
         $fp = fopen("$MAINPATH/lastuploadedfile","r");
         $file_name = fread($fp,filesize("$MAINPATH/lastuploadedfile"));
         fclose($fp);
   
         #Rename files and create icon name
         if (ereg("$secondfile",$file_name))
         {
            $no=1;
            $not="01";
            $noExists=`ls $ICONPATH | grep "icon01"`;
            while ( $noExists != "" )
            {
               $no++;
               if ($no < 10) { $not="0$no"; } else { $not="$no"; }
               $noExists=`ls $ICONPATH | grep "icon$not"`;
            }
            $icon_name = ereg_replace(".*/","",$file_name);
            $icon = "icon${not}.${icon_name}.gif";
         }
         else
            $icon = "icon.gif";                                              
                        

         #Create Icon
         system("${HTDOCSDIR}/submit/MESS/functions/thumbmaker.php
$MAINPATH/files/$file_name $ICONPATH/$icon "
            . "$iconsize");
      }
   }//end function Create_Icon
</protect>
?>






    _______________________________________________________

Carbon-Copy List:

CC Address                          | Comment
------------------------------------+-----------------------------
1576                                | -SUB-




==============================================================================

This item URL is:
  <http://savannah.cern.ch/task/?4084>

_______________________________________________
  Message sent via/by LCG Savannah
  http://savannah.cern.ch/


Reply via email to