this creates a second binary, wf, which will have additonal
functionality for hosts other than write.as.
also moves global flags into their own slice in new file
adds `host, H` global flag
inlcudes gitignore for binary
- remove line about authentication not being supported
- add claim to list of commands in both README and GUIDE
- add auth, blogs and claim example usage in GUIDE
- Presents a summary before making the request when verbose (-v) enabled
- Successful claims only shown with verbose (-v) enabled
- Failed claims now always mention cause of failure
- A summary of successes / failures shows after logging any failures,
when verbose (-v) enabled
Ref T194
this moves string trimming into it's own helper which accounts for the
possibility of multi-byte runes.
includes tests for ascii and utf-8 language strings
This changes the 'posts' subcommand, previously 'list', to also list any
remote posts for the user if currently authenticated.
- adds DoFetchPosts to the api pkg which returns all the logged in users
posts.
- adds a RemotePost type to the api pkg which stores some of the return
information from DoFetchPosts for use in printing to stdout
- adds GetUserPosts to the api pkg which converts the incoming
writeas.Posts into the smaller RemotePost type
- adds getExcerpt which takes the incoming writeas.Post.Content and
returns a trimmed down excerpt of the content. Max 2 lines of 80 chars
and delimited by '...'
- changes CmdList from pkg commands to CmdListPosts which now writes out
any local and remote posts in simple formatted tables
this adds a configurable directory, currently within the users path for
the configuration, user and post data to be saved.
it is accessible down the stack of the application via the cli.Context,
specificaly c.App.ExtraData which is a function that returns a map of
[string]string under the key 'configDir".
this splits everything out into shared packages
- user config and application config share a package for now
- sync is part of the api package which includes the client, posts and
tor logic
- logging is it's own package
- commands are in their own package
first moving everything out into the base package
should be followed by some refactoring and reorganizing before creating
two different binaries for write.as and writefreely
As discussed in #20, this adds import grouping recommendations to the
coding conventions section of CONTRIBUTING.md.
Note that I replaced `go fmt` with `goimports` because `goimports`
implements a superset of the `go fmt` functionality.