Command line client for Write.as https://write.as/apps/cli
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

README.md 4.2 KiB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. wf-cli
  2. ======
  3. ![GPL](https://img.shields.io/github/license/writeas/writeas-cli.svg) [![Go Report Card](https://goreportcard.com/badge/github.com/writeas/writeas-cli)](https://goreportcard.com/report/github.com/writeas/writeas-cli) [![#writeas on freenode](https://img.shields.io/badge/freenode-%23writeas-blue.svg)](http://webchat.freenode.net/?channels=writeas) [![Discuss on our forum](https://img.shields.io/discourse/https/discuss.write.as/users.svg?label=forum)](https://discuss.write.as/c/development)
  4. Command line utility for publishing to any [WriteFreely](https://writefreely.org) instance. Works on Windows, macOS, and Linux.
  5. **The WriteFreely CLI is compatible with [WriteFreely v0.11](https://github.com/writeas/writefreely/releases/tag/v0.11.0) or later.**
  6. ## Features
  7. * Authenticate with any WriteFreely instance
  8. * Publish drafts
  9. * Manage multiple WriteFreely accounts on multiple instances
  10. * A stable, easy back-end for your GUI app or desktop-based workflow
  11. * Locally keeps track of any posts you make
  12. * Update and delete posts
  13. * Fetch any post by ID
  14. ## Installing
  15. The easiest way to get the CLI is to download a pre-built executable for your OS.
  16. ### Download
  17. [![Latest release](https://img.shields.io/github/release/writeas/writeas-cli.svg)](https://github.com/writeas/writeas-cli/releases/latest) ![Total downloads](https://img.shields.io/github/downloads/writeas/writeas-cli/total.svg)
  18. Get the latest version for your operating system as a standalone executable.
  19. **Windows**<br />
  20. Download the [64-bit](https://github.com/writeas/writeas-cli/releases/download/v2.0.0/wf_1.0.0_windows_amd64.zip) or [32-bit](https://github.com/writeas/writeas-cli/releases/download/v2.0.0/wf_1.0.0_windows_386.zip) executable and put it somewhere in your `%PATH%`.
  21. **macOS**<br />
  22. Download the [64-bit](https://github.com/writeas/writeas-cli/releases/download/v2.0.0/wf_1.0.0_darwin_amd64.zip) executable and put it somewhere in your `$PATH`, like `/usr/local/bin`.
  23. **Linux (other)**<br />
  24. Download the [64-bit](https://github.com/writeas/writeas-cli/releases/download/v2.0.0/wf_1.0.0_linux_amd64.tar.gz) or [32-bit](https://github.com/writeas/writeas-cli/releases/download/v2.0.0/wf_1.0.0_linux_386.tar.gz) executable and put it somewhere in your `$PATH`, like `/usr/local/bin`.
  25. ### Go get it
  26. ```bash
  27. go get github.com/writeas/writeas-cli/cmd/wf
  28. ```
  29. Once this finishes, you'll see `wf` or `wf.exe` inside `$GOPATH/bin/`.
  30. ## Upgrading
  31. To upgrade the CLI, download and replace the executable you downloaded before.
  32. If you previously installed with `go get`, run it again with the `-u` option.
  33. ```bash
  34. go get -u github.com/writeas/writeas-cli/cmd/wf
  35. ```
  36. ## Usage
  37. See full usage documentation on our [User Guide](https://github.com/writeas/writeas-cli/blob/master/cmd/wf/GUIDE.md).
  38. ```
  39. wf [global options] command [command options] [arguments...]
  40. COMMANDS:
  41. post Alias for default action: create post from stdin
  42. new Compose a new post from the command-line and publish
  43. publish Publish a file
  44. delete Delete a post
  45. update Update (overwrite) a post
  46. get Read a raw post
  47. posts List draft posts
  48. blogs List blogs
  49. accounts List all currently logged in accounts
  50. auth Authenticate with a WriteFreely instance
  51. logout Log out of a WriteFreely instance
  52. help, h Shows a list of commands or help for one command
  53. GLOBAL OPTIONS:
  54. -c value, -b value Optional blog to post to
  55. --tor, -t Perform action on Tor hidden service
  56. --tor-port value Use a different port to connect to Tor (default: 9150)
  57. --code Specifies this post is code
  58. --md Returns post URL with Markdown enabled
  59. --verbose, -v Make the operation more talkative
  60. --font value Sets post font to given value (default: "mono")
  61. --lang value Sets post language to given ISO 639-1 language code
  62. --user-agent value Sets the User-Agent for API requests
  63. --host value, -H value Operate against a custom hostname
  64. --user value, -u value Use authenticated user, other than default
  65. --help, -h show help
  66. --version, -V print the version
  67. ```