Fixes/Features
- Setup via PyPi
- Several under the hood code refactoring, pylint3 check and more.
- Drop unused setting TOKEN_PATH.
- Added verbosity control with argument (-v, -vv, etc...) on NicePrint class.
- Fix 46 Use current working directory to look for INI (uploadr.ini) file
- Now support for multiprocessing for feature: 68 Option to have Rotating Error Log written to files to keep size under control.
- Setup options:
- You can install from pip:
`pip install flickr-uploader --prefix=~/apps/Python`
- You can download and run install with command:
`python3 setup.py install --prefix=~/apps/Python --old-and-unmanageable`
- You can download and run from local folder.
- uploadr.ini: **Note that uploadr.ini definition for path search** is changed:
- Sets base folder with `FOLDER = os.path.abspath(os.getcwd())`
- DB_PATH, LOCK_PATH, TOKEN_CACHE and TOKEN_PATH are now relative to FOLDER, for example: `os.path.join(%(FOLDER)s, "flickrdb")`
- From v2.8.6 onwards it looks for `uploadr.ini` as follows:
1. Use `--config-file` argument option to indicate where to find the file. Example `--config_file uploadr.ini`
1. If not, `os.path.dirname(sys.argv[0])`. Example: ~/apps/Python/bin/uploadr.ini or ./uploadr.ini
1. If not, `os.path.dirname(sys.argv[0]), '..', 'etc', 'uploadr.ini'`. Example: ~/apps/Python/etc/uploadr.ini
Output Messages
- Adjustments on output and logging messages.
- Feature: 68 Option to have Rotating Error Log written to files to keep size under control.
- New set of options related to Rotating Error Logging added to uploadr.ini:
Output logging information into a rotating set of log file(s).
ROTATING_LOGGING to Enable/Disable
ROTATING_LOGGING_PATH location of folder/main logging filename
ROTATING_LOGGING_FILE_SIZE for maximum file size of each log file
ROTATING_LOGGING_FILE_COUNT for maximum count of old log files to keep
ROTATING_LOGGING_LEVEL Level Logging
Check LOGGING_LEVEL setting for options.
Normally set ROTATING_LOGGING_LEVELto lower than LOGGING_LEVEL
ROTATING_LOGGING = False
ROTATING_LOGGING_PATH = os.path.join(os.path.dirname(sys.argv[0]), "logs", "uploadr.err")
ROTATING_LOGGING_FILE_SIZE = 25*1024*1024 25 MBytes
ROTATING_LOGGING_FILE_COUNT = 3
ROTATING_LOGGING_LEVEL = 30
Environment and Coding
- Python 2.7 + 3.6 compatibility: use of " noqa" as applicable
- autopep8, PEP8, flakes and pylint3 (not all!) adjustments
- pytest --flakes & pytest --doctest-modules
- Runs several unittests
- For installation:
- pip install flickr-uploader
- setup.py (**optional use**)
- or mannual