Comments (8)
Hello.
I like your ideas.
Would gladly incorporate that into the module and release it as a new major version
Unfortunately, I do not have enough time for now.
If you are willing to help, just send me a PR.
from psini.
If this gets incorporated it should be optional, as it will break stuff.
Multiline Values
The INI file format does not support multiline values. This behavior if implemented should be non default as it breaks exiting scripts, for example:
[Multiline Values]
chorus=I'm a lumberjack, and I'm okay
idented_key=I sleep all night and I work all day
Here, idented key will be taken as a part of above key.
Interpolation of values
Moreover, there is the oppurtunity to use environment variables as values.
Env vars are typically used for this. It makes sence to expand env vars, possibly as an option when getting values. The problem here is writting values back - if I read and imediatelly write values all vars would get expanded and removed. WIth behavior like that its almost useless feature. Module will have to write back those env vars if key values containing them were unchanged.
from psini.
I totally agree, it has to be optional. The described behavior will be a problem, if set as default. I will consider that.
from psini.
In default behavior, I think that highest possible compatibility with Windows API should be the goal as that behavior is what will be expected by most. Anything else can be added as configurable feature or fun parameter. This could also be tested easily.
I personally started using this one but because it wasn't compatible with WIndows API it changed ini files in ways that are not semantically equal to starting ini file. I finially used custom Ini script that calls Windows API Profile functions.
from psini.
about the multiline:
chorus=I'm a lumberjack, and I'm okay idented_key=I sleep all night and I work all day
I found this note
Following the syntax of the language it is designed to work with (Python), to span a node over multiple lines ConfigParser requires a deeper indentation in the lines that follow, instead of the more common backslash + line break (see: configparser — Configuration file parser)
on https://en.wikipedia.org/wiki/INI_file#cite_note-13
from psini.
because it wasn't compatible with WIndows API
What part of this module is currently not compatible? :-o
from psini.
Part #50 :) Also trimming of values.
from psini.
@majkinetor: How would the Windows API handle the examples I created here?
key=value|
key = value|
key = value|
key = "value"|
key = value |
key = " value "|
key = " value "|
key = " value " |
key = ""value""|
added |
to each line to indicate EOL
from psini.
Related Issues (20)
- Quotes stripped and trimming HOT 20
- If values are double in one section the Write operation add mistakes
- Installation of v3.1.2 fails HOT 2
- 30 seconds for processing 5MB ini file
- Files edited with PsIni can't be read with GetPrivateProfileString HOT 1
- File with [ ] in path doesn't seem to work as expected. HOT 1
- PsIni doesn't work with C:\ProgramData\Microsoft\Network\Connections\Pbk\rasphone.pbk HOT 5
- Can't read Vmware Workstation .vmx HOT 1
- Please allow duplicate keys HOT 2
- Latest tag v3.1.2 is pointing to version 3.1.0
- Submission: ConvertFrom-Ini and ConvertTo-Ini
- Writing new section and values? HOT 1
- Cant handle keys without value (e.g. winpeshl.ini) HOT 1
- -IgnoreComments do not work HOT 1
- Out-IniFile: UTF-8 without BOM HOT 5
- Can't save as ANSI or save characte — (dash em) HOT 1
- Wrong order in Out-IniFile HOT 1
- Importing the module HOT 1
- Quotation marks that encapsulate values are truncated
- Can't get all section names from big ini file HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from psini.