SHIIVA Library Documentation (ENG)
shiivastuff.github.ioThe SHIIVA library is a Python package created to make it easier for many not only owners of popular AMV channels, but also ordinary people who want to add their own watermarks to the files.
Installation
Requirements
SHIIVA Library supports Python 3.x versions.
Installation on Linux
- Make sure you have Python 3.x installed. You can check this by running the following command:
python3 --version
- If Python is not installed, you can install it using your Linux distribution's package manager.
- Install SHIIVA Library using pip:
pip install shiivalibrary
Installation on Windows
- Download and install the latest version of Python from the official website python.org. Make sure you install Python 3.x.
- Install SHIIVA Library using pip. To do this, open the command prompt and run the following command:
pip install shiivalibrary
Usage
To use the SHIIVA library in your Python project, you first need to import it:
from shiivalibrary import Shiiva

Initializing a Shiiva Class Object
To begin you should create a Shiiva Class object with optional parameters for specifying file watermarks, name watermarks, and excluded file formats (You don't have to specify all of them, it's just that depending on them some functions won't work):
FILE WATERMARK: Your text to be added to the beginning of each txt file
NAME_WATERMARK: Words that will be added to the end of the file name
EXCLUDE_FORMATS: File extensions that SHOULD NOT be renamed using the previous parameter NAME_WATERMARK
shiiva = Shiiva(file_watermark="YourFileWatermark", name_watermark="YourNameWatermark", exclude_formats=[".exe", ".dll"])

Adding Text Watermarks to Files
You can add text watermarks to text files in a specified directory
(traverses all directories looking for txt files, and if found, adds your watermark, that you passed in file_watermark= when creating the class, in file):
shiiva.add_txt_watermark(destination="path/to/directory")
Renaming Files with Watermarks
You can rename files in a specified directory by adding a watermark to their names:
shiiva.rename_files(destination="path/to/directory")
Copying Watermarked Files
You can copy watermarked files to a specified destination directory:
shiiva.copy_watermarks(file_path="path/to/file", destination="path/to/destination")
!!! YOU CAN COPY MULTIPLE FILES THROUGH A SHEET [ ], EXAMPLE:

Creating a Repack
If you don't need to use any particular class method, but to make a ready-made repack, you can use the make_repack method, which uses all other methods itself, you just need to specify destination in the method itself and, if you want to copy your watermark files, file_path.:
shiiva.make_repack(destination="path/to/destination", file_path=["path/to/file1", "path/to/file2"])
( you can also specify multiple files in file_path with [ ] )
Printing Watermark Information
You can print information about the file watermark, name watermark, and excluded file formats, that you specified when you created the object.:
shiiva.print_file_watermark()
shiiva.print_name_watermark()
shiiva.print_exclude_formats()