writeas / writeas-cli

Command line client for Write.as / WriteFreely
https://write.as/apps/cli
GNU General Public License v3.0
112 stars 20 forks source link

Using CLI with blog #42

Open thomasjsn opened 5 years ago

thomasjsn commented 5 years ago

I can't seem to get the CLI to play nice with collections/blogs. It posts as anonymous even when using the b argument.

$ writeas -b thomasjsn publish dev/uctrl-dev/content/about/index.md 
https://write.as/g7x6govygs3zf00l

$ writeas -b thomasjsn post 
test2
https://write.as/kfpxp2ic682y9m7f

Am I missing something?

Also — can I fetch a single or all posts from collections/blogs?

I was hoping to use write.as with my workflow of using a local markdown editor and updating the blog using the CLI. Seems that might not be possible at this stage, without using the API directly of course.

thebaer commented 5 years ago

Can you try supplying the -b flag after the command (publish / post)? I.e.

writeas publish -b thomasjsn dev/uctrl-dev/content/about/index.md 

Unfortunately the argument parsing is a little picky -- something we should probably fix, either way.

ghost commented 5 years ago

Hi @thomasjsn, did changing the placement of the flag fix this issue for you? It's only a work around but just want to check if there is not some other issue.

Also re: fetching, this is something that is planned. You should be able to get and update a post already. But listing all remote posts is not yet implemented, per blog or otherwise.

Have you seen the plans for a file based local workflow? T584? It might be of interest to you.

thomasjsn commented 5 years ago

Hey @robjloranger, I didn't do anymore testing unfortunately. As I did not end up using write.as as my platform.

bluebirch commented 5 years ago

Publishing with the -b flag after publish works. But there is no way of listing posts that belong to a post? I'd like to have a directory of markdown files mirroring all posts I have published on a write.as blog.

ghost commented 5 years ago

@bluebirch, that is correct. There is currently no way list published posts. Only drafts.

I think the file based workflow that was started would be of interest. https://phabricator.write.as/T584