OpenRefine / OpenRefine/CommonsExtension

Support for extracting positional template parameters

Open
#5 0 comments 0 reactions 1 assignee View on GitHub

@j-sal is already working on this.

Since Apr 30, 2022.

expression language
Dominant language
Java
Stars
29
Forks
12
PR merge metrics
No merged PRs in 30d

Description

Sometimes we want to extract the values of template parameters which are positional (just designated by positions, not parameter names).

For instance:
{{location|60.165787|24.9460811}}
(taken from Sandra's parsing wishlist).

We could want to extract the first and second values in the template. One possible way would be to extend the functionality of the findTemplateValues() function that we already have, so that it accepts a number as third argument, like this:

findTemplateValues(wikitext, 'location', 1)

On the sample wikitext above, it would return ['60.165787'].

When running findTemplateValues(wikitext, 'location', 2) you would get ['24.9460811'].

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.