Sherlock: [Feature Request] Self Update Argument

Created on 10 Feb 2019  路  7Comments  路  Source: sherlock-project/sherlock

Can you please provide a self update argument, that checks for updates and then automatically installs the update, if one was found for example, sherlock.py -update.
Thanks

enhancement

All 7 comments

Yes, thats great idea. we will have that feature.

If Sherlock is packaged up and placed on PyPi, then you would be able to update it like any other Python module. Would that not be better?

@hoadlck
Both have positives and negatives, perhaps go for the one that's easiest to maintain and update.

Well, the infrastructure to update via pip is already in place. Although I could envision a mechanism to update Sherlock itself, it would be pretty non-trivial to handle the dependencies of Sherlock. Imagine that a new Python module was needed in the future: Sherlock would have to handle downloading that content.

Don't forget that there already is the option of fetch the site information from some place on the Internet (instead of using what was shipped with Sherlock).

@hoadlck

Well, the infrastructure to update via pip is already in place. Although I could envision a mechanism to update Sherlock itself, it would be pretty non-trivial to handle the dependencies of Sherlock. Imagine that a new Python module was needed in the future: Sherlock would have to handle downloading that content.

To my knowledge there's no inbuilt way to update all pip packages but, it's still simple to update all pip packages with a couple of commands.
Either way, i personally don't have a preference between a pip or inbuilt update option, i suppose it should be down to whichever is the most stable and easiest to maintain.

Don't forget that there already is the option of fetch the site information from some place on the Internet (instead of using what was shipped with Sherlock).

I wasn't aware of that, is there any documentation on that.

The documentation is in the command line help. The --json option lets you specify the JSON file location (be it on your filesystem, or via an http request).

To illustrate, I removed the information about the Zhihu site from the data.json file local to Sherlock, and provided a path to get it from the internet. The below command fetches the latest JSON file from master on GitHub.

python3 -u sherlock.py --site Zhihu blue --json https://raw.githubusercontent.com/TheYahya/sherlock/master/data.json

Of course, you have to be sure that the JSON file data that you are providing is compatible with the version of Sherlock. But, so far, everything has been backwards compatible.

O, i missed that, Thanks

Was this page helpful?
0 / 5 - 0 ratings