mdsanima-cli 0.3.0

Creator: bigcodingguy24

Last updated:

Add to Cart

Description:

mdsanimacli 0.3.0

mdsanima-cli













Command-line tools for image processing, generating pixel art, adding logos to images, and much more.
These command-line tools are readily available for a multitude of image processing tasks, such as manipulating images, generating mesmerizing pixel art, seamlessly integrating logos into visuals, and accomplishing a diverse array of other creative endeavors. By harnessing the power of these tools, users can unlock endless possibilities for creating captivating artwork that can greatly enhance a wide range of projects.
Package Installation
Install or update the latest version using pip:
python3 -m pip install --upgrade mdsanima-cli

The package is now installed, and you can start using it.
CLI Terminal Commands
After installing the package, you can now use the mdsanima command in the terminal, and the response will provide instructions on how to use these command-line tools. You can also use the mds alias, which has the same functionality.
Below are the available commands that have been marked as completed, along with some ideas for commands that we would like to implement in this package:

mdsanima main command showing help
mdsanima check print directory info
mdsanima uuid rename to uuid
mdsanima number rename to seq numbers
mdsanima logo append a logo
mdsanima watermark append a watermark
mdsanima jpg convert to jpg
mdsanima png convert to png
mdsanima webp convert to webp
mdsanima pixelart generate pixel art 32px
mdsanima grid generate grid 2x2
mdsanima thumbnail generate jpeg thumbnail 128px
mdsanima gifmaker generate gif animation pixel art
mdsanima resize resizing to 512px width
mdsanima multi generate multi resolution
mdsanima caption adding caption
mdsanima bg adding background
mdsanima filter adding filter
mdsanima crop cropping image

The pixelart command works in a folder that contains only .png images and converts these images into pixel art by creating a new file and appending the suffix pixelart to the original file name. After executing this command, all image files in the folder you are in will be processed. The command does not delete any files in the folder, it only adds new ones and displays directory information.
Development
Here are some helpful instructions in the development process of this Python package.
Python Setup
This package is built using specific tools and will be published on PyPI using Twine. Instructions on how to activate the virtual environment for this project and how to configure and build the package. We will use specific package versions and Python 3.11 for now.
Virtual Environment
Make sure you have virtualenv installed on your system. If not, enter this command:
python3.11 -m pip install virtualenv

Creating and activating the development environment, and then installing the necessary packages, enter the following commands in the terminal:
virtualenv --setuptools=68.2.2 --wheel=0.41.2 --pip=23.2.1 --python=python3.11 .venv
source .venv/bin/activate
pip install -r requirements.txt -r requirements-dev.txt

All dependencies for this project are specified in the requirements.* files and in the project's TOML configuration.
You can install these dependencies using the pip install . command, which will build our package and install the basic dependencies along with the new version of our package. To install dev dependencies, you can use the pip install ".[dev]" command instead of specifying a -r flag and file as mentioned earlier.
After following the above instructions, we can start writing the program. You can also refer to the instructions regarding the configuration of the development environment, which are included in this workflow guide.
Build Package
Building our Python package is done using the build module, which was previously installed as a requirement in the requirements-dev.txt file when activating the development environment.
To build the package, enter the following command in the terminal:
python -m build

After building, the package will be placed in a folder named dist, and the filename will have the .whl extension, including the package name and version.
Install Package
After building the package, you can install it by entering the following command in the terminal:
pip install --force-reinstall dist/mdsanima_cli-0.2.0-py3-none-any.whl

The --force-reinstall flag is necessary when installing the package because if you have a previous version installed, the installation will fail. Please note that the above command may change depending on the version you are currently building.
Testing Package
After building and installing our package, we can test it. You can use the appropriate CLI command mentioned above or test individual modules by entering the following command in the terminal:
python -m mdsanima_cli.commands.pixelart

You can also run and test before building and installing the package, type in the terminal:
python3 src/mdsanima_cli/commands/pixelart.py

After running the above command, you will test only the selected module.
Extracts Version
The setuptools-scm tool allows you to extract the Python package version from git instead of declaring it as a version argument.
If you need to confirm which version string is being generated, you can use the setuptools-scm tool, which will display the current version you are working with. Enter the following command in the terminal:
python -m setuptools_scm

Check the pyproject.toml file and this instruction for more info.
Creating Release
Below is the instruction on how to create a release version of our Python package.
Here are the steps to create a release version:

Add new code to the package
Test new functionality
Commit the changes
Bump the package version
Generate the CHANGELOG.md file
Commit the release
Add and push the new tag
Build and Update on PyPI

This is done manually for now, but we plan to set up a GitHub Action workflow for testing and automatic release version creation in the future.
Conventional Commits
In this project, we use Conventional Commits - a specification for adding human and machine readable meaning to commit messages.
Therefore, a crucial step is to commit your code changes using this specification. A commit message should look like this:
git commit -m "feat: generating pixel art command"

Always use this format for committing to Git, as it enables generating a changelog from the commit message.
Standard Version
Check the package.json file in the standard-version section and in the types lists for the first string that you can use in the commit message or check the examples from Conventional Commits documentation.
Bump the package version in the package.json file and generate the CHANGELOG.md file with new release information, type the standard-version command to check first, type npm run check-release command in the terminal, and then add these changes to Git, committing the release like this:
npm run release
git commit -am "chore(release): v0.2.0"

The version above is the result of the standard-version command, and this is just an example version. The version must always be changed when a new release is made.
The next step is to create a tag and push the changes to the remote repository with the tag. The command should look like this:
git tag v0.2.0
git push origin --tag

After completing the above steps, you can verify the package version by entering this command in the terminal:
python -m setuptools_scm

Finally, create the build and update this build on test.pypi.org and pypi.org, but first, make sure to check everything, and then proceed with the update.
Enter the following commands in the terminal:
rm -rf dist
python -m build
twine check dist/*
twine upload -r testpypi dist/*
twine upload dist/*

Remember, only the package owner can perform this operation and must have the secrets configured in the .pypirc file in the system.
License
Package mdsanima-cli developed by Marcin Różewski is released under the terms of Apache-2.0 license.

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Customer Reviews

There are no reviews.