Skip to content

Commit 586e00a

Browse files
author
Ned Batchelder
committed
docs: reword the literal setting docs, now that we have three syntaxes
1 parent 65f7e96 commit 586e00a

File tree

2 files changed

+13
-10
lines changed

2 files changed

+13
-10
lines changed
+4-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
Added
22
.....
33

4-
- yaml support for literals. closing `issue 69`_.
4+
- Now literal configuration settings can be read from YAML files. Closes `issue 69`_.
5+
Thanks, `Florian Küpper <pull 70_>`_.
6+
7+
.. _pull 70: https://github.com/nedbat/scriv/pull/70
58
.. _issue 69: https://github.com/nedbat/scriv/issues/69

docs/configuration.rst

+9-9
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Settings use the usual ".ini" syntax, but with some extra features:
3030

3131
- A prefix of ``file:`` reads the setting from a file.
3232

33-
- A prefix of ``literal:`` reads a string literal from a source file.
33+
- A prefix of ``literal:`` reads a literal data from a source file.
3434

3535
- Value substitutions can make a setting depend on another setting.
3636

@@ -107,29 +107,29 @@ Literal Prefix
107107
--------------
108108

109109
A ``literal:`` prefix means the setting value will be a literal string read
110-
from a source file. The setting provides a file name and variable name
111-
separated by colons::
110+
from a source file. The setting provides a file name and value name separated
111+
by colons::
112112

113113
[scriv]
114114
version = literal: myproj/__init__.py: __version__
115115

116116
In this case, the file ``myproj/__init__.py`` will be read, and the
117117
``__version__`` value will be found and used as the version setting.
118118

119-
It is also possible to specify a variable in a TOML file
120-
using periods to separate the sections and key names::
119+
Currently Python, TOML and YAML files are supported for literals, but other
120+
syntaxes can be supported in the future.
121+
122+
When using a TOML file, the value is specified using periods to separate the
123+
sections and key names::
121124

122125
[scriv]
123126
version = literal: pyproject.toml: project.version
124127

125-
It is also possible to specify a variable in a YAML file
126-
using periods to access dictionary keys::
128+
In a YAML file, use periods in the value name to access dictionary keys::
127129

128130
[scriv]
129131
version = literal: galaxy.yaml: myproduct.versionString
130132

131-
Currently Python, TOML and YAML files are supported for literals,
132-
but other syntaxes can be supported in the future.
133133

134134
Value Substitution
135135
------------------

0 commit comments

Comments
 (0)