Allow printers to hard-wire values of options
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
Research direction
Start with the option XML definition shown, especially constraints, enum_vals, arg_defval, and the proposed arg_val. Review how the engine handles per-printer values and determine whether direct driverval support can cover enum and free-valued options without enum boilerplate. Done means the supported behavior and its effect on user interfaces are defined and verified.
Written by the indexing model from the issue text.
Description
I'm looking for a reasonable way to hard-wire the value of an option for a specific printer. For example, with the following shortened definition, I can define the default value of the option:
<option type="enum" id="opt/Resolution">
<arg_longname><en>Resolution</en></arg_longname>
<arg_shortname><en>Resolution</en></arg_shortname>
<arg_execution> ... </arg_execution>
<constraints>
<constraint sense="true">
<driver>driver</driver>
<printer>printer</printer>
<arg_defval>ev/300dpi</arg_defval>
</constraint>
</constraints>
<enum_vals>
<enum_val id="ev/300dpi">
<ev_driverval>300</ev_driverval>
...
</enum_val>
<enum_val id="ev/600dpi">
<ev_driverval>600</ev_driverval>
...
</enum_val>
</enum_vals>
</option>
If I add constraints on the enum_vals so that only a single option remains available for a printer, the option will disappear fro user interfaces and it will effectively be hard-wired.
However, for options that always have exactly one value for each supported printers, this still requires adding an enum for each possible choice, and some boilerplate code. It obviously doesn't work at all for options that have free values.
What I'd ideally like to do is to directly define the driverval, so something like <arg_val>300</arg_val> instead of <arg_defval>ev/300dpi</arg_defval>. Is there a way to do that already?
- Dominant language
- Perl
- Stars
- 8
- Forks
- 5
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from OpenPrinting/foomatic-db-engine
-
Difficulty 3/5 1-2 days Newbie friendliness 42/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 45/100
OpenPrinting/foomatic-db-engine#12 · 1 reaction ·
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
-
Foomatic 4.1.0?Open
Difficulty 2/5 1-3 hours Newbie friendliness 35/100
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
All issues in OpenPrinting/foomatic-db-engine
Similar issues
-
Type: Bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
inverse-inc/packetfence#9707 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
RotherOSS/otobo#6457 · 2 comments ·
Maintainers usually reply within 1 day
-
🏭 producer platform - spam
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
openfoodfacts/openfoodfacts-server#15447 ·
Maintainers usually reply within 1 day
-
Harden argument handling in deploy-contract.shPossibly taken @Asta-wizard claimed this 1 day ago. OpenStellar Wave
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Feyisara2108/stellargive#1377 · 3 comments · 1 assignee ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100