English > Scripts and Templates
Silent Mode
nostra:
The only possibility to combine multiple sources in a nice way having each source in a separate file/unit is to write a plugin like the Script Engine and make it do the job. It is a bit of work to do and frankly I am not sure I am getting why is it needed at all. If common settings are needed you can easily make all your scripts read settings from the same configuration file.
mgpw4me@yahoo.com:
I think the issue with batch files is that is no process control.
I have 54,000 people in my database X 54 sites is a lot of processing...most of it unnecessary. I don't want to select a specific set of sites for each person. If I'm looking for an image of an asian person, there are only 4 primary sites for me to look at...2 of which are asians-only.
In my best case scenario, here's what I'd like to have happen (from a user perspective):
1) user sets preferences (no nudity, largest images possible, etc). I don't care where info is stored...other users might.
2) user selects every person in their people list and runs the script against the list.
3) script selects the sites, gathers links to images and displays the gallery links with a validation ranking
- validation ranking would be based on finding the person's birth place, birthday, filmography on the page in close proximity to the person name or specific words ('born', 'birth...day/date/date of/place', 'role'), and the site description...ie. age of person on a vintage site is important.
4) In silent mode, the validation ranking would be used to determine the best image source. Processing would exit after the user specified number of images were gathered, or all sites were processed.
5) Batch mode would unnecessary...it would be the execution of the silent mode code.
That's a perfect world to me, and that's where I'd like to get. I also don't want to build a monster script that can't be modified or maintained by intermediate level computer users. This is also the reason I'd like to stay in the scripting environment versus dll. The problem with scripting is that the control code would be a few thousand lines long and each site would need a parsing routine or two...we could end up with 10,000+ lines of code and 150 functions / procedures. That would be a maintenance nightmare.
The first baby step is to create the functionality...getting images. Somehow, the final product will have to made more user friendly...maybe a higher level dll calling the scripting engine?
rick.ca:
--- Quote ---I also don't want to build a monster script that can't be modified or maintained by intermediate level computer users.
--- End quote ---
It seems to me it all being in one script is should make maintenance easier for everyone. Expecting users to maintain 54 script files and user-created batch files for using them is asking for trouble. If you've created a well structured and documented script where each source/site subroutine includes only the code that pertains to processing that site, it would be much easier for everyone to modify and maintain. I imagine it also makes it easier for you to add error-checking code that gracefully handles the situation where the code stops working due to change in the design of the target site. If the script still produces the desired result without such a site, this may substantially reduce the frequency of maintenance.
BTW, have you considered somehow incorporating TinEye Reverse Image Search into the script. This is a great tool for finding an "original" image from a thumbnail, crop or otherwise poor quality version. Maybe the script could do a TinEye search of images that don't meet a specified resolution threshold. If there are results, you would report the TinEye link instead of the original. If there are no results, it's a safe bet a better version of the image is not going to be found elsewhere. If it can't be included the process, but maybe you can add "search for this image on TinEye" links to search results.
mgpw4me@yahoo.com:
My code for parsing a site is about 300 lines. Of that, about 150 lines are preample set up by Nostra. It is much friendlier to debug 300 lines of specific code than to deal with the complex mechanism that would be required to process multiple sites. Another concern is that with a single script, the results are immediately visible to the user. With 50+ sites, in silent or batch mode, no messaging would be visible to indicate there were any problems.
It's something for me to think about. I don't know (at the moment) how else we can get to a really usable interface. I need several scripts done before I can look at connecting anything.
One thing that looks promising is to sort the people list (birthday, place of birth) before invoking a specialized batch file for a group of people. Grouping by Genre would be another way to limit the search...the adult genre would obviously relate to nudity sites and horror probably would be b-movie sites. This sort of processing could be done in batch so separate scripts would work fine. Being able to somehow determine the size of a filmography (somehow, not in a script) would be a reasonable indicator of the status of a person, so 20+ jobs (tv episodes and / or movies) and a current birthday would probably indicate a site that specializes in events / red carpet. Now I'm 'in for it'...this is exactly the sort of thing I complain about most...it's non-intuitive & undocumented. At least we'll have you, Rick, to keep us straight <grin>.
TinEye looks interesting. It's limited at 100 images per day, but for special cases it might be good. I can't see this sort of advanced processing occurring until late in the development, but I don't see why it couldn't be done.
rick.ca:
--- Quote ---It's limited at 100 images per day...
--- End quote ---
I hadn't noticed that. There's also this in the TOS...
--- Quote ---Automated searching on TinEye via search scripts will not be tolerated, and will result in blocking of your IP address and/or other termination of your TinEye account.
--- End quote ---
...which may give pause, although I'm sure the link idea is fine.
--- Quote ---At least we'll have you, Rick, to keep us straight
--- End quote ---
As long as it finds the best available portrait for all 25,000 people in my database while I sleep, you have nothing to worry about.
Navigation
[0] Message Index
[*] Previous page
Go to full version