Page MenuHomewrite.as

configurable defaults
Open, NormalPublic

Description

using config.ini at the user directory root, save a default host for actions.

do the same within each [host] for default user

Details

Commits
Restricted Diffusion Commit

Event Timeline

robjloranger moved this task from Backlog to Next Up on the WriteFreely CLI board.Jun 7 2019, 11:22 PM
matt added a comment.Jul 21 2019, 7:30 PM

@robjloranger How does this work right now? After playing around with wf-cli this is definitely the default behavior I'd like to see, but I'm not seeing it work that way.

I can double check, but I believe it was working last I tried.

It should use whatever host is set in the root ini file by default and whatever user is set in the host level ini file.

Everything still seems to be working as I remember. Can you tell me more about what isn't working like you expect?

I should add that the config.ini should have a default section. i.e.

[default]
host = https://my.instance.com
matt added a comment.Jul 21 2019, 9:08 PM

Right now there's no config.ini file being created in my ~/.writefreely... But it's entirely possible I messed something up. I'm looking into it now

robjloranger added a comment.EditedJul 21 2019, 10:12 PM

Weird I email responded but it didn't come through.

This explains your issue though, the file is currently manually created. I haven't made the config wizard yet or any automated preference storage

matt added a comment.Jul 22 2019, 1:22 PM

Ah, gotcha. I'll add that in then.

When first authenticating, I'll have it automatically set that username / host as the default. Then with T596: add config wizard, users will be able to switch defaults.

Cool, and maybe not overwrite the default if there is one. Users would likely expect when editing the config file it should retain their defaults.

matt added a comment.Jul 22 2019, 2:29 PM

Yep, if there's already a default set when running auth it won't be overwritten. And there will be a message displayed either way. The idea with setting it that first time is to make that process more seamless, and save people some typing.

matt added a commit: Restricted Diffusion Commit.Jul 22 2019, 7:46 PM