How to output a .plist
's <data> element from a pkl file?
#981
mobileskyfi
started this conversation in
General
Replies: 1 comment 3 replies
-
Pkl currently doesn't have a binary type, so, there isn't built-in support for this. You can, however, use a render directive, which is an escape hatch to get the renderer to behave how you want. For example: function plistData(data: String): RenderDirective = new {
text = """
<data>\(data)</data>
"""
}
myKey = plistData("Bace64E8c0dedDa7a==")
output {
renderer = new PListRenderer {}
} |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm trying pkl-lang to generate some
.plist
files. But I do not know how in pkl to express aData()
blob into output ofpkl eval -f plist
which is a<data>
tag in<dict>
. For example, this is the output I'd like:Now I'm not sure what Pkl type - if any - will result in a tag from the
PListRenderer()
. The desired Base64-encoded data output is fixed – so I don't need to do any encoding.Is there some Pkl syntax to get a in rendered
plist
?Related question, is there a .plist to .pkl converter? Because that might have been able to solve this mystery.
Beta Was this translation helpful? Give feedback.
All reactions