minimalparts / PeARS

Archive repository for the PeARS project. Please head over to https://github.com/PeARSearch/PeARS-orchard for the latest version.
MIT License
17 stars 21 forks source link

Code cleanup #3

Closed stultus closed 9 years ago

stultus commented 9 years ago

did some basic code cleanups on some files and changed the absolute file references to relative references.

nandajavarma commented 9 years ago

If I am running mkQueryPage from outside the web directory, this will fail to work, right?

nandajavarma commented 9 years ago

Ah, just realized that the code generally can't be run from outside the web directory. scratch that.

nandajavarma commented 9 years ago

Looks good. We might want to make these changes in the same scripts inside local directory as well. I am yet not sure why we have duplicates there. @minimalparts will be able to shed some light on this. Merging!

minimalparts commented 9 years ago

Ahem. Yes, we have near-duplicates, which @minimalparts could have merged into one... The code in local is there to test the search locally (assuming you've created separate directories which 'simulate' different pears). The code in web actually fetches pages from the Internet (so using urllib.urlopen instead of open when reading a file -- this might be the main difference).

stultus commented 9 years ago

Ok , Then lets introduce a config file to control this and remove the duplicate codes.
ie we should be able to control the local Vs web switch using a flag. How does that sounds?

minimalparts commented 9 years ago

Yup, much better! Thanks!