pywikibot-catfiles / file-metadata

A python package to analyze files and provide useful metadata
MIT License
15 stars 1 forks source link

log_bot.py setup hint error messages #67

Closed drtrigon closed 8 years ago

drtrigon commented 8 years ago

A very nice message appeared when I tried to run the bot w/o pywikibot installed, very helpful! The same when I tried w/o user-config.py, but this one has a wrong hint:

[...] To create the user-config.py run the command `wikibot-create-config`.

So I could not find wikibot-create-config but file-metadata/file_metadata/wikibot/generate_user_files.py and running it solved the issue, so I guess the message has to be corrected or the script renamed.

AbdealiLoKo commented 8 years ago

I believe you're running the scripts in an unusual way.

To run the log_bot.py script you simply do:

$ wikibot-filemeta-log

To run the config script to make a configuration file:

$ wikibot-create-config

The main reason for exposing these as direct executable is because users need not go into the installation folder and run things.

PS: I need to document these scripts somewhere.

AbdealiLoKo commented 8 years ago

Update: These have now been documented at https://commons.wikimedia.org/wiki/User:AbdealiJK/file-metadata#In_a_pywikibot_script

drtrigon commented 8 years ago

Where are these executables? On github? In the dockers? In pip?

AbdealiLoKo commented 8 years ago

The executables are created by setuptools while installing using entry points: http://stackoverflow.com/questions/774824/explain-python-entry-points

drtrigon commented 8 years ago

Learned something new - nice - thanks!

Found it in: https://github.com/pywikibot-catfiles/file-metadata/blob/master/setup.py#L132