doing icon indicating copy to clipboard operation
doing copied to clipboard

[BUG] adding new template using wiki instructions is not working

Open lexthanthree opened this issue 3 years ago • 3 comments

Describe the bug

Following directions to create a new output_format entry does not work.

To Reproduce

  1. doing template css > ~/.config/doing/templates/mycustom.css
  2. doing config export_templates
  3. edit export template entry with one from the wiki mycss: ~/.config/doing/templates/mycustom.css
  4. run doing template -l
  5. the mycss template is not listed anywhere
  6. trying to use the mycss as an output_format does not work

Please execute the problematic command with the prefix GLI_DEBUG=true DOING_DEBUG=true and include the output with your bug report. E.g. GLI_DEBUG=true DOING_DEBUG=true doing completion --type zsh.

Expected behavior

The template should be available as described in the wiki

Desktop (please complete the following information):

  • Platform: Mac
  • OS: Montery
  • Version 12.3.1

Doing version

  • doing version 2.1.47

Ruby version

  • ruby 2.6.8p205

lexthanthree avatar Apr 18 '22 18:04 lexthanthree

Your description of steps does not make sense to me. If you've created a custom CSS template, then that template needs to be assigned in config. Set export_templates->css to ~/.config/doing/templates/mycustom.css and then when an export function uses the css template, the configured CSS file would be used. It will not change the available export options.

doing config set export_templates.css ~/.config/doing/templates/mycustom.css

-Brett

On 18 Apr 2022, at 13:49, lexthanthree wrote:

Describe the bug

Following directions to create a new output_format entry does not work.

To Reproduce

  1. doing template css > ~/.config/doing/templates/mycustom.css
  2. doing config export_templates
  3. edit export template entry with one from the wiki mycss: ~/.config/doing/templates/mycustom.css
  4. run doing template -l
  5. the mycss template is not listed anywhere
  6. trying to use the mycss as an output_format does not work

Please execute the problematic command with the prefix GLI_DEBUG=true DOING_DEBUG=true and include the output with your bug report. E.g. GLI_DEBUG=true DOING_DEBUG=true doing completion --type zsh.

Expected behavior

The template should be available as described in the wiki

Desktop (please complete the following information):

  • Platform: Mac
  • OS: Monterya
  • Version 12.3.1

Doing version

  • doing version 2.1.47

Ruby version

  • ruby 2.6.8p205

-- Reply to this email directly or view it on GitHub: https://github.com/ttscoff/doing/issues/137 You are receiving this because you were assigned.

Message ID: @.***>

ttscoff avatar Apr 18 '22 20:04 ttscoff

sorry i mistyped what i did i used doing config export_templates which opens the config file in vim on my system then in ~/.doingrc i edited the export_templates key to look similar to

export_templates:
    mycss: ~/.config/doing/templates/mycustom.css

then save quit (note that i did this both to .doingrc and to ~/.config/doing/config.yml)

So the file mycustom.css contains the same template as is output by doing template css (just trying to get it working before tweaking it)

the .doingrc and the config.yml both have an entry in export_templates pointing to mycustom.css

the template does not show up when running doing template -l

edit: I did try both wrapping the path in double quotes and no quotes, currently it is no quotes per the wiki example of a custom template

lexthanthree avatar Apr 18 '22 21:04 lexthanthree

You can’t add your own keys to export templates, you can only point existing keys to your custom template. Add your path to the css key and when you export a format that calls css (html) it will be used instead of the default.

Thanks, Brett On Apr 18, 2022, 4:09 PM -0500, lexthanthree @.***>, wrote:

sorry i mistyped what i did i used doing config export_templates which opens the config file in vim on my system then in ~/.doingrc i edited the export_templates key to look similar to export_templates: mycss: ~/.config/doing/templates/mycustom.csss then save quit (note that i did this both to .doingrc and to ~/.config/doing/config.yml) — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were assigned.Message ID: @.***>

ttscoff avatar Oct 11 '22 08:10 ttscoff