Allow spaces in argument values. #1

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
3 participants

jhesch commented May 16, 2012

Hi Evan,

I was very pleased to find your rrd graph module. However, I wasn't able to include spaces in graph titles, etc., so I patched the module to replace tildes with spaces. Here it is if you'd like to merge it in.

Thanks,
Jacob


This is a hack to allow spaces in argument values (for example, for
arguments like --title). The hack is to have the module substitute all
occurrences of tilde in the URI with spaces before passing the
arguments to rrdtool.

It comes at the cost of losing the ability to place literal tilde
characters in graph text, which is not likely to be a problem in
practice. If it is found to be a problem, perhaps the character to
substitue (or the feature altogether) could be controlled with a
module directive.

@jhesch jhesch Allow spaces in argument values.
This is a hack to allow spaces in argument values (for example, for
arguments like --title). The hack is to have the module substitute all
occurrences of tilde in the URI with spaces before passing the
arguments to rrdtool.

It comes at the cost of losing the ability to place literal tilde
characters in graph text, which is not likely to be a problem in
practice. If it is found to be a problem, perhaps the character to
substitue (or the feature altogether) could be controlled with a
module directive.
fb323a0
Owner

evanmiller commented May 16, 2012

The proper solution would be to use quoted strings, e.g. --title="Foo Bar". Try this

a67111a

evanmiller closed this May 16, 2012

jhesch commented May 16, 2012

That is a nicer solution, except that the quotes are passed to rrd_graph_v which renders them literally in the title. Ideally the module would also strip quotes out of the string before passing it to rrd_graph_v.

I have problem with that module.
Quoted strings in arguments like "title" or "legend" works nice. But quoted strings in commands, like below, shows quotes literally on image:
GPRINT:bb:MAX:"MAX %8.2lf %s"

Am I doing something wrong?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment