Skip to content

Add location-separator field#1414

Open
markk wants to merge 1 commit intopimutils:masterfrom
markk:master
Open

Add location-separator field#1414
markk wants to merge 1 commit intopimutils:masterfrom
markk:master

Conversation

@markk
Copy link

@markk markk commented Jun 14, 2025

Analogous to description-separator and url-separator this can be used in a format string when the location information is desired.

Analogous to `description-separator` and `url-separator` this can be
used in a format string when the `location` information is desired.
@sotpapathe
Copy link

I was about to create a PR implementing this exact thing. Is there anything blocking it from being merged? I'd love to have this feature.

@WhyNotHugo
Copy link
Member

Am I missing something? This location-separator field is not used anywhere. Did GitHub screw up the rebase?

@WhyNotHugo
Copy link
Member

No, looks like the original commit only sets this field too: 7350d21

But I don't see it used anywhere.

@sotpapathe
Copy link

I think the author's (and my) idea would be to use it in a format string passed to the --format option to allow further customization of the output.

In my case, it would allow changing this

--format '{title}{description-separator}{description} :: {location}{url-separator}{url}'

into this

--format '{title}{description-separator}{description}{location-separator}{location}{url-separator}{url}'

@WhyNotHugo
Copy link
Member

What's the difference between using location-separator in your template instead of putting just the separator itself in there?

@sotpapathe
Copy link

The difference is that events without a location will have unnecessary separators and look weird with the hardcoded separator, e.g.:

# only title
Some event :: 

# title and description
Some other event :: do foo :: 

# title and URL
Another event :: :: https://example.com

whereas with this PR the above would look like:

Some event
Some other event :: do foo
Another event :: https://example.com

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants