WriteFreely doesn't support non-auth'd posting like Write.as, so users
won't be creating non-auth'd posts with another client that they'd need
to add here.
Ref T586
Now when running `wf auth`, we'll automatically set the given host +
username as the default account in .writefreely/config.ini, so subsequent
requests without an explicit --host and --user will use this account.
Ref T635 T586
Unlike Write.as, WriteFreely doesn't support anonymous (unauthenticated)
publishing. With these changes, we reflect that in wf-cli by wrapping
creating, updating, and deleting posts in a func that checks
authentication state.
Ref T586
This automatically prepends https:// to any given --host value. It also
adds an --insecure flag, which will instead prepend http://
The goal with this is to save some typing and encourage operations over
HTTPS.
Ref T595
this changes all api calls to respect the flags for tor and tor-port
- config now has TorPort method to return flag value if set, or default
- api now only has newClient, this creates a tor client when flag is
present. does not need to be exported anymore
- no methods take a tor argument as no longer needed
- all commands now share the same behaviour logging tor messages
- api.torClient was removed as not used anywhere
- all calls to api.newClient now check for and return the error
- api.HandlePost was removed as redundant of api.DoPost
I had changed the global flags variable to only be those that are global
this broke some compatibility with piping from stdout into the binary.
also:
- binary specific configuration details have moved into the same map but
in main.go. only the configDir is OS dependent.
- a new key in the map is for the version so each binary can have their
own
- now allows authentication with more than one user per host, stored as
username.json inside the [host] directory.
- supports a default user and host in config.ini
- global flags will override the default
- adds new user/u flag to wf
- load and save user file based on username
- removed host flag from writeas
- adds hidden global flag for user to writeas to maintain
compatibility