wusung / googlecl

Automatically exported from code.google.com/p/googlecl
0 stars 0 forks source link

Blogger: update a post #260

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
A task `update` for updating a post. A patch is attached.

Syntax:

    blogger update --title "TITLE" [--new_title "NEW TITLE"] [--tags "label1, label2"] [--draft] ["CONTENT"|FILE|-]

Except `--title`, all options are optional. Few notes:

 * `--tags` actually passes to `label_posts()` to do the job.
 * `--draft` can set the post to draft state, if missing, then will set to published state.
 * The content is same as in task `post` and also allows to use standard input, that part of source is taken from Issue 104.

Original issue reported on code.google.com by livibet...@gmail.com on 23 Aug 2010 at 12:28

Attachments:

GoogleCodeExporter commented 8 years ago
The last part is not correct. The `args` will be joined using ' ', then check 
if it is a file, or a standard input method, or just a string.

Therefore, if user runs:

  blogger update --title "TITLE" This is a new post content.

The post content will be updated with "This is a new post content."

In other words, `args` are treated as one. Unlike `post` task, it will post 
multiple posts with each item of `args` but all with same title, which is kind 
of strange.

Original comment by livibet...@gmail.com on 23 Aug 2010 at 12:36

GoogleCodeExporter commented 8 years ago
Updated the patch for r422 (after google -> google.py)

Original comment by livibet...@gmail.com on 21 Sep 2010 at 4:31

Attachments:

GoogleCodeExporter commented 8 years ago
Since I am not an SVN expert, I had trouble applying the patch to my working 
copy (revision 549).   Since it was short, I mostly recreated the changes for 
revision 549.   There are a few differences ... 

It works for me, although it is not thoroughly tested.  

Original comment by stu.andrews on 14 Apr 2011 at 2:03

Attachments: