Revised script for generating a dummy news database

Is Coranto not working properly for you? Here's where to ask for support help; for best results, follow these steps:
  • - Check your core/addon documentation for possible solutions
  • - Search these forums for similar problems that have already been solved
  • - If you're still stumped, check out THIS TOPIC, and post your question in this forum!!

Moderators: Spunkmeyer, Dale Ray, SrNupsen, Bluetooth, Jackanape

Revised script for generating a dummy news database

Postby Dale Ray » Sun Jan 15, 2006 7:07 pm

I have made some revisions in the script to generate a dummy news database. It fixes one small error in the existing script and makes a couple of other small changes. It also adds a text file that explains how to us it.

Download Here
Dale Ray
User avatar
Dale Ray
 
Posts: 1001
Joined: Sun Jan 19, 2003 6:02 pm
Location: NW Indiana

Re: Revised script for generating a dummy news database

Postby Parahead » Sat Jan 21, 2006 8:00 am

Dale Ray wrote:I have made some revisions in the script to generate a dummy news database. It fixes one small error in the existing script and makes a couple of other small changes. It also adds a text file that explains how to us it.

Download Here
Nice work... :-) I don't know if you have seen that there was a revised newsgen-script in the debug-folder in 1.31.2 as well? I haven't looked into both of them that much, but it looks like your version has more params to make the script do what a user wants. I don't see a reason for having two branches of the same script in the pakage, so if you think that your version has an advantage over the one in 1.31.2 I will replace that with your in the next release of the 1.31.x if that is OK with you? :-)
Yes, I am still around...
www.parahead.com/coranto/
User avatar
Parahead
 
Posts: 4837
Joined: Fri Jan 12, 2007 8:54 pm
Location: Stockholm - Sweden

Postby shanemckiness » Sat Jan 21, 2006 5:48 pm

For what reasons would someone want to make a dummy database?
shanemckiness
 
Posts: 234
Joined: Fri May 21, 2004 5:14 pm

Postby Parahead » Sat Jan 21, 2006 7:04 pm

shanemckiness wrote:For what reasons would someone want to make a dummy database?
To be able to test addons or solutions on a large newsdatabase and messure performance. For example a solution that may seem like a good idea when used on a small database may take way to much time to perform when the newsdatabase is large and thus prove to be an impractible solution.
Yes, I am still around...
www.parahead.com/coranto/
User avatar
Parahead
 
Posts: 4837
Joined: Fri Jan 12, 2007 8:54 pm
Location: Stockholm - Sweden

Postby Dale Ray » Mon Jan 30, 2006 3:03 am

I have updated my revision of the dummy news database generating script to generate newsids in the same form as Coranto.

Same Download Link

This was discussed in this thread
Dale Ray
User avatar
Dale Ray
 
Posts: 1001
Joined: Sun Jan 19, 2003 6:02 pm
Location: NW Indiana

Re: Revised script for generating a dummy news database

Postby Parahead » Tue Jan 31, 2006 6:39 pm

Dale Ray wrote:I have updated my revision of the dummy news database generating script to generate newsids in the same form as Coranto.
Nice work once again! :-)

Have you thought about my question below?
Parahead wrote:I don't see a reason for having two branches of the same script in the pakage, so if you think that your version has an advantage over the one in 1.31.2 I will replace that with your in the next release of the 1.31.x if that is OK with you? :-)
Yes, I am still around...
www.parahead.com/coranto/
User avatar
Parahead
 
Posts: 4837
Joined: Fri Jan 12, 2007 8:54 pm
Location: Stockholm - Sweden

Re: Revised script for generating a dummy news database

Postby Dale Ray » Tue Jan 31, 2006 8:36 pm

Parahead wrote:Have you thought about my question below?
Parahead wrote:I don't see a reason for having two branches of the same script in the pakage, so if you think that your version has an advantage over the one in 1.31.2 I will replace that with your in the next release of the 1.31.x if that is OK with you? :-)


I will compare the two before the weekend and let you know what I think.
Dale Ray
User avatar
Dale Ray
 
Posts: 1001
Joined: Sun Jan 19, 2003 6:02 pm
Location: NW Indiana

Postby Dale Ray » Sun Feb 12, 2006 4:13 pm

I have made some more revisions to the test database generating script.

Changes from the script available here are:

Creates newsids that are like the ones Coranto creates

Uses random lengths for the 'words' created

Tests for the existence of newsdat.txt and renames the file if it exists.

uses crcfg.dat not crcfg.pl which does not exist in current Coranto versions

Adds more user settings using the variables at the top of the script.

Can be run from the command line or as a CGI (from your browser)

You can set the number of items, number of words in each item, the minimum and maximum numbers of letters in each word, the name of 'fake user', the category that the items will be listed in, and text of the items subject line.

Download Here
Dale Ray
User avatar
Dale Ray
 
Posts: 1001
Joined: Sun Jan 19, 2003 6:02 pm
Location: NW Indiana

Postby Dale Ray » Mon Feb 27, 2006 4:33 pm

I have made a slight revision to the script.

This line:

Code: Select all
$ItemSpacing = (60 * 60 * *60 *10);


Put too much time between the news items, resulting in a large test database having many of the items in the future.

I changed it to:

Code: Select all
$ItemSpacing = (60 * 60 * 1);


which results in a one hour interval between items.

You do not need to re-download the file, just change the line noted above to suit your needs. The revised file is available at the same link
Dale Ray
User avatar
Dale Ray
 
Posts: 1001
Joined: Sun Jan 19, 2003 6:02 pm
Location: NW Indiana


Return to Troubleshooting

Who is online

Users browsing this forum: No registered users and 0 guests

cron