Page MenuHomePhabricator

Deal with key: value texts
Closed, ResolvedPublicFeature

Description

Create a format or additional parameters to an existing format that will allow to parse lines of the pattern key = value or key: value in text output.

Example:
snap info certbot reports:

name:      certbot
summary:   Automatically configure HTTPS using Let's Encrypt
publisher: Certbot Project (certbot-eff✓)
store-url: https://snapcraft.io/certbot
contact:   https://github.com/certbot/certbot/issues
license:   unset
description: |
  The objective of Certbot, Let's Encrypt, and the ACME (Automated
  Certificate Management Environment) protocol is to make it possible
  to set up an HTTPS server and have it automatically obtain a
  browser-trusted certificate, without any human intervention. This is
  accomplished by running a certificate management agent on the web
  server.
  
  This agent is used to:
    - Automatically prove to the Let's Encrypt CA that you control the
    website
    - Obtain a browser-trusted certificate and set it up on your web server
    - Keep track of when your certificate is going to expire, and renew it
    - Help you revoke the certificate if that ever becomes necessary.
commands:
  - certbot
services:
  certbot.renew: oneshot, enabled, inactive
snap-id:      wy7i66qPx4neXr6m9rTh7Y40h8EhtZFh
tracking:     latest/stable
refresh-date: 18 days ago, at 04:34 +07
channels:
  latest/stable:    1.19.0      2021-09-07 (1434) 44MB classic
  latest/candidate: ↑                                  
  latest/beta:      1.19.0      2021-09-07 (1434) 44MB classic
  latest/edge:      1.20.0.dev0 2021-09-26 (1488) 44MB classic
installed:          1.19.0                 (1434) 44MB classic

With the new feature applied, {{#external_value:name}} should return certbot; {{#external_value:summary}}, Automatically configure HTTPS using Let's Encrypt; {{#external_value:publisher}}, Certbot Project (certbot-eff✓); etc.

Event Timeline

Change 724811 had a related patch set uploaded (by Alex Mashin; author: mashin):

[mediawiki/extensions/ExternalData@master] Create new format key-value

https://gerrit.wikimedia.org/r/724811

Change 724811 merged by jenkins-bot:

[mediawiki/extensions/ExternalData@master] Create new format ini

https://gerrit.wikimedia.org/r/724811

Change 725184 had a related patch set uploaded (by Alex Mashin; author: mashin):

[mediawiki/extensions/ExternalData@master] Allow line comments in 'INI' format

https://gerrit.wikimedia.org/r/725184

Change 725184 merged by jenkins-bot:

[mediawiki/extensions/ExternalData@master] Allow line comments in 'INI' format

https://gerrit.wikimedia.org/r/725184