dashy icon indicating copy to clipboard operation
dashy copied to clipboard

[QUESTION] How to import config file?

Open Larvotto opened this issue 3 years ago • 3 comments

Question

I've exported a config file via Update Configuration > Download as File. That gives me a yaml file in the following format (snippet copied from VSCode):

image

However, I can't see how to import this back into Dashy. Update Configuration > Edit Config uses the Tree or Code formats, neither of which are consistent with the format of the exported yaml file: Tree uses collapsible sections, and Code uses " and {} symbols that are stipped out of the export - so I can't simply paste the exported code straight back in.

I'm probably missing something basic, so would be very grateful for any assistance.

Category

Configuration

Please tick the boxes

Larvotto avatar Jun 29 '22 03:06 Larvotto

If you're enjoying Dashy, consider dropping us a ⭐
🤖 I'm a bot, and this message was automated

liss-bot avatar Jun 29 '22 03:06 liss-bot

Heya @Larvotto

You can use something like YAML to JSON, then in the config editor, select Code mode, and paste the contents in.

JSON and YAML have exactly the same structure, just YAML uses indentation instead of curly braces, commas and quotes. The mismatch is a bit inconsistent, I agree. But it's because yaml = nicer for humans, json = nicer for computers :)

Lissy93 avatar Jun 29 '22 12:06 Lissy93

Excellent, thanks. I knew it would be something basic!

BTW, the exported config - either to clipboard or a file - includes a rogue space at the very beginning, i.e., before "appConfig", which causes an error if not removed. No biggie to fix, but thought you might want to know.

BTW#2 - Dashy is excellent! Thanks so much for all your hard work.

Larvotto avatar Jul 01 '22 19:07 Larvotto

This issue has gone 6 weeks without an update. To keep the ticket open, please indicate that it is still relevant in a comment below. Otherwise it will be closed in 5 working days.

liss-bot avatar Aug 01 '22 01:08 liss-bot

Fix for that whitespace will be include in #799 :) ETA mid-August.

Lissy93 avatar Aug 01 '22 06:08 Lissy93

I've just had the same problem with the rogue space in the exported config file in v2.1.1

Error, unable to validate 'conf.yml' 
⚠️ Error on line 8, column 0: end of the stream or a document separator is expected
  6 |       path: https://github.com/ ...
  7 |     - title: Documentation
  8 |       path: https://dashy.to/docs
  9 | appConfig:
------^
 10 |   theme: nord-frost
 11 |   layout: auto

When I opened the file in VS Code, I found that the pageInfo section header was incorrectly indented by one space.

 pageInfo:
  title: Dashy
  description: Welcome to your new dashboard!
  navLinks:
    - title: GitHub
      path: https://github.com/Lissy93/dashy
    - title: Documentation
      path: https://dashy.to/docs
appConfig:

yannduran avatar Oct 25 '22 08:10 yannduran

Are you serious? You have the option to download a backup file of the configuration, but no way to import it? are you kidding me?

Niemand112233 avatar Jul 25 '23 08:07 Niemand112233

I tried importing the converted json. The file imports in, and I wait for the rebuild. However, the only thing that will change is the theme. None of the individual boxes import, and the default items are still there. This is after saving to disk (not locally). Any suggestions?

johncarterofmars avatar Dec 12 '23 16:12 johncarterofmars