Skip to content

Commit

Permalink
Update add and new help
Browse files Browse the repository at this point in the history
  • Loading branch information
thebaer committed Sep 1, 2015
1 parent 1765077 commit 995d73d
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 5 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,11 @@ writeas [global options] command [command options] [arguments...]
COMMANDS:
post Alias for default action: create post from stdin
new Compose a new post from the command-line and publish
delete Delete a post
update Update (overwrite) a post
get Read a raw post
add Add a post locally
add Add an existing post locally
list List local posts
help, h Shows a list of commands or help for one command
Expand Down
22 changes: 18 additions & 4 deletions writeas/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,17 @@ func main() {
},
},
{
Name: "new",
Usage: "Create a new post with your default text editor and publish",
Name: "new",
Usage: "Compose a new post from the command-line and publish",
Description: `An alternative to piping data to the program.
On Windows, this will use 'copy con' to start reading what you input from the
prompt. Press F6 or Ctrl-Z then Enter to end input.
On *nix, this will use the best available text editor, starting with the
value set to the EDITOR environment variable, or vim, or finally nano.
If posting fails for any reason, 'writeas' will show you the temporary file
location and how to pipe it to 'writeas' to retry.`,
Action: cmdNew,
Flags: []cli.Flag{
cli.BoolFlag{
Expand Down Expand Up @@ -136,8 +145,13 @@ func main() {
},
},
{
Name: "add",
Usage: "Add a post locally",
Name: "add",
Usage: "Add an existing post locally",
Description: `A way to add an existing post to your local store for easy editing later.
This requires a post ID (from https://write.as/[ID]) and an Edit Token
(exported from another Write.as client, such as the Android app).
`,
Action: cmdAdd,
},
{
Expand Down

0 comments on commit 995d73d

Please sign in to comment.