kde print stuff
by Daniel Nicoletti
So Tim,
I've talked with another kde dev,
and we are planning to translate the ppds.py to C.
As I said earlier:
Well IMO there is no much use for GetMakes, GetModels outside
printing tools, also if you do getPPDS you will already have them all.
I think the best thing to do would be to create a method like
IppResult* getBestPPDForID(char *id, IppResult *resultOfPPDS)
{
this way I can use my QCups class which handles the authentication
on cups for me (with DBus the user would have to authenticate twice)
then getAllPPDS and pass the cups result to here.
Cups server (631) could use this method easily.
here there would be the ppd.py code
And returning a new object of IppResult with the best matching ppds
ordered. ppds.py isn't that hard to convert here and once done, it would
be easier for most KDE devs (which most of them only know C/C++) to
help improving the matcher...
}
>>>>>>
So what do you think of this? I think it's a good start,
if you can put this lib in py-cups binding we can work
latter on the XML thing that you are working on now.
Having this as a C lib might even be added directly in CUPS
thus maybe having Apple (cups devs) to help too.
It would be great if we could do an ippRequest(get-best-ppds)
on the server.
Best.
.................................
Hi Daniel,
It's great to hear that the KDE printing tools will be getting some more
traction.
On Fri, 2010-11-19 at 16:52 -0800, Daniel Nicoletti wrote:
> Well I'm writing new printing tools for KDE with C++,
> and the thing that these tools are missing is the logic
> that the python ppd.py file has.
> As we talked it would be great if that file were converted
> to C, this way you could write your py bindings around it
> I could use it easily in my KDE code and even
> http://localhost:631 could use it.
What I've been trying to get to in preparation for system-config-printer
1.3 is the ability to have D-Bus activation for various parts of the
program. I've been concentrating so far on the UI parts (e.g. various
dialogs), but it would also be great to have an activatable system
service which would provide the interface from ppds.py.
That way it would be usable from any language. I think this would also
be the quickest way to make this code usable from any language, rather
than converting to the lowest common denominator.
I'm hoping to release 1.2.95 shortly which has several interface changes
compared to 1.2.4. In particular, with the PPDs class, there is a new
concept of "fit", i.e. how well the driver matches to a particular
printer. This is a better and more descriptive model than the status
codes used in 1.2.x. A new method, getPPDNamesFromDeviceID, returns the
complete set of candidate drivers for a given printer along with how
well each fits.
So we could have an interface "….Printing" with methods:
* "SplitMakeAndModel" for converting ppd-make-and-model strings into
separate strings for make and model, and
* "GetPPDsMatcher" for creating a new PPDs object for a particular
language and returning its object path
This PPDsMatcher object could itself have an interface containing:
* GetMakes, returning a UTF-8 string list
* GetModels, given a make, returning a UTF-8 string list
* GetInfoFromModel, returning a list of attributes given a make and
model
* GetInfoFromPPDName, returning a list of attributes given a PPD name
* GetPreferredPPDNamesFromDeviceID, returning a list of tuples of PPD
names and how well each fits, in preference order using the new
XML-driven method¹ (this would be a combination of
getPPDNamesFromDeviceID and orderPPDNamesByPreference)
Not entirely sure yet what the D-Bus signature for a list of attributes
would be: perhaps a{sav}, or perhaps something simpler.
What do you think about this approach?
Tim.
*/
________________________________
Daniel Nicoletti - KDE Developer
http://dantti.wordpress.com
When a wicked man dies, his hope perishes;
all he expected from his power comes to nothing. Prov. 11:7
13 years, 4 months
system-config-printer-1.2.95
by Tim Waugh
I've just released system-config-printer-1.2.95:
http://cyberelk.net/tim/data/system-config-printer/1.3/
This is a snapshot of the master branch in preparation for a 1.3.0
release.
It includes the per-printer preference overrides, D-Bus object
activation for many objects, the New Printer and Printer Properties
dialogs have had their source code split out from
system-config-printer.py, and several other improvements.
I hope to release 1.3.0 in the next few weeks so it would be great to
have some feedback on this snapshot.
Thanks!
Tim.
*/
13 years, 5 months
pysmbc-1.0.10 is released
by Tim Waugh
I've just released pysmbc-1.0.10. This version can now compile against
Python 3.x, thanks to Patrick Geltinger's help.
Tim.
*/
13 years, 5 months
pycups-1.9.52 is released
by Tim Waugh
I've just released pycups-1.9.52. The only real change since 1.9.51 is
the addition of the cups.Connection.getPPDs2() method. This returns all
attribute values as lists, allowing multiple ppd-product values to be
reported.
Tim.
*/
13 years, 5 months