bernigaud / googlecl

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

blog doesn't default to primary #29

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
i'd like to just post without giving a --blog, but if i don't give one, it 
prompts me

Original issue reported on code.google.com by credenti...@gmail.com on 16 Jun 2010 at 9:36

GoogleCodeExporter commented 9 years ago
The problem is that "blog" is a required option, and required options are 
filled out before the account is accessed, so there's no way to tell what blogs 
exist.

I think I'll make "--blog" an optional option, and if more than one blog is 
discovered, check the config file for a preferred blog. Failing that, ask the 
user to pick one.

Original comment by tom.h.mi...@gmail.com on 16 Jun 2010 at 10:05

GoogleCodeExporter commented 9 years ago
r209 seems to fix this. Can you check and see that the code now does what you 
expect/want?

Original comment by tom.h.mi...@gmail.com on 16 Jun 2010 at 11:28

GoogleCodeExporter commented 9 years ago
Not bad.  The tricky part is that people will use this both interactively and 
as a script.  So if somebody has a script to post to their blog, and they add 
another blog, their script will mysteriously start hanging while it waits for 
input.  But this feature is handy enough to be worth it, IMO.

Original comment by credenti...@gmail.com on 16 Jun 2010 at 11:39

GoogleCodeExporter commented 9 years ago
Hm. I guess I could make it so using the --blog option sets the value in the 
config file (like how we handle usernames currently) but it seems like 
addressing that specific problem in an FAQ or the like would be better.

Original comment by tom.h.mi...@gmail.com on 16 Jun 2010 at 11:47

GoogleCodeExporter commented 9 years ago
Ooh, I actually quite like that idea.  It's consistent with the behavior of 
other things like -u and seems like it'd do what a reasonable person would 
expect.

Original comment by credenti...@gmail.com on 16 Jun 2010 at 11:50

GoogleCodeExporter commented 9 years ago
OK. I won't reinstate "blog" as a required option, but whenever it's specified 
on the command line and no corresponding value exists in the config file, it'll 
get set.

r210 does this. Any better?

Original comment by tom.h.mi...@gmail.com on 17 Jun 2010 at 12:36

GoogleCodeExporter commented 9 years ago
Nope, it still asks me every time when I do "blogger list", and I don't have 
anything in my prefs.

Original comment by credenti...@gmail.com on 17 Jun 2010 at 1:25

GoogleCodeExporter commented 9 years ago
What's the command you use? It will only save the blog name when you specify it 
with --blog.

Original comment by tom.h.mi...@gmail.com on 17 Jun 2010 at 1:33

GoogleCodeExporter commented 9 years ago
Ah, I see.  If it were me I'd have the menu save a pref too, but whatever.

Original comment by credenti...@gmail.com on 17 Jun 2010 at 1:49