Python License Update (PyLicUp). Updates all the python headers of your project with the provided license text.
Project description
PythonLicenseUpdater
Simple tool that updates your python files license headers for the given directories. By default it will skip init.py.
How to use it?
Installation.
- With pip:
pip install pylicup
- With latest version from GitHub:
pip install git+https://github.com/Carsopre/PythonLicenseUpdater.git
- With custom version from GitHub:
pip install git+https://github.com/Deltares/PythonLicenseUpdater.git@v0.0.1
Usage
The following command should be used.
python pylicup -l <path_to_your_license_file> -d <path_to_directory_with_python_files>
- <path_to_your_licenses_file> List of licenses, the first one will replace the ones that follow (in case present) or simply added at the top.
- <path_to_directory_with_python_files> List of arguments representing paths to the directories containing python files.
Examples
Given the following directory hierarchy:
license_manager.py
|-src\
|-__init__.py
|-main.py
|-utils.py
|-test\
|-__init__.py
|-test_main.py
|-test_utils.py
|-setup.py
|-my_license.txt
|-my_newer_license.txt
- The following command will update the license for src\main.py and src\utils.py:
python license_manager.py -l my_license.txt -d src
- Whereas executing the following command will result in updating the license header for src\main.py, src\utils.py, test\test_main.py and test\test_utils.py:
python license_manager.py -l my_license.txt -d src test
- Last, if we want to replace an existing license header with a new one, we would do the following command:
python license_manager.py -l my_license.txt my_newer_license.txt -d src
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pylicup-0.1.2.tar.gz
(15.7 kB
view hashes)
Built Distribution
pylicup-0.1.2-py3-none-any.whl
(16.0 kB
view hashes)