On my spring break and had some free time so I thought I'd take a shot at implementing nice urls for the appdb that DanK had suggested a while back.
I have decent bit of code in place that will interpret the url http://appdb.winehq.org/app/what-you-want-here and then feed the chunks into a hash table and return the match or matches however it goes.
However indexing the large amount of data in the production appdb database could take sometime so I was wanting to test it before I sent my code in.
I was wondering if there was a way to download the data from the appdb?
--John Klehm
On Wed, Mar 19, 2008 at 4:07 AM, John Klehm xixsimplicityxix@gmail.com wrote:
On my spring break and had some free time so I thought I'd take a shot at implementing nice urls for the appdb that DanK had suggested a while back.
I have decent bit of code in place that will interpret the url http://appdb.winehq.org/app/what-you-want-here and then feed the chunks into a hash table and return the match or matches however it goes.
However indexing the large amount of data in the production appdb database could take sometime so I was wanting to test it before I sent my code in.
I was wondering if there was a way to download the data from the appdb?
--John Klehm
I do this every week for the WWN to generate the status changes.
$file = "$year$mon$mday.tar.gz"; `wget -O appdb/wine-appdb-$file ftp://ftp.winehq.org/pub/wine/wine-appdb-$file `;
On Wed, Mar 19, 2008 at 10:16 AM, Zachary Goldberg zgold550@gmail.com wrote:
On Wed, Mar 19, 2008 at 4:07 AM, John Klehm xixsimplicityxix@gmail.com wrote:
I was wondering if there was a way to download the data from the appdb?
--John Klehm
I do this every week for the WWN to generate the status changes.
$file = "$year$mon$mday.tar.gz"; `wget -O appdb/wine-appdb-$file ftp://ftp.winehq.org/pub/wine/wine-appdb-$file `;
Thanks! =)
I can provide help with integrating the code with the appdb if you have any questions. The real question I've got, since I haven't done it before, is how to get the path the user specified, eg. appdb.winehq.org/vendor/adobe (or whatever), into a php script so we can redirect to the list of applications for the vendor 'adobe'.
Chris
On Wed, Mar 19, 2008 at 11:31 AM, John Klehm xixsimplicityxix@gmail.com wrote:
On Wed, Mar 19, 2008 at 10:16 AM, Zachary Goldberg zgold550@gmail.com wrote:
On Wed, Mar 19, 2008 at 4:07 AM, John Klehm xixsimplicityxix@gmail.com wrote:
I was wondering if there was a way to download the data from the appdb?
--John Klehm
I do this every week for the WWN to generate the status changes.
$file = "$year$mon$mday.tar.gz"; `wget -O appdb/wine-appdb-$file ftp://ftp.winehq.org/pub/wine/wine-appdb-$file `;
Thanks! =)
On Wed, Mar 19, 2008 at 11:55 AM, Chris Morgan chmorgan@gmail.com wrote:
I can provide help with integrating the code with the appdb if you have any questions. The real question I've got, since I haven't done it before, is how to get the path the user specified, eg. appdb.winehq.org/vendor/adobe (or whatever), into a php script so we can redirect to the list of applications for the vendor 'adobe'.
Chris
Is
$_SERVER["REQUEST_URI"];
what your looking for?
On Wed, Mar 19, 2008 at 11:31 AM, John Klehm xixsimplicityxix@gmail.com wrote:
On Wed, Mar 19, 2008 at 10:16 AM, Zachary Goldberg zgold550@gmail.com wrote:
On Wed, Mar 19, 2008 at 4:07 AM, John Klehm xixsimplicityxix@gmail.com wrote:
I was wondering if there was a way to download the data from the appdb?
--John Klehm
I do this every week for the WWN to generate the status changes.
$file = "$year$mon$mday.tar.gz"; `wget -O appdb/wine-appdb-$file ftp://ftp.winehq.org/pub/wine/wine-appdb-$file `;
Thanks! =)
Yep, I'm aware of that server parameter.
So the idea would be to add code to appdb.winehq.org/index.php and look at REQUEST_URI for a particular format and redirect based on that? That sounds feasible.
Chris
On Wed, Mar 19, 2008 at 12:01 PM, Zachary Goldberg zgold550@gmail.com wrote:
On Wed, Mar 19, 2008 at 11:55 AM, Chris Morgan chmorgan@gmail.com wrote:
I can provide help with integrating the code with the appdb if you have any questions. The real question I've got, since I haven't done it before, is how to get the path the user specified, eg. appdb.winehq.org/vendor/adobe (or whatever), into a php script so we can redirect to the list of applications for the vendor 'adobe'.
Chris
Is
$_SERVER["REQUEST_URI"];
what your looking for?
On Wed, Mar 19, 2008 at 11:31 AM, John Klehm xixsimplicityxix@gmail.com wrote:
On Wed, Mar 19, 2008 at 10:16 AM, Zachary Goldberg zgold550@gmail.com wrote:
On Wed, Mar 19, 2008 at 4:07 AM, John Klehm xixsimplicityxix@gmail.com wrote:
I was wondering if there was a way to download the data from the appdb?
--John Klehm
I do this every week for the WWN to generate the status changes.
$file = "$year$mon$mday.tar.gz"; `wget -O appdb/wine-appdb-$file ftp://ftp.winehq.org/pub/wine/wine-appdb-$file `;
Thanks! =)
-- Zachary Goldberg Computer Science & Engineering Electrical Captain of Penn Electric Race Team School of Engineering at the University of Pennsylvania
On Wed, Mar 19, 2008 at 10:55 AM, Chris Morgan chmorgan@gmail.com wrote:
I can provide help with integrating the code with the appdb if you have any questions. The real question I've got, since I haven't done it before, is how to get the path the user specified, eg. appdb.winehq.org/vendor/adobe (or whatever), into a php script so we can redirect to the list of applications for the vendor 'adobe'.
Chris
Well that did take a bit for me to work out as well here is what is working for me on my apache 2.2.8
You have to have allowoveride Options in the parent conf files and then
filename: htdocs/appdb/.htaccess RewriteEngine On Options FollowSymLinks # need this as well as RewriteEngine On to acutally get it going RewriteBase /appdb/ RewriteRule ^app/(.*)$ matchAppByName.php?AppName=$1
This will let you have: $1 is matched by the part of the url that is not matched by http://hostname.com/appb/app/
e.g. appdb/app/adobe-photoshop-cs2 Results in matchAppByName.php?AppName=adobe-photoshop-cs2
I'm not adverse to help with appdb whatever gets it solved more quickly =)
Be careful when choosing your rewritebase as its more important than you'd think =P
Hope this helps, John
On Wed, Mar 19, 2008 at 12:12 PM, John Klehm xixsimplicityxix@gmail.com wrote:
On Wed, Mar 19, 2008 at 10:55 AM, Chris Morgan chmorgan@gmail.com wrote:
I can provide help with integrating the code with the appdb if you have any questions. The real question I've got, since I haven't done it before, is how to get the path the user specified, eg. appdb.winehq.org/vendor/adobe (or whatever), into a php script so we can redirect to the list of applications for the vendor 'adobe'.
Chris
Well that did take a bit for me to work out as well here is what is working for me on my apache 2.2.8
You have to have allowoveride Options in the parent conf files and then
filename: htdocs/appdb/.htaccess RewriteEngine On Options FollowSymLinks # need this as well as RewriteEngine On to acutally get it going RewriteBase /appdb/ RewriteRule ^app/(.*)$ matchAppByName.php?AppName=$1
This will let you have: $1 is matched by the part of the url that is not matched by http://hostname.com/appb/app/
e.g. appdb/app/adobe-photoshop-cs2 Results in matchAppByName.php?AppName=adobe-photoshop-cs2
I'm not adverse to help with appdb whatever gets it solved more quickly =)
Be careful when choosing your rewritebase as its more important than you'd think =P
Hope this helps, John
Right, this makes more sense. Checking REQUEST_URI in index.php won't work because the path given won't match an existing page so you'll get the 404 page instead.
Chris
On Wed, Mar 19, 2008 at 11:15 AM, Chris Morgan chmorgan@gmail.com wrote:
On Wed, Mar 19, 2008 at 12:12 PM, John Klehm xixsimplicityxix@gmail.com wrote:
On Wed, Mar 19, 2008 at 10:55 AM, Chris Morgan chmorgan@gmail.com wrote:
I can provide help with integrating the code with the appdb if you have any questions. The real question I've got, since I haven't done it before, is how to get the path the user specified, eg. appdb.winehq.org/vendor/adobe (or whatever), into a php script so we can redirect to the list of applications for the vendor 'adobe'.
Chris
If it is desirable for winehq.org/appdb/show/verb/term (allows for appdb.winehq.org/show/vender appdb.winehq.org/show/app winehq.org/show/catagory) then this works for me:
RewriteEngine On Options FollowSymLinks RewriteBase /appdb/ #RewriteRule ^app/(.*)$ matchAppByName.php?AppName=$1 RewriteRule ^show/([a-zA-Z]+)/(.*)$ matchByVerbAndTerm.php?verb=$1&term=$2
E.g appdb.winehq.org/show/vendor/adobe => matchByVerbAndTerm.php?verb=vendor&term=adobe
appdb.winehq.org/show/app/adobe-photoshop-cs2 => matchByVerbAndTerm.php?verb=app&term=adobe-photoshop-cs2
Regards, John