TikTokPrinter.client.printer package
Submodules
TikTokPrinter.client.printer.engine module
Copyright (C) Isaac Kogan, Inc - All Rights Reserved Unauthorized copying of this project, via any medium is strictly prohibited Proprietary work of Isaac Kogan Written by Isaac Kogan <isaacikogan@gmail.com>, April 2022
You are permitted to use this project commercially so long as it was purchased firsthand from Isaac Kogan. Distributing secondhand copies to others is strictly prohibited & is illegal.
You can do anything with this project except redistribute it.
- class TikTokPrinter.client.printer.engine.PrinterEngine(engine: TikTokPrinter.client.engines.escpos.EscposEngine, loop: asyncio.events.AbstractEventLoop)
Bases:
object
Printer engine for sending commands to various inner engines (EscposEngine, VoiceEngine, SoundEngine, etc.)
- image(image: TikTokPrinter.types.objects.PrinterImage) None
Format & print an image
- Parameters
image – Image to print
- Returns
None
- sound(sound: TikTokPrinter.types.objects.SoundFile) None
Play a sound
- Parameters
sound – The sound to play
- Returns
None
- text(text: TikTokPrinter.types.objects.PrinterText) None
Format & print text
- Parameters
text – The text to print
- Returns
None
- async voice(voice: TikTokPrinter.types.objects.VoiceText) None
Format & speak a text-to-speech message
- Parameters
voice – The text message to speak out loud
- Returns
None
TikTokPrinter.client.printer.interface module
Copyright (C) Isaac Kogan, Inc - All Rights Reserved Unauthorized copying of this project, via any medium is strictly prohibited Proprietary work of Isaac Kogan Written by Isaac Kogan <isaacikogan@gmail.com>, April 2022
You are permitted to use this project commercially so long as it was purchased firsthand from Isaac Kogan. Distributing secondhand copies to others is strictly prohibited & is illegal.
You can do anything with this project except redistribute it.
- class TikTokPrinter.client.printer.interface.PrinterInterface(loop: asyncio.events.AbstractEventLoop, engine: TikTokPrinter.client.engines.escpos.EscposEngine)
Bases:
object
Printer Interface, controller of everything.
- QUEUE_INTERVAL: float = 0.5
Interval at which to handle printer messages
- image(content: <module 'PIL.Image' from 'c:\\users\\jeanm\\pycharmprojects\\printertwo\\venv\\lib\\site-packages\\PIL\\Image.py'>, index: int) None
Print an image to the printer via the EscposEngine
- Parameters
content – The PIL Image to send
index – The index in the queue to insert it
- Returns
None
- queue(collection: TikTokPrinter.types.objects.PrinterCollection, index: int) None
Send multiple types of messages to the engine to perform all at once, consecutively
- Parameters
collection – The printer collection containing your desired events
index – The index in the queue to insert the collection
- Returns
None
- sound(file_path: str, index: int) None
Play a sound file via the SoundEngine
- Parameters
file_path – The file path of the sound to play
index – The index in the queue to insert it
- Returns
None
- start() None
Start handling printer tasks
- Returns
None
- stop() None
Stop handling printer tasks
- Returns
None
- text(content: str, index: int, bold: bool = False) None
Print text to the printer via the EscposEngine
- Parameters
content – The message to sent
index – The index in the queue to insert it
bold – Whether to override the bold formatting settings & make this message bold
- Returns
None
- voice(content: str, index: int) None
Send a voice message via the VoiceEngine
- Parameters
content – The message (text)
index – The index in the queue to insert it
- Returns
None
Module contents
Copyright (C) Isaac Kogan, Inc - All Rights Reserved Unauthorized copying of this project, via any medium is strictly prohibited Proprietary work of Isaac Kogan Written by Isaac Kogan <isaacikogan@gmail.com>, April 2022
You are permitted to use this project commercially so long as it was purchased firsthand from Isaac Kogan. Distributing secondhand copies to others is strictly prohibited & is illegal.
You can do anything with this project except redistribute it.