1. 23 Oct, 2020 1 commit
  2. 24 Jul, 2020 4 commits
  3. 23 Jul, 2020 1 commit
  4. 22 Jul, 2020 1 commit
  5. 06 Jul, 2020 1 commit
  6. 06 Oct, 2019 3 commits
    • Yuya Nishihara's avatar
      log: populate keywords if specified in custom -Tjson(...) or -Tcbor(...) · 829088e87032
      Yuya Nishihara authored
      To make things simple, early return for ui.quiet is disabled if the formatter
      is templated and provides some datahint().
    • Yuya Nishihara's avatar
      formatter: map -Tjson(...) and -Tcbor(...) to templater · 1d12ae5096d1
      Yuya Nishihara authored
      Even though custom JSON output could be generated by using
      --config template.json="{dict(...)|json}" ..., doing that is tedious because
      of the trailing comma handling.
      This patch introduces special syntax for JSON/CBOR formats. -Tjson(...) is
      translated to template as if function-style template definition were
        json(...) = "{dict(...)|json}"
        json(...):docheader = "[\n "
        json(...):docfooter = "\n]\n"
        json(...):separator = ",\n "
    • Yuya Nishihara's avatar
      formatter: parse name of built-in formatter templates in standard way · 90b9a7e06c2c
      Yuya Nishihara authored
      This slightly makes it easier to add "-Tjson(...)" handling, which should
      be enabled only if the template specifier doesn't look like a literal
      template. In other words, it should be handled after "if '{' in tmpl".
      This makes "log -Tpickle" and "log -Tdebug" abort, which I think is better
      than just printing "picklepicklepickle...".
  7. 23 Mar, 2019 1 commit
  8. 10 Mar, 2019 1 commit
    • Yuya Nishihara's avatar
      template: add CBOR output format · 77ef3498ceb3
      Yuya Nishihara authored
      The whole output is wrapped as an array just like the other serialization
      formats. It's an indefinite-length array since the size is unknown while
      encoding. Maybe we can add 'cbor-stream' (and 'pickle-stream') as needed.
  9. 26 Jan, 2019 1 commit
  10. 16 Jun, 2018 1 commit
  11. 07 Jun, 2018 1 commit
    • Yuya Nishihara's avatar
      formatter: populate ctx from repo and node value · 34ecc0a09c76
      Yuya Nishihara authored
      This will basically replace the fm.contexthint() API. I originally thought
      this would be too complicated, and I wrote 8399438bc7ef "formatter: provide
      hint of context keys required by template" because of that. However, I had
      to add a similar mechanism for fctx templates, and the overall machinery
      became way simpler than my original patch.
      The test output slightly changed as {author} is no longer available in
      the {manifest} context, which isn't the point this test targeted on.