Closed palansher closed 3 years ago
We explicitly set "optionxform" to "str" to preserve case when using --get That seems to be working for me with python3-iniparse-0.4-40.fc32.noarch
What version of iniparse are you using?
apt-cache policy python-iniparse
python-iniparse:
Installed: 0.4-2.2
Candidate: 0.4-2.2
Version table:
*** 0.4-2.2 500
500 http://archive.ubuntu.com/ubuntu bionic/universe amd64 Packages
100 /var/lib/dpkg/status
And yes, I bag you to add to readme the micro installation instruction for Linux . I still don't know how to properly install the latest crudini version for Ubuntu. I use
apt install python-iniparse; curl https://raw.githubusercontent.com/pixelb/crudini/master/crudini > /usr/local/bin/crudini && chmod a+x /usr/local/bin/crudini
but it is sourced from rumors.
And I suppose people will interested how to use comments in .ini files:
only in the beginning of the line or
par=value; comment
also supported
Also, how to understand which phyton version crudini use. In my ubuntu usually, phyton 2 and 3 are installed both.
crudini supports either python variant
Hello!
Would be nice to hear your opinion about this issue. Thank you for such a useful solution!
apt-cache policy python-iniparse python-iniparse: Installed: 0.4-2.2 Candidate: 0.4-2.2 Version table: *** 0.4-2.2 500 500 http://archive.ubuntu.com/ubuntu bionic/universe amd64 Packages 100 /var/lib/dpkg/status
And yes, I bag you to add to readme the micro installation instruction for Linux . I still don't know how to properly install the latest crudini version for Ubuntu. I use
apt install python-iniparse; curl https://raw.githubusercontent.com/pixelb/crudini/master/crudini > /usr/local/bin/crudini && chmod a+x /usr/local/bin/crudini
but it is sourced from rumors.
And I suppose people will interested how to use comments in .ini files:
/; ?
only in the beginning of the line or
par=value; comment
also supported
A small patch can resolve this issue:
sudo sed -i 's/self.parse_file(self.cfgfile)/self.parse_file(self.cfgfile, preserve_case=True)/' /usr/bin/crudini
The code already contains all logic, you just need to activate it ...
Case preservation was released in crudini-0.9 (specifically commit e56e3a1). The sed above is a paraphrased version of that commit. Please update your Ubuntu system. I verified on packages.ubuntu.com that 0.9 is available.
@pixelb bionic only seen to have crudini-0.7.1 available, so that's what we're working with! Thanks for creating such a useful utility!
Hello!
original section in text file:
on some my servers it gets all lower case:
sometimes it shows correct (original) data:
I use Ubuntu 18.04/20.04
I cannot understand the reason. It seems when I use old crudini 0.7 from machine apt package, but I am not sure. Seems sometimes it happens on crudini 0.9.3 also.
Do you suppose the reason for such behavior?
thanks!