NaitLee / Cat-Printer

Application supporting Bluetooth thermal “Cat Printers”, for everyone!
GNU General Public License v3.0
333 stars 33 forks source link

Frequently Asked Questions #10

Open NaitLee opened 2 years ago

NaitLee commented 2 years ago

F.A.Q.

General

I afraid of tech :(

Try this Web app: https://print.unseen-site.fun/

It doesn’t require installing anything. Supports Windows/macOS/Android/IOS with a Chromium-based browser or Safari.

I see the built-in Web UI have few features

In fact much work is done for base, and technical users. More will be there, progress by time.

What about CUPS/IPP?

At the moment, please see intro here.

I have a question, and I think we should talk for a long time

Try Discussions! General problems you've encountered can still be in issues. Feel free to use whichever you like!

An error happened here, saying "no running event loop"

See this for getting the "real" error, then report.

我想说汉语

没问题!如果相关话题还不存在,请考虑新建(Issue 或 Discussion 等)。

Tip: dedicated topics are also applicable to any other languages. But, consider the status of community, few languages could be generally supported though.

Advanced

How do I use command line?

By executing printer.py without parameters, it will give some help. If something is still confusing, use Issue/Discussion to let me know.

Or examples: (assuming magick or convert is there)

# Scan printer for 2 seconds, by dithering `kitty.png` as image,
# print to a found GB03 printer (if found any)
python3 printer.py  -s 2,GB03  -c image  kitty.png
# Scan for 1 second, print `diary.txt` text content with 16px Source-Code-Pro,
# to any found compatible printer
python3 printer.py  -s 1  -t 16,Source-Code-Pro  diary.txt

Where can I get a PF2 font?

If have Linux/GRUB, first try to use grub-mkfont. If not, take this: unifont.pf2.zip

Extract to project dir & start hacking: (magick not needed here)

# A terminal Typewriter! With 2x font size! (read stdin; line buffered; with optional `nowrap`)
python3 printer.py  -s 2  -t 2,unifont,pf2,nowrap  -
# Print weather! (`-e` to customize more thermal strength, i.e. visibility)
curl 'wttr.in/?T&0' | python3 printer.py  -s 2  -t 1,unifont,pf2  -e 0.4  -
# Receive message from a TCP socket, and print received text
# in reversed chronological order, by line, until it's closed
socat tcp-listen:8096 - | python3 printer.py  -t 1,unifont,pf2  -p flip  -
# ... of course you need to communicate with this socket at somewhere else

P.S. I'm planning a PF2 generator in Web (Browsers). But I can't yet promise it will be completed...

Can I expose printer service to a network?

You can do it, with -a switch on server.py. By the way -s for not opening a browser.

But think twice before that, since it may allow unauthorized access (to the printer), and may raise security problems.