Skip to content

Commit 27103b8

Browse files
committed
fix docs on the use of "/" as template path separator
1 parent e0955b2 commit 27103b8

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

docs/concepts.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ To use them you can pass in a strategy to the normalize_hrefs call.
6969
Using templates
7070
'''''''''''''''
7171

72-
You can utilze template strings to determine the file paths of HREFs set on Catalogs,
72+
You can utilize template strings to determine the file paths of HREFs set on Catalogs,
7373
Collection or Items. These templates use python format strings, which can name
7474
the property or attribute of the item you want to use for replacing the template
7575
variable. For example:
@@ -84,7 +84,9 @@ variable. For example:
8484
8585
The above code will save items in subfolders based on the collection ID, year and month
8686
of it's datetime (or start_datetime if a date range is defined and no datetime is
87-
defined).
87+
defined). Note that the forward slash (``/``) should be used as path separator in the
88+
template string regardless of the system path separator (thus both in POSIX-compliant
89+
and Windows environments).
8890

8991
You can use dot notation to specify attributes of objects or keys in dictionaries for
9092
template variables. PySTAC will look at the object, it's ``properties`` and its

pystac/layout.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,10 @@ class LayoutTemplate:
5454
| ``collection`` | The collection ID of an Item's collection. |
5555
+--------------------+--------------------------------------------------------+
5656
57+
The forward slash (``/``) should be used as path separator in the template
58+
string regardless of the system path separator (thus both in POSIX-compliant
59+
and Windows environments).
60+
5761
Examples::
5862
5963
# Uses the year, month and day of the item

0 commit comments

Comments
 (0)