forked from vim-jp/vital.vim
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathINI.txt
83 lines (55 loc) · 2.71 KB
/
INI.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
*vital/Text/INI.txt* INI file library.
Maintainer: Alisue <lambdalisue@hashnote.net>
==============================================================================
CONTENTS *Vital.Text.INI-contents*
INTRODUCTIONS |Vital.Text.INI-introduction|
INTERFACE |Vital.Text.INI-interface|
FUNCTIONS |Vital.Text.INI-functions|
RECORD |Vital.Text.INI-record|
==============================================================================
INTRODUCTIONS *Vital.Text.INI-introduction*
*Vital.Text.INI* is a parser library for INI file.
==============================================================================
INTERFACE *Vital.Text.INI-interface*
-------------------------------------------------------------------------------
FUNCTIONS *Vital.Text.INI-functions*
parse_record({line}) *Vital.Text.INI.parse_record()*
Parse a line string of INI formatted text and return
|Vital.Text.INI-record| object.
{line} (required)
|String| value. A line string. A comment part (any strings after '#')
will be removed before parse.
parse({ini} [, {fail-silently}) *Vital.Text.INI.parse()*
Parse an INI formatted text and return a dictionary.
{ini} (required)
|String| value. An INI formatted text.
{fail-silently} (optional)
0 or 1. If it is 0, the function will throw an exception when it found
unknown formatted line. Otherwise it will ignore the line.
parse_file({file} [, {fail-silently}) *Vital.Text.INI.parse_file()*
Parse an INI formatted file and return a dictionary.
{file} (required)
|String| value. A path string of an INI formatted file.
{fail-silently} (optional)
0 or 1. If it is 0, the function will throw an exception when it found
unknown formatted line. Otherwise it will ignore the line.
-------------------------------------------------------------------------------
RECORD *Vital.Text.INI-record*
|Vital.Text.INI-record| object is a dictionary which has 'type' attribute.
The 'type' attribute indicate the type of record and followings are used.
'emptyline'
This record indicate an emptyline. Note that comment lines will be
detected as 'emptyline' while any comment strings are removed before
parsing.
'section'
This record indicate a section line such as '[default]'. This type of
record also has 'name' attribute which indicate a name of the section.
'parameter'
This record indicate a parameter line such as 'key = value'. This type
of record also has 'key' and 'value' attributes which indicate a key
and value of the parameter respectively.
'unknown'
This record indicate an unknown line. This type of record also has
'value' attribute which contain a value of the line.
==============================================================================
vim:tw=78:fo=tcq2mM:ts=8:ft=help:norl