Saravanan666/pypi-org huggingface dataset:
Package: comfyconf
comfyconfWhat is it for?Using YAML configuration files for python require less boilerplate code, and accessing the values by dot notation.InstallationpipinstallcomfyconfUsageBasicCreate a config file in YAML and name it foo.yaml:test:title:'test'ip:'127.0.0.1'port:5000production:title:'Myamazingserver'ip:'1234.255.255.1'port:1234Now, load it usingmake_config:>>>fromcomfyconfimportmake_config>>>config=make_config("foo.yaml")>>>config.test.ip'127.0.0.1'>>>config.production.port1234Note that numerical keys are not allowed (even if they're strings in YAML), doing so will raise aValueError.Using ruamel.yaml as parser instead of pyyamlIf you prefer ruamel.yaml or need to parse YAML 1.2 document you can specify `"ruamel"`` as the reader:>>>config=make_config("foo.yaml",reader="ruamel")Validate configuration against a schemaIf you need to be validate that the configuration is compatible with a schema,
you can use validate_config:First, create a schema:{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"$defs":{"connection":{"type":"object","additionalProperties":false,"properties":{"title":{"type":"string"},"ip":{"type":"string","format":"ipv4"},"port":{"type":"integer","minimum":1,"maximum":65535}},"required":["title","ip","port"]}},"type":"object","properties":{"test":{"$ref":"#/$defs/connection"},"production":{"$ref":"#/$defs/connection"}}}>>>fromcomfyconfimportmake_config,validate_config>>>config=make_config("foo.yaml",reader="ruamel")>>>validate_config(config,"schema.json",validator='json')Currently, json-schema (validator='json') is the default but yamale schema can also be used (validator='yamale')  if yamale is installed.ContributeIf you find a bug or have a feature request, please raise on issue onGithub.Contributions are more than welcome, but please:Write unittest (pytest)Write Numpy styled docstrings
Package: comfyui-tooling-nodes
ComfyUI Nodes for External ToolingProvides nodes and API geared towards using ComfyUI as a backend for external tools.Nodes for sending and receiving imagesComfyUI exchanges images via the filesystem. This requires a
multi-step process (upload images, prompt, download images), is rather
inefficient, and invites a whole class of potential issues. It's also unclear
at which point those images will get cleaned up if ComfyUI is used
via external tools.Load Image (Base64)Loads an image from a PNG embedded into the prompt as base64 string.Inputs: base64 encoded binary data of a PNG imageOutputs: image (RGB) and mask (alpha) if presentLoad Mask (Base64)Loads a mask (single channel) from a PNG embedded into the prompt as base64 string.Inputs: base64 encoded binary data of a PNG imageOutputs: the first channel of the image as maskSend Image (WebSocket)Sends an output image over the client WebSocket connection as PNG binary data.Inputs: the image (RGB or RGBA)This will first send one binary message for each image in the batch via WebSocket:12<PNG-data>That is two 32-bit integers (big endian) with values 1 and 2 followed by the PNG binary data. There is also a JSON message afterwards:{'type': 'executed', 'data': {'node': '<node ID>', 'output': {'images': [{'source': 'websocket', 'content-type': 'image/png', 'type': 'output'}, ...]}, 'prompt_id': '<prompt ID>}}Nodes for working on regionsWhen integrating ComfyUI into tools which use layers and compose them on the fly, it is useful to only receive relevant masked regions.Apply Mask to ImageCopies a mask into the alpha channel of an image.Inputs: image and maskOutputs: RGBA image with mask used as transparencyAPI for model inspectionThere are various types of models that can be loaded as checkpoint, LoRA, ControlNet, etc. which cannot be used interchangeably. The following API helps to categorize and filter them./etn/model_infoLists available models with additional classification info.Paramters:noneOutput: list of model files{
    "checkpoint_file.safetensors": {
        "base_model": "sd15"|"sd20"|"sd21"|"sdxl"|"ssd1b"|"svd",
        "is_inpaint": true|false,
        "is_refiner": true|false
    },
    ...
}The entry is{"base_model": "unknown"}for models which are not in safetensors format or do not match any of the known base models.Note: currently only supports checkpoints. May add other models in the future.InstallationDownload the repository and unpack into thecustom_nodesfolder in the ComfyUI installation directory.Or clone via GIT, starting from ComfyUI installation directory:cd custom_nodes
git clone https://github.com/Acly/comfyui-tooling-nodes.gitRestart ComfyUI and the nodes are functional.
Package: comfyui-utils
ComfyUI utilsThis package provides simple utils for:Parsing out prompt arguments, e.g. "a beautiful forest $num_steps=12"Running a workflow in parsed API format against a ComfyUI endpoint, with callbacks for specified events.It's designed primarily for developing casual chatbots (e.g. a Discord bot) where users can adjust certain parameters and receive live progress updates.Limitations:Only integer arguments are currently supported in addition to the prompt itself. The plan is to add at least floats and strings.Only one output from the workflow is supported.Supports:Arbitrary number of integer args embedded in the main string prompt.Queuing with a callback when the queue position changes.Fetching cached results.Reporting intermediate progress of nodes likeKSampler.Installpip install comfyui_utilsUsage(better docs are coming, for now please look at the source code / sample script)from comfyui_utils import gen_prompts, comfy
gen_prompts.make_config("GenVid", [gen_prompts.IntArg("num_steps", default_value=12, min_value=1, max_value=80)])
...
try:
    parsed = gen_prompts.parse_args(raw_prompt, prompt_config)
except ValueError as e:
    print(f"Invalid prompt {e.args[0]}")
prompt_data = ...
class Callbacks(comfy.Callbacks):
    ...
await comfyui.submit(prompt_data, Callbacks())
def on_load(data_buffer):
    ...
await comfyui.fetch(backend_filepath, on_load)ExampleTo test the library with a sample SDXL workflow, run the following after installing (replace the address with your ComfyUI endpoint). Make sure your ComfyUI hassd_xl_base_1.0.safetensorsandsd_xl_refiner_1.0.safetensorsinstalled (or replace the workflow).comfy_ui_example_e2e\--address='192.168.0.10:11010'\--prompt='a smiling potato $base_steps=8$refiner_steps=3'\--output='./potato.png'The single quotes are important so your shell doesn't try to parse the$'s. Expected output:Queuing workflow.
Queue position: #0
Base...
Base: 1/8
Base: 2/8
Base: 3/8
Base: 4/8
Base: 5/8
Base: 6/8
Base: 7/8
Base: 8/8
Refiner...
Refiner: 1/3
Refiner: 2/3
Refiner: 3/3
Decoding...
Saving image on backend...
Result (cached: no):
{'images': [{'filename': 'ComfyUI_00101_.png', 'subfolder': '', 'type': 'output'}]}The file will be saved in the root directory.Use your own workflowAfter finalizing the workflow, use the "Save (API format)" button to store the workflow. Then, edit thePromptConfigin the script to reflect the arguments you wish to make available, and ensure the prompt has them replaced after parsing.
Package: comic2pdf
comic2pdfA script to convert comic files (cbr, cbz) to pdf, in python3.Getting StartedInstallingInstall the package usingsetuptools.$ python setup.py installRunningThecomic2pdfcommand should be globally available, pass as arguments the path(s) to the cbr / cbz files and optionally specify an output folder. The output files will be named the same as the input files but with a .pdf extension.usage: comic2pdf [-h] [-o OUTDIR] [--version] path [path ...]

Converts .cbr and .cbz files to .pdf

positional arguments:
  path                  paths to process

optional arguments:
  -h, --help            show this help message and exit
  -o OUTDIR, --outdir OUTDIR
                        directory to place generated files
  -a, --allow-overwrite
                        allow overwriting existing files
  --version             show program's version number and exite.g. to process all files in a folder (will ignore any file extensions except .cbr, .cbz, .rar or .zip).$ comic2pdf *PrerequisitesRequires Python 3.6+.Production dependencies are listed insetup.py. Development dependencies are listed inrequirements.txt.No installYou can use the package without installing it, simply install dependencies and run thecomic2pdf.pyscript. E.g.$ pip install -r requirements.txt
$ python comic2pdf.py -o /dest/folder file.cbrDevelopmentInstallingDevelopment is aided by a Makefile which uses a virtual environment. To setup the virtual environment and install dependencies:$ make initRunningTo test changes to your script, you can install a development version which links to your source code:$ python setup.py developAnd this can be uninstalled with$ python setup.py develop --uninstallYou may also run the script directly, but note that the dependencies are installed into the virtual environment. To enter the virtual environment:# Windows
$ source .venv/Scripts/activate
# Mac
$ source .venv/bin/activateThen run the script directly.(.venv) $ python comic2pdf.py -hLinting & formattingThis project makes use of theBlackpython code formatter which automatically reformats code. To run Black and lint the code, use:$ make lintPublishingUpdatesetup.pywith the new version number (e.g. 1.1.1)Create a new GitHub release (e.g.git tag -a v1.1.1 -m "Version v1.1.1" && git push --tags)Push to PyPI$ make deployAuthors and AcknowledgmentsphdesignMComas1(https://github.com/MComas1/comics2pdf)bransorem(https://github.com/bransorem/comic2pdf)
Package: comic-builder
comic-builderAn auxiliary tool formanga-pyto organize, merge and export the files in an
ebook format (EPUB or MOBI)DependenciesPython 3.6KCC>> To convert the images in ebook formatOptional dependenciesKindleGen >> EPUB to MOBI conversionCan be installed running thekindlegen-installercommand after install thecomic-builderpip packageCan also be found inAURandherefor manual installationInstallationpip install comic-builder
kindlegen-installer # to install KindleGenModulesToday there are 4 modules in this repositorycomic-builder> Join the comic files into an ebook formatkindlegen-installer> Install the KindleGen binarycomic-metadata-inject> Inject metadata files into the chapters files with the same namecomic-metadata-eject> Extract the chapter's metadata filesP.S. The commandscomic-metadata-injectandcomic-metadata-ejectcan be used together to edit some details in the
chapters metadataSuggested WorkflowFor sites that support chapter and comic metadata (Ex. MangaDex)manga-py --save-chapter-info --save-manga-info [-d|--destination] "COMIC_DOWNLOAD_PATH" [other-options...] URL
comic-builder [other-options...] "COMIC_DOWNLOAD_PATH/COMIC_NAME"For other sitesCreate a metadata file based
inthis filemanga-py [-d|--destination] "COMIC_DOWNLOAD_PATH" [other-options...] URL
comic-builder --metadata "METADATA_FILE" [other-options...] "COMIC_DOWNLOAD_PATH/COMIC_NAME"
Package: comicepub
comicepubdigital comic epub3 generatorInstallpip3installcomicepubUsagecomicepub--help
usage:comicepub[-h]-tTITLE--authorAUTHOR[--publisherPUBLISHER][--languageLANGUAGE]-iINPUT-oOUTPUT[--coverCOVER][--version]optionalarguments:-h,--helpshowthishelpmessageandexit-tTITLE,--titleTITLEBooktitle--authorAUTHORBookauthor--publisherPUBLISHERBookpublisher--languageLANGUAGEBooklanguage-iINPUT,--inputINPUTSourceimagesdirectoryofcomicbook-oOUTPUT,--outputOUTPUTOutputfilenameofcomicbook--coverCOVERcoverimagefileofcomicbook--versionshowprogram'sversionnumberandexitcomicepub\-i/path/to/your/comicdir\-o/path/to/save/output.epub\--title"Comicbook"\--author"comicepub"\--language"zh"fromcomicepubimportComicEpubcomicepub=ComicEpub("path/to/output.epub")comicepub.title=("Title","Title")comicepub.authors=[("Author 1","Author 1")]comicepub.publisher=('Comicbook','Comicbook')comicepub.language="ja"comicepub.add_comic_page(cover_data,cover_ext,cover=True)forimage_data,image_extinimages:comicepub.add_comic_page(image_data,image_ext,cover=False)comicepub.save()
Package: comicfn2dict
comicfn2dictAn API and CLI for extracting structured comic metadata from filenames.Installpipinstallcomicfn2dictAPIfromcomicfn2dictimportcomicfn2dict,dict2comicfnpath="Comic Series #001 Title (2024).cbz"metadata:dict[str,str|tuple[str,...]]=comicfn2dict(path,verbose=0)filename:str=dict2comicfn(metadata,bool=True,verbose=0)CLIcomicfn2dict"Series Name #01 - Title (2023).cbz"{'ext':'cbz','issue':'001','series':'Series Name','title':'Title','year':'2023'}
Package: comicgeeks
comicgeeksA python client for League of Comics Geeks.Search series, creators and characters by nameGet series, issues, creators and characters informationManage your comic collectionSubscribe to seriesMark issue as readAdd issue to collectionAnd more...InstallationUse the package managerpipto install comicgeeks.pipinstallcomicgeeksUsagefromcomicgeeksimportComic_Geeksclient=Comic_Geeks("my_ci_session")# search seriesclient.search_series("daredevil")# get new releasesclient.new_releases()# get info about an issueclient.issue_info(3616996)For more info check the documentation inhttps://comicgeeks.readthedocs.ioContributingPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.NoteThis project has been set up using PyScaffold 4.3. For details and usage
information on PyScaffold seehttps://pyscaffold.org/.LicenseMIT
Package: comicgen
ComicGen is the commandline tool to make ebooks formatted by mobi file format from jpeg images.
This is convinience when you want make own ebook comics scaned by yourself.InstallInstall it by easy way through pip:pip install comicgenor use easy_install:easy_install comicgenIf you have not use virtualenv and virtualenvwrapper yet, it is very nice tool to make a depended environment:mkvirtualenv comicgen
pip install comicgenSee details onvirtualenvwrapper document.UsageFirst of all, you have to make the dir containig image of pages:./comic_title
    |- 0001.jpg
    |- 0002.jpg
    |- 0003.jpg
    |- 0004.jpg
    |- 0005.jpg
    |- 0006.jpg
    +- 0007.jpgYou also have to download the kindlegen package fromthe official siteand unpacked it:$ wget http://kindlegen.s3.amazonaws.com/KindleGen_Mac_i386_v2_9.zip
$ unzip KindleGen_Mac_i386_v2_9.zipIf you finished to make it and install the depended libraries, run its command:$ mkdir output
$ comicgen --title 'Hello Comic' --author 'Takahiro Fujiwara' --publisher 'ComicGen' --output ./output -k ./kindlegen ./comic_titleA mobi file will appear in the output dir that you set as the option of comicgen:$ ls ./output
Hello Comic.mobiAdvanced UsageWhen you buy so many comics and scan them, comicgen-volumes command is nice.Separate volumes by each directories:./comic_title
    +- 0001
    |   |- 0001.jpg
    |   |- 0002.jpg
    |   +- 0003.jpg
    +- 0002
        |- 0001.jpg
        +- 0002.jpgAnd run it:$ comicgen-volumes --title-template 'Hello Comic %(volume)i' --author 'Takahiro Fujiwara' --publisher 'ComicGen' --output ./output -k ./kindlegen ./comic_titleLicenseComicGen is released under the MIT License.http://www.opensource.org/licenses/mit-license
Package: comic-home-api
comic_home_apiA comic home api package.Installation$pipinstallcomic_home_apiUsageTODOContributingInterested in contributing? Check out the contributing guidelines. Please note that this project is released with a Code of Conduct. By contributing to this project, you agree to abide by its terms.Licensecomic_home_apiwas created by Hongbo Liu. It is licensed under the terms of the MIT license.Creditscomic_home_apiwas created withcookiecutterand thepy-pkgs-cookiecuttertemplate.
Package: comic-html-view-generator
comic_html_view_generator is a command-line tool and library for creating
static HTML files for viewing comic books. Given a directory with images or
.cbz files in it, it’ll create HTML files which embed those images in order,
and an overall “browse all the comics here” HTML page which will list all the
comics books which have had a readable HTML file generated from them.InstallationInstall this library via Pip:pip install comic-html-view-generatorUse with:python -m comic_html_view_generator --source <SOURCE_PATH> --destination <DESTINATION_PATH>AssumptionsThis tool makes many assumptions about your directory structure. It assumes
that in the directory tree provided, that all the images comprising a single
“comic book” will be collected into a single folder with all the images in it,
with no sub-folders. It’s assumed that each image in an “image folder” is a
single “page” of that comic book. Additionally, it further assumes that the
alpha-numeric order (00comes before01comes before0a) of the names of
the images in each folder represent the “order” of each page in the comic book.UsageUsage of the script is as follows:$ python -m comic_html_view_generator
usage: comic_html_view_generator.py [-h] [-v] --source SOURCE --destination DESTINATION
                                    [--embed-images] [--maintain-existing-images]

Create HTML files for browsing directories of images as though those directories
represent comic books. Will also automatically expand .cbz files.

optional arguments:
  -h, --help            show this help message and exit
  -v, --verbose         If set, logs additional information to stderr during execution
  --source SOURCE       The source directory of images/cbz files, which will be used as
                        the basis for the all-new directory with images and HTML files
                        for viewing those images.
  --destination DESTINATION
                        The destination directory to be filled with images and HTML
                        files for viewing those images.
  --embed-images        If specified, causes all images to be embedded into the
                        generated HTML files as base64 encoded data URIs. Grows page
                        size, but improves portability.
  --maintain-existing-images
                        If provided, then images (in folders and CBZ files) will only be
                        copied into the 'destination' directory if there isn't already a
                        file with the same name in the destination directory. If an
                        image file would be copied from source to destination, but it
                        exists in destination already, then it is not copied if this
                        argument is provided.
Package: comiclib
📚 ComicLibManage, read and share your comic/manga libraryEnglish |中文✨ Features📁 Supportmultiple archive formats, including folders🏷️ Customizable tag and category metadata import and management withplugins💻LANraragi-compatible API📜 scroll / book mode reader (eHunter)🔁 Tag translation (EhTagTranslation)🖼️ Support JPEG XL🚀 InstallationMake sure you have 🐍 Python ⩾ 3.9 installed, and install 📚 ComicLib with the following commandpip install -U "comiclib[full]"Then run the following command in the location of your comic library to startcomiclibIt will automatically scan the comics in the current working directory.Now you can openhttp://127.0.0.1:8000and start reading.🍰 One more stepSpecify the location for scanning comicsThe default scan location is the current working directory, which can be specified via the environment variableCONTENT.
For example, you can add it before the commandCONTENT=/home/user/mycomics comiclibModify the bound port or IP addressInstead of runcomiclibdirectly, run with the following commanduvicorn comiclib.main:app --host 0.0.0.0 --port 80where--host 0.0.0.0specifies the bound IP (0.0.0.0enables LAN access), and--port 80specifies the bound port.📄 Please see thedocumentationfor more settings.👩‍💻 ContributingContributions, issues and feature requests are very much welcome.
Feel free to join the group for deeper communication.
Package: comic-list
comic-list.py - Output a list of owned/missing issues of a comic book series in a single folderInstallationpip install comic-listDescriptioncomic-list.py will print a list of owned and missing issue numbers given a folder which contains comic book files with issue number in the file name.Default supported extensions are: CBZ, CBR, CB7, CBA, CBTWhen run no arguments it will use the following defaults:Get file names from current directory matching supported extensionsGet the issue number immediately succeeding the#symbolUse the first and last issue numbers in the directory as the total rangepython comic-listOptionsYou can view the arguments by runningpython comic-list --helppositional arguments:
  dir                   Input folder

optional arguments:
  -h, --help            show this help message and exit
  --start START, -s START
                        Starting number
  --end END, -e END     Ending number
  --digit-group [DIGIT_GROUP], -d [DIGIT_GROUP]
                        Nth digit group in file name that contains issue
                        number
  --filetype FILETYPE, -f FILETYPE
                        Custom file extension to check forStarting and ending numberBy default the script will use the lowest and highest issue number from the files in the folder as the starting and ending points for the range. If the folder is missing the first and last issue in a series, manually specify these numbers.Digit groupBy default the script will use regex to get the issue number from a file name immediately succeeding the#symbol.If your file names do not contain the#symbol, you can call--digit-groupwith no arguments to grab the first set of digits in the file name as the issue number.If the first set of digits in the file name is not the issue number, for example if the year preceeds the issue number in the file name, you can supply a number to--digit-groupto specify which Nth group of digits in the file name is the issue number.ExamplesView theexamplesfolder for example output for each argument type
Package: comicon
ComiconComicon is a lightweight comic converter library between CBZ, PDF, EPUB, and MOBI that preserves metadata. Once Comicon has converted a comic, it isguaranteedthat the reverse conversion will restore the original comic with all of its original metadata.UsageFor a command line interface, please seeMandown.importcomiconcomicon.convert("comic.cbz","comic.epub")InstallationAmazon'sKindlegenis required if you want to convert to MOBI. Seeherefor more information.Comicon is available from PyPI:pip install comiconSupported conversionsFormatConvert from?Convert to?CBZ:heavy_check_mark::heavy_check_mark:EPUB:heavy_check_mark::heavy_check_mark:PDF:heavy_check_mark::heavy_check_mark:MOBI:x::heavy_check_mark:Format discrepanciesOnly EPUB supports a table of contents. CBZ and PDF will encode the table of contents so that it is restored upon converting to EPUB.PDF does not support importing genre data due to a lack of library support. This may be worked around in the future.NotesUnder the hood, Comicon converts each format into theComicon Intermediate Representation (CIR)— more or less a strictly structured folder, which allows for many guarantees to be made for each input and output plugin. Seecomicon.cirtoolsfor more information.For new input and output formats to be added, they should be added incomicon.inputsorcomicon.outputsrespectively as a new module and in the__init__.pyfile(s).