Skip to main content

a plugin for lkmlfmt

Project description

lkmlfmt-djhtml

A plugin for lkmlfmt.

Installation

pip install lkmlfmt lkmlfmt-djhtml

CLI

lkmlfmt --plugin lkmlfmt_djhtml

API

from lkmlfmt import fmt

lkml = fmt("""\
view: view_name {
  dimension: column_name {
    html:
{% if value == "foo" %}
<img src="https://example.com/foo"/>
{% else %}
<img src="https://example.com/bar"/>
{% endif %} ;;
  }
}
""", plugins=["lkmlfmt_djhtml"])

assert lkml == """\
view: view_name {
  dimension: column_name {
    html:
      {% if value == "foo" %}
        <img src="https://example.com/foo"/>
      {% else %}
        <img src="https://example.com/bar"/>
      {% endif %}
    ;;
  }
}
"""

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lkmlfmt_djhtml-0.0.1.tar.gz (14.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lkmlfmt_djhtml-0.0.1-py3-none-any.whl (15.2 kB view details)

Uploaded Python 3

File details

Details for the file lkmlfmt_djhtml-0.0.1.tar.gz.

File metadata

  • Download URL: lkmlfmt_djhtml-0.0.1.tar.gz
  • Upload date:
  • Size: 14.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.0 CPython/3.10.6 Linux/5.15.0-1037-azure

File hashes

Hashes for lkmlfmt_djhtml-0.0.1.tar.gz
Algorithm Hash digest
SHA256 b66727219fe8b87ed1c7087c20a6a699e17b51e84a8f2ab35a18004e030d4ec4
MD5 214917f16e0c0933b350d523cd964cff
BLAKE2b-256 7691115c005f49968a115baef5a6883c7d303dd67f210bd4fee3a47bc8063b77

See more details on using hashes here.

File details

Details for the file lkmlfmt_djhtml-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: lkmlfmt_djhtml-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 15.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.0 CPython/3.10.6 Linux/5.15.0-1037-azure

File hashes

Hashes for lkmlfmt_djhtml-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c901d7b32d756684eb1dd012e31227c9f576be899499004c7315cae262b50001
MD5 fff9caf6646dc9a0c3755ad815b020cc
BLAKE2b-256 f4e0fdee6398a0f3a97b771ff31cc20e0943953868f4e742a5fcdbd87cdd698c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page