Script Library: 1238 scripts
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

Discussion posts for script parse-ini.r

1
robiandi
3-Feb-2007 15:09
parse-ini-file: it works in the following way:

1.) At the beginning of a new section the last section will be
    appended to the ini-block. But because the last section has no successor
    it will not be appended to it. 
    Therefore the last section of a Windows ini file is lost for the 
    script ( this is a bug).

2.) As explained in the documentation, a Windows ini file has the 
    structure:
    [section-name1]
    keyword1=somevalue

    The following is not allowed:
    [section-name1]
    keyword1 = somevalue
    keyword2= othervalue

    i.e. spaces are not permitted ( not a bug, but not fine )
2
sunanda
4-Feb-2007 14:11
Edited:
sunanda
4-Feb-2007 14:12

Thanks!

[1] Good catch -- now fixed in new version.

[2] Spaces can be more problematic. For example, my live win.ini has this entry....

 [fontsubstitutes]
 Albertus (W1)=Albertus Medium 

....Both the keyword and the value contain spaces.

It may be that the strict spec for an INI entry forbids a trailing space on the keyword, and a leading space on the value.

If so, then this script is being a little more flexible than the strict spec would allow.

3
mikehinson
13-Apr-2009 20:36
Hi,
Newbie here, so sorry if posting in the wrong place.


I am trying to use this script to help me understand the use of parsing 
to extract data from files. If I paste the script into my REBOL/View 
console it pastes in the script ok, but the examples do not work.


This seems very common with a lot of the scripts in this library 
and is a problem I have been fighting with for several days.

This is what I get.
>> ini: parse-ini-file %/c/windows/win.ini
** Script Error: Out of range or past end
** Where: parse-ini-file
** Near: append last current-section parsed-line/1
append
>> 


If anyone can direct me to a better place to ask questions it would 
be appreciated. I have tried to use AltME but I don't know of any 
way to get invited to the REBOL world.

Thanks, Mike
4
mikehinson
13-Apr-2009 21:55
5
sunanda
15-Apr-2009 8:31

Apologies for the bug. sqlab did a quick analysis and showed I'd failed to properly consider comment lines.

He also contributed the fix so (thanks to him again) the version in the Libary is now updated and should work better.

The full discussion of the bug is on the REBOL3 AltME world: here  and here. 

6
jackslesly19
15-Apr 21:42
Thanks for your time so much for your professional and result-oriented guide. Speaking of professionals, check out this professional furnace repair bend oregon  area.. If you need anything just visit their website or contact them.
7
fredfx167
20-Apr 22:48
Edited:
fredfx167
20-Apr 22:49
REBOL

This is good.

Contents:

MakeDoc2 by REBOL- 20-Apr-2021
8
ogilview82
19-May 8:12
REBOL

There are many useful topics that was discussed here and I learned a lot from it!

Contents:

denver window cleaners

MakeDoc2 by REBOL- 19-May-2021
9
sumnerzzupa
24-May 6:00
REBOL

What can I say on this information? This is AWESOME! Thank you for sharing your knowledge.

Contents:

Laguna Niguel Pro Concrete

MakeDoc2 by REBOL- 24-May-2021
10
david
9-Jun 9:14

I can't wait to try this script. Thank you for sharing.

Regards,

David of https://www.tilecleaningmesa.com/

11
tingivi3
11-Jun 1:55
Hi, this is really helpful, thanks for sharing this codings for us. This is what I am been looking for since last week. I am using it on my programs, I searches several websites and forum sites, I found one but not exactly what I am looking for. Here try to download lords mobile app  on pc this is what I have done so far and I have a lot of things to do after this codings See more: https://playpc.io/reviews/offroad-outlaws-gameplay-review/ 
12
kenny34
14-Jul 10:05
REBOL

Very beneficial it seems. This has help me more than you know. Where else can I see more semiconductor?

Contents:

MakeDoc2 by REBOL- 14-Jul-2021
13
katty
2-Aug 20:02
REBOL

Thanks for sharing the topics on this site. very helpful

Contents:

house painters port orange

MakeDoc2 by REBOL- 2-Aug-2021
14
johnsjvi95
10-Sep 6:42
REBOL

I am trying to use this script to help me understand the use of parsing to extract data from files. If I paste the script into my REBOL/View console it pastes in the script ok, but the examples do not work.

Contents:

Tustin Roofing Company

MakeDoc2 by REBOL- 10-Sep-2021
15
sugar
14-Nov 3:05
REBOL

This is one great update from this site. Thanks for posting.

Contents:

Best Caramels online

MakeDoc2 by REBOL- 14-Nov-2021
Notes