Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

List raw sockets during printers subcommand if available #340

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

zdohnal
Copy link
Contributor

@zdohnal zdohnal commented Feb 13, 2024

Provide a way how to show path to raw socket via CLI without 3rd part tools.

@zdohnal zdohnal changed the title List raw sockets during printers subcommand if available [WIP] List raw sockets during printers subcommand if available Feb 13, 2024
Provide a way how to show path to raw socket via CLI without 3rd part
tools.
@zdohnal zdohnal changed the title [WIP] List raw sockets during printers subcommand if available List raw sockets during printers subcommand if available Feb 13, 2024
Copy link
Owner

@michaelrsweet michaelrsweet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See comments. I'd also like to see this under a "--verbose" option so the default just lists the printer names.

}

if (printer_name && printer_uri)
printf("%s - printer - %s\n", printer_name, printer_uri);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not keen on the format here - better to display the raw URL separately, e.g.:

PRINTER-NAME
    ipp://HOSTNAME:PORT/ipp/print/PRINTER-NAME
    ipps://HOSTNAME:PORT/ipp/print/PRINTER-NAME
    socket://HOSTNAME:PORT

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, any text would need to be localized, so the above format avoids that particular issue...


if (printer->raw_active)
{
if (!ra || cupsArrayFind(ra, "smi55357-printer-socket-uri-supported"))
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about "smi55357-socket-uri-configured"? You need to configure for raw printing support and we don't need to have "printer" in the name.

if (attr == NULL)
break;

value_tag = IPP_TAG_CUPS_INVALID;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think you need to initialize a default attr_name or value_tag value. And printer-uri-supported is multi-valued so we might as well show all of the values.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants