Contributions
Easypopulate Data File Tools
Firstly, if you are looking for easypopulate, you have come to the wrong place !
This package consis of a set of PHP scripts that are run from the command line. They allow you to do all sorts of things with easypopulate data files.
The included README file should enlighten you further.
Following is a run-down of what you can do...
1. 'Block' split an easypopulate file (that is, split the file into fixed numbers of records in exactly the same way that easypopulate does)
2. Split a file by category (to whatever depth you like). Within each category split, you may also specify a block split
3. Merge a set of split files into a single file (either block split or split by category, or both)
4. Perform a series of checks on your data. You can select what checks you want to perform via settings in the scripts:
1. Locate lines that are the wrong length (contain the wrong number of fields)
2. Locate lines that are not correctly terminated with EOREOR
3. Check for duplicate or blank product numbers
4. Check for duplicate or blank product names (with multi-language support)
5. Check for duplicate or blank product descriptions (with multi-language support)
6. Check for duplicate or blank product image files (you may specify exceptions such as 'no image' files)
7. Check for blank or badly justified product categories
8. Check for illegal characters such as unescaped ''
5. Auto-insert and auto-strip escape sequences from the data (to allow characters that would otherwise be illegal to SQL, such as '' and '"'), to be used in the data). Be warned that I'm not sure this is correct or even necessary !
6. Auto-generate and 'un-auto-generate' (reverse engineer) image filename paths and image filenames, with exceptions (such as 'no image' images) and special modifiers
7. Import arbitrarily organised csv data and create an easypopulate formatted file from it
8. Perform a diff operation on a pair of easypopulate files. List all products that have been added, deleted and changed. Extract a list of image files that have been deleted and added (with 'no image'-type exceptions allowed)
9. Generate a graphical tree of products by category
10. There's also an 'eol' converter thrown in. This will convert between Unix, Macintosh and Toy (MS) operating system end-of-lines for any files you throw at it
Expand All / Collapse All
Increased max record length.
Added some comments to the README about what to do if the scripts are timing out for you
Added a 'known bugs' section to the README
See CHANGE_LOG file for full details
V 1.3 - Here is a list of the major changes. For a full list of the changes, see the CHANGE_LOG file.
Support thread for this is here :
http://forums.oscommerce.com/index.php?showtopic=91637
Changes
-------
I found that if you have certain settings set in PHP, most of the scripts will generate a variety of warnings about undefined variables. In most cases these warnings do not actually stop the scripts working (though they DO in a couple of places). This problem has now (hopefully) been corrected
Found a number of (mostly) trivial issues dotted around the code and corrected them.
The scripts will now handle blank and comment lines in the data which is handy because
you can make the source spreadsheet data more readable.
split_data - Fixed a glaring mistake in the path handling for option -c
image_resize - Added a new option '-p'. Now, padding shall only be generated for the image if this is specified. This means that you can now just perform a plain rescaling of the image to make it fit in the 'box' (when '-p' is not specified). Added a new option, -o, to make rendering an image border more flexible
diff_data.config - New file. I pulled out the configuration from the diff_data script and put it here
import_data - You can now specify how many lines to skip at the top of the foreign data (if any) before parsing.
Added 'CHECK_BLANK_DATE_FORMAT' option. This is used by the post_edit and pre_edit scripts
V 1.2 |
Richard Bentley |
9 Jun 2004 |
|
This corrects a fault in import_data (the EOREOR was not being added to the output file correctly - thanks to Giles Westwood for this. I've also clarified some of the comments in this file.
I've added some functionality to the image_resize script - you can now add/draw a border round the output image if you like.
Made some small ammendments to the docs.
See the CHANGE_LOG file for further details.
Rich.
V 1.1 |
Richard Bentley |
22 May 2004 |
|
Here's a small update...
I have added an image_resize script. You can probably guess what it does. Although this is not directly applicable to easypopulate, it does fit in well with the auto-filename generation stuff. It does require that you build the GD image library into PHP for it to work (this does not affect use of the existing scripts).
I also fixed a bug in the eol_convert script - it wasn't handling '.../' type directory references correctly.
As always, feedback is welcomed.
Support for this is here...
http://forums.oscommerce.com/index.php?showtopic=91637
This is a zip file containing the original contributors files - separated from the tarball of files which contained formatting data. This service provided using a toy operating system for your convenience.
Firstly, if you are looking for easypopulate, you have come to the wrong place !
This package consis of a set of PHP scripts that are run from the command line. They allow you to do all sorts of things with easypopulate data files.
The included README file should enlighten you further.
Following is a run-down of what you can do...
1. 'Block' split an easypopulate file (that is, split the file into fixed numbers of records in exactly the same way that easypopulate does)
2. Split a file by category (to whatever depth you like). Within each category split, you may also specify a block split
3. Merge a set of split files into a single file (either block split or split by category, or both)
4. Perform a series of checks on your data. You can select what checks you want to perform via settings in the scripts:
1. Locate lines that are the wrong length (contain the wrong number of fields)
2. Locate lines that are not correctly terminated with EOREOR
3. Check for duplicate or blank product numbers
4. Check for duplicate or blank product names (with multi-language support)
5. Check for duplicate or blank product descriptions (with multi-language support)
6. Check for duplicate or blank product image files (you may specify exceptions such as 'no image' files)
7. Check for blank or badly justified product categories
8. Check for illegal characters such as unescaped ''
5. Auto-insert and auto-strip escape sequences from the data (to allow characters that would otherwise be illegal to SQL, such as '' and '"'), to be used in the data). Be warned that I'm not sure this is correct or even necessary !
6. Auto-generate and 'un-auto-generate' (reverse engineer) image filename paths and image filenames, with exceptions (such as 'no image' images) and special modifiers
7. Import arbitrarily organised csv data and create an easypopulate formatted file from it
8. Perform a diff operation on a pair of easypopulate files. List all products that have been added, deleted and changed. Extract a list of image files that have been deleted and added (with 'no image'-type exceptions allowed)
9. Generate a graphical tree of products by category
10. There's also an 'eol' converter thrown in. This will convert between Unix, Macintosh and Toy (MS) operating system end-of-lines for any files you throw at it
Note: Contributions are used at own risk.