Closed livibetter closed 8 years ago
I have experience with ConfigParser. It should be very straightforward.
@Regaerd Good, then this is your task (Feeling like I'm the boss here, just kidding), if you are up to it, and I can prepare a simple setup.py
, #12
It seems we need -s
, -p
, --center
(-c
is used), and -a
, so the configuration can be overridden by command-line option. Thoughts?
So -s
, -p
, etc. would set the properties to true
?
Yes, I guess that would be worthwhile.
I would rather -c
and -C
be for not-center/center in that case.
Color could then be -i
or -ci
with --color-index
Which would work nicely, since I was considering adding --color-value
for terminals with support for 256 colors.
I would rather -c and -C be for center in that case.
I would prefer that, too.
Color could then be -i or -ci with --color-index
On GNU/Linux, I personally dislike option name like -ci
, or
-foobar
, it would confuse single letter option combination, e.g.
-SPCA
. Single letter and long option name, just these two types, no
mixed usage in my opinion.
How about -k
and --color
. --color-index
is bit of wordy.
Which would work nicely, since I was considering adding --color-value for terminals with support for 256 colors.
Do we really need two option? You can just add the support and use the color option. They are both index anyway, in fact, the current colors are the first ten colors in 256-color, so the same thing. You just initialize the full set of 256-color, and that should be it.
So, if you agree, then I shall leave the renaming to you and -spca
to you, just duplicate the lines, edit option names and help, flip
store_*
. And don't forget to update README for new -spca
.
(Just realized that is "spca," feeling we need a mascot, I vote for a kitten)
Yeah -k
should be good.
They are both index anyway
Right, I'm not sure what I was thinking.
And don't forget to update README
Well, now there's two README's to forget about.
We can just switch to reST, or don't use reST the same way since it's only for PyPI, just short description and a link to GitHub.
I prefer md actually. I would use pandoc to handle the conversion automatically, but it's been consistently making mistakes.
It's not a huge deal yet.
Here is an example of a package I maintained.
Since it has documentation, so I don't even put much stuff in README.rst
, which is used on both PyPI and project website. A quick example usage and links section and that's it.
A rule of thumb is to not make your life harder. I could have put the information on README and docs, but that's just asking for more works that really ain't necessary.
Yes, good advice. Next time I need to update the readme's I'll consider stripping down the rst version to something that doesn't need updating.
The largest chunk is just controls and commands.
To be honest, I don't have much experience in this. I think there is a
ConfigParser
and I don't know about OSes other than Linux, but even Linux there might be various places for configuration files. I think the order of search could be$XDG_CONFIG_HOME/<PyClock_DIR>/<CONFIG_FILE>
$HOME/.<CONFIG_FILE>
Notes:
<PyClock_DIR>
can bePyClock
pyclock
<CONFIG_FILE>
can bePyClock.conf
pyclock.conf
pyclockrc