Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mangal config info -j produces invalid json #129

Closed
oae opened this issue Nov 2, 2022 · 3 comments · Fixed by #128
Closed

mangal config info -j produces invalid json #129

oae opened this issue Nov 2, 2022 · 3 comments · Fixed by #128
Labels
bug Something isn't working

Comments

@oae
Copy link

oae commented Nov 2, 2022

Describe the bug

When getting the JSON format of the configs, the Produced output is not a valid JSON. It will be outputted like below;

{"key":"reader.plain","value":"","description":"What app to use to open folders","type":"string"}
{"key":"reader.read_in_browser","value":false,"description":"Open chapter url in browser instead of downloading it","type":"bool"}
{"key":"reader.zip","value":"","description":"What app to use to open zip files","type":"string"}
{"key":"search.show_query_suggestions","value":true,"description":"Show query suggestions in when searching","type":"bool"}
{"key":"tui.item_spacing","value":1,"description":"Spacing between items in the TUI","type":"int"}
{"key":"tui.read_on_enter","value":true,"description":"Read chapter on enter if other chapters aren't selected","type":"bool"}
{"key":"tui.reverse_chapters","value":false,"description":"Reverse chapters order","type":"bool"}
{"key":"tui.search_prompt","value":"\u003e ","description":"Search prompt string to use","type":"string"}
{"key":"tui.show_downloaded_path","value":true,"description":"Show path where chapters were downloaded","type":"bool"}

Reproduction steps

Execute the command mangal config info -j

Expected behavior

Output should be like below;

[
  {"key":"reader.plain","value":"","description":"What app to use to open folders","type":"string"},
  {"key":"reader.read_in_browser","value":false,"description":"Open chapter url in browser instead of downloading it","type":"bool"},
  {"key":"reader.zip","value":"","description":"What app to use to open zip files","type":"string"},
  {"key":"search.show_query_suggestions","value":true,"description":"Show query suggestions in when searching","type":"bool"},
  {"key":"tui.item_spacing","value":1,"description":"Spacing between items in the TUI","type":"int"},
  {"key":"tui.read_on_enter","value":true,"description":"Read chapter on enter if other chapters aren't selected","type":"bool"},
  {"key":"tui.reverse_chapters","value":false,"description":"Reverse chapters order","type":"bool"},
  {"key":"tui.search_prompt","value":"\u003e ","description":"Search prompt string to use","type":"string"},
  {"key":"tui.show_downloaded_path","value":true,"description":"Show path where chapters were downloaded","type":"bool"}
]

Additional context

No response

Operating System

Linux

@oae oae added the bug Something isn't working label Nov 2, 2022
@metafates
Copy link
Owner

Sure, will fix. For some reason I thought it was fine as it is, but you're right, yes

@oae
Copy link
Author

oae commented Nov 2, 2022

Also, the config values inside the JSON output don't match the raw output.

image

@metafates
Copy link
Owner

Yeah, fixed that too, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants