[opensuse-buildservice] osc results --csv --format
Hi! When writing a script a stumbled upon the --format option of the osc results command. It looked promising, but I could not find any documentation for the syntax of the format string. So I used the great osc --debugger option and came up with the following explanation: The --format option takes a format specification string similar to printf. However, the conversion specifiers take form %(field)s where field can be one of arch code details dirty pac package pkg prj project rep repo repository repostate state If have not tested all of them but this example worked like desired: --format '%(package)s|%(code)s|%(details)s' Not sure what is the difference between package, pkg, and pac (and others, which seem to be synomyms). For the usage as keywords in this option I could understand that they are just synonyms. But I copied them from real runtime data (Python dictionary). And I don't get why one would store synonym keys with the same value each in a Python dictionary. This is just for general information. If the documentation is correct, it could of course be added to the osc man page. Regards, Uwe Geuder Nomovok Ltd. Tampere, Finland uwe.gxuder@nomovok.com (bot check: humans correct 1 obvious spelling error) -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
Hi, On 2014-08-26 19:34:19 +0300, Uwe Geuder wrote:
The --format option takes a format specification string similar to printf. However, the conversion specifiers take form %(field)s where field can be one of
arch code details dirty pac package pkg prj project rep repo repository repostate state
If have not tested all of them but this example worked like desired:
--format '%(package)s|%(code)s|%(details)s'
Exact.
Not sure what is the difference between package, pkg, and pac (and others, which seem to be synomyms).
Yes, they are synonyms.
For the usage as keywords in this option I could understand that they are just synonyms. But I copied them from real runtime data (Python dictionary). And I don't get why one would store synonym keys with the same value each in a Python dictionary.
I don't know the exact reasons why these synonyms were introduced, but I assume it is mainly for "usability"/"convenience". Marcus -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
participants (2)
-
Marcus Hüwe
-
Uwe Geuder