Skip to content

Commit d4ddae8

Browse files
committed
Update doc theme and use more common admonition syntax
1 parent bac7360 commit d4ddae8

14 files changed

Lines changed: 148 additions & 160 deletions

File tree

docs/src/markdown/about/changelog.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -188,13 +188,12 @@
188188

189189
## 4.7
190190

191-
/// warning | Warning
192-
Backrefs 4.2.0 has deprecated the shorthand references for alphabetic character groups in `re` search patterns:
193-
`\l`, `\L`, `\c`, and `\C`. Instead you should use: `[[:lower:]]`, `[[:^lower:]]`, `[[:upper:]]`, and `[[:^upper:]]`
194-
respectively. While the references have only been deprecated, and are technically still available, a future version
195-
of Backrefs will remove them entirely at some point. It is recommended to transition now so as not to be caught
196-
unawares.
197-
///
191+
> [!warning] Warning
192+
> Backrefs 4.2.0 has deprecated the shorthand references for alphabetic character groups in `re` search patterns:
193+
> `\l`, `\L`, `\c`, and `\C`. Instead you should use: `[[:lower:]]`, `[[:^lower:]]`, `[[:upper:]]`, and `[[:^upper:]]`
194+
> respectively. While the references have only been deprecated, and are technically still available, a future version
195+
> of Backrefs will remove them entirely at some point. It is recommended to transition now so as not to be caught
196+
> unawares.
198197
199198
- **NEW**: Add `col0` variable for editor configuration to allow for using a zero based column value instead of one
200199
based column value for editors that require it.

docs/src/markdown/extras.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,9 @@
2828
appropriately. Also note that we quote `%1` to allow spaces in the command line argument. Paths may vary, and it is
2929
left up to the user to discover where their Python install directory is.
3030

31-
/// warning
32-
This isn't a guide in how to do registry editing proper, so only edit the registry if you are certain of what you
33-
are doing.
34-
///
31+
> [!warning]
32+
> This isn't a guide in how to do registry editing proper, so only edit the registry if you are certain of what you
33+
> are doing.
3534
3635
```ini
3736
Windows Registry Editor Version 5.00

docs/src/markdown/preferences.md

Lines changed: 28 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -33,17 +33,16 @@ Updates
3333
The check is only a check for new versions and doesn't perform an upgrade. Rummage must be upgraded via `pip` from
3434
command line.
3535

36-
//// info | Update Issues: Python 3.6+ on macOS
37-
There is a small issue on macOS with Python 3.6+: Python 3.6 changed how it gets the default certificates
38-
required to properly check URLs. The details are actually documented here: https://bugs.python.org/issue28150#msg276516.
39-
40-
It is possible that a given installation method resolves this automatically, but if not, the following steps
41-
should help. Assuming that Python 3.6+ was installed using the macOS installer from Python.org, you just need to
42-
navigate to `/Applications/Python 3.6/Install Certificates.command` and double click the command. The script
43-
will use `pip` to install `certifi` and creates a symlink in the OpenSSL directory to `certifi`'s installed
44-
bundle location. If you are using something like macports, then you'll probably have to research to find out how
45-
to do the same thing.
46-
////
36+
> [!info] Update Issues: Python 3.6+ on macOS
37+
> There is a small issue on macOS with Python 3.6+: Python 3.6 changed how it gets the default certificates
38+
> required to properly check URLs. The details are actually documented here: https://bugs.python.org/issue28150#msg276516.
39+
>
40+
> It is possible that a given installation method resolves this automatically, but if not, the following steps
41+
> should help. Assuming that Python 3.6+ was installed using the macOS installer from Python.org, you just need to
42+
> navigate to `/Applications/Python 3.6/Install Certificates.command` and double click the command. The script
43+
> will use `pip` to install `certifi` and creates a symlink in the OpenSSL directory to `certifi`'s installed
44+
> bundle location. If you are using something like macports, then you'll probably have to research to find out how
45+
> to do the same thing.
4746
4847
International Time
4948

@@ -121,9 +120,8 @@ Argument Variables | Description
121120
`{$col}` | Insert the column number.
122121
`{$col0}` | Insert the line column offset by one so the first column is zero instead of one.
123122

124-
/// new | New 4.7.0
125-
Added `{$col0}` for zero based column values.
126-
///
123+
> [!new] New 4.7.0
124+
> Added `{$col0}` for zero based column values.
127125
128126
## Notifications
129127

@@ -136,37 +134,34 @@ On Linux, you can set your preferred player: `paplay`, `aplay`, and `play` (`sox
136134

137135
A test button is provided to test the configuration once set.
138136

139-
/// tip | Supported Notification Sound Formats
140-
141-
Windows | macOS | Linux
142-
------- | ------------------------ | -----
143-
`wav` | `wav`, `mp3` and `.aiff` | `wav` and `mp3` (if using `paplay`, `ogg` is also supported)
144-
///
137+
> [!tip] Supported Notification Sound Formats
138+
>
139+
> Windows | macOS | Linux
140+
> ------- | ------------------------ | -----
141+
> `wav` | `wav`, `mp3` and `.aiff` | `wav` and `mp3` (if using `paplay`, `ogg` is also supported)
145142
146143
/// define
147144
Linux
148145

149146
- Native: Notifications via `notify-send`.
150147

151-
/// info | Other Distros
152-
Though Rummage should run on any Linux distro, the native notification option was built around `notify-send` and
153-
only tested on Ubuntu. If other distros have a `notify-send` it may also work.
154-
///
148+
> [!info] Other Distros
149+
> Though Rummage should run on any Linux distro, the native notification option was built around `notify-send` and
150+
> only tested on Ubuntu. If other distros have a `notify-send` it may also work.
155151
156152
macOS
157153

158154
- Native: Notification Center via [terminal-notifier][terminal-notifier]. Path to `terminal-notifier` must be
159155
configured.
160156

161-
/// info | Configuring macOS Native
162-
When selecting `native` on macOS, an option to select the path to terminal notifier will be available since
163-
native dialogs rely on `terminal-notifier` to send notifications to the Notification Center. This must be
164-
configured or *native* notifications will not work.
165-
166-
When selecting the `terminal-notifier` path, you can select either the binary directly or the `.<app` bundle
167-
(depending on how you installed `terminal-notifier`). When selecting the `.app` bundle, Rummage will know how
168-
to access the binary inside the bundle.
169-
///
157+
> [!info] Configuring macOS Native
158+
> When selecting `native` on macOS, an option to select the path to terminal notifier will be available since
159+
> native dialogs rely on `terminal-notifier` to send notifications to the Notification Center. This must be
160+
> configured or *native* notifications will not work.
161+
>
162+
> When selecting the `terminal-notifier` path, you can select either the binary directly or the `.<app` bundle
163+
> (depending on how you installed `terminal-notifier`). When selecting the `.app` bundle, Rummage will know how
164+
> to access the binary inside the bundle.
170165
171166
Windows
172167

docs/src/markdown/search.md

Lines changed: 59 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -54,14 +54,13 @@ Force\ &lt;encoding&gt; | Forces all files to be opened with the specified encod
5454
Use\ chain\ search | Puts Rummage into ["search chain" mode](./usage.md#search-chains). When in "search chain" mode, rummage will only use saved search chains for search and replace.
5555
Use\ replace\ plugin | When enabled, Rummage will use a [replace plugin](./usage.md#replace-plugins) instead of a replace pattern in order to do more advanced replaces.
5656

57-
/// tip | Encoding Guessing
58-
59-
It is always recommended, if you know the encoding, to use `Force encoding` as it will always be the fastest.
60-
Encoding guessing can be slow and not always accurate.
61-
62-
Encoding guessing is performed by `chardet` which is a pure Python library and is, by far, the slowest option. If
63-
you manually install `cChardet`, you will have a much faster guessing experience.
64-
///
57+
> [!tip] Encoding Guessing
58+
>
59+
> It is always recommended, if you know the encoding, to use `Force encoding` as it will always be the fastest.
60+
> Encoding guessing can be slow and not always accurate.
61+
>
62+
> Encoding guessing is performed by `chardet` which is a pure Python library and is, by far, the slowest option. If
63+
> you manually install `cChardet`, you will have a much faster guessing experience.
6564
6665
## File Patterns
6766

@@ -115,36 +114,35 @@ Pattern | Meaning
115114
`\v` | ASCII Vertical Tab (VT).
116115

117116

118-
/// example | Example Patterns
119-
120-
Used in the `Files which match` box, this would match all Python files of `.py` extensions excluding `__init__.py`:
121-
122-
```
123-
*.py|-__init__.py
124-
```
125-
126-
Used in the `Files which match` box, this would match any file type that is not `.py`.
127-
128-
```
129-
-*.py
130-
```
131-
132-
Used in the `Exclude folders`, this would exclude all folders with `name` followed by a single digit, except `name3`
133-
which we will always be included.
134-
135-
```
136-
name[0-9]|-name3
137-
```
138-
139-
Used in the `Exclude folders`, this would exclude all folders except `name3`.
140-
141-
```
142-
-name3
143-
```
144-
145-
If you need to escape `-` or `|`, you can put them in a sequence: `[-|]`. Remember to place `-` at the beginning of
146-
a sequence as `-` is also used to specify character ranges: `[a-z]`.
147-
///
117+
> [!example] Example Patterns
118+
>
119+
> Used in the `Files which match` box, this would match all Python files of `.py` extensions excluding `__init__.py`:
120+
>
121+
> ```
122+
> *.py|-__init__.py
123+
> ```
124+
>
125+
> Used in the `Files which match` box, this would match any file type that is not `.py`.
126+
>
127+
> ```
128+
> -*.py
129+
> ```
130+
>
131+
> Used in the `Exclude folders`, this would exclude all folders with `name` followed by a single digit, except `name3`
132+
> which we will always be included.
133+
>
134+
> ```
135+
> name[0-9]|-name3
136+
> ```
137+
>
138+
> Used in the `Exclude folders`, this would exclude all folders except `name3`.
139+
>
140+
> ```
141+
> -name3
142+
> ```
143+
>
144+
> If you need to escape `-` or `|`, you can put them in a sequence: `[-|]`. Remember to place `-` at the beginning of
145+
> a sequence as `-` is also used to specify character ranges: `[a-z]`.
148146
149147
#### Extended Match Syntax
150148
@@ -160,25 +158,23 @@ Pattern | Meaning
160158
`!(pattern_list)` | The pattern matches if the input string cannot be matched with any of the patterns in the `pattern_list`. Requires extended match feature to be enabled.
161159
`{}` | Bash style brace expansions. This is applied to patterns before anything else. Requires brace expansion feature to be enabled.
162160
163-
/// example | Example Extended Match Patterns
164-
For example, if we wanted to match files `this-file.txt` and `that-file.txt`, we could provide the following pattern:
165-
166-
```
167-
@(this|that)-file.txt
168-
```
169-
170-
The `|` contained within an extended match group will not split the pattern. So it is safe to combine with other patterns:
171-
172-
```
173-
@(this|that)-file.txt|*.py
174-
```
175-
///
176-
177-
/// tip | `!` and Extended Match Syntax
178-
If you have changed Rummage to use `!` instead of `-` for exclusion patterns and have enabled extended match
179-
patterns, you must escape `(` at the start of a file if you want the pattern to be recognized as an exclusion
180-
pattern instead of treating it as the start of an extended match pattern (`!(...)`).
181-
///
161+
> [!example] Example Extended Match Patterns
162+
> For example, if we wanted to match files `this-file.txt` and `that-file.txt`, we could provide the following pattern:
163+
>
164+
> ```
165+
> @(this|that)-file.txt
166+
> ```
167+
>
168+
> The `|` contained within an extended match group will not split the pattern. So it is safe to combine with other patterns:
169+
>
170+
> ```
171+
> @(this|that)-file.txt|*.py
172+
> ```
173+
174+
> [!tip] `!` and Extended Match Syntax
175+
> If you have changed Rummage to use `!` instead of `-` for exclusion patterns and have enabled extended match
176+
> patterns, you must escape `(` at the start of a file if you want the pattern to be recognized as an exclusion
177+
> pattern instead of treating it as the start of an extended match pattern (`!(...)`).
182178
183179
#### Brace Expansion Syntax
184180
@@ -200,13 +196,12 @@ Pattern | Meaning
200196
`{,}` | Bash style brace expansions. This is applied to patterns before anything else. Requires brace expansion feature to be enabled.
201197
`{n1..n2[..i]}` | Bash style sequences that expands a range of numbers or alphabetic characters by an optional increment.
202198
203-
/// example | Example Brace Expansion
204-
- `a{b,{c,d}}` --> `ab ac ad`
205-
- `{1..3}` --> `1 2 3`
206-
- `{a..d}` --> `a b c d`
207-
- `{2..4..2}` --> `2 4`
208-
- `{a..e..2}` --> `a c e`
209-
///
199+
> [!example] Example Brace Expansion
200+
> - `a{b,{c,d}}` --> `ab ac ad`
201+
> - `{1..3}` --> `1 2 3`
202+
> - `{a..d}` --> `a b c d`
203+
> - `{2..4..2}` --> `2 4`
204+
> - `{a..e..2}` --> `a c e`
210205
211206
#### Full Path Matching
212207

docs/src/markdown/usage.md

Lines changed: 36 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -87,14 +87,12 @@ You can also restrict which files get searched by providing wild card patterns (
8787
default, the patterns are applied to the base file or folder name. See [File Patterns](./search.md#wildcard) to learn
8888
more about accepted wild card pattern syntax and how to configure optional file pattern features.
8989

90-
/// tip | Hidden Files
91-
Rummage assumes dot files as hidden on all systems. Additionally, on Windows and macOS, it will also look at a
92-
file's filesystem attributes to determine if the system is potentially hiding the file as well.
93-
///
90+
> [!tip] Hidden Files
91+
> Rummage assumes dot files as hidden on all systems. Additionally, on Windows and macOS, it will also look at a
92+
> file's filesystem attributes to determine if the system is potentially hiding the file as well.
9493
95-
/// new | New 4.4.0
96-
Added symlink following via the **Follow symlinks** toggle.
97-
///
94+
> [!new] New 4.4.0
95+
> Added symlink following via the **Follow symlinks** toggle.
9896
9997
### Results
10098

@@ -106,10 +104,9 @@ options.
106104

107105
![Content Tab](images/content_tab.png)
108106

109-
/// tip | Column Options
110-
You can hide/show columns by right clicking the list header to get a special context menu. You can then deselect or
111-
select the column(s) you wish to hide/show respectively. You can also reorder the columns if desired.
112-
///
107+
> [!tip] Column Options
108+
> You can hide/show columns by right clicking the list header to get a special context menu. You can then deselect or
109+
> select the column(s) you wish to hide/show respectively. You can also reorder the columns if desired.
113110
114111
## Regular Expression Tester
115112

@@ -278,32 +275,31 @@ POSIX = 0x2000 # (?p)
278275
LITERAL = 0x10000 # Literal search
279276
```
280277

281-
/// example | Example Plugin
282-
In the example below, we have a replace plugin that replaces the search result with the name of the file. It is
283-
assumed this is not a binary replace, so a Unicode string is returned.
284-
285-
```py3
286-
from __future__ import unicode_literals
287-
from rummage.lib import rumcore
288-
import os
289-
290-
291-
class TestReplace(rumcore.ReplacePlugin):
292-
"""Replace object."""
293-
294-
def replace(self, m):
295-
"""Replace method."""
296-
297-
name = os.path.basename(self.get_file_name())
298-
return name
299-
300-
301-
def get_replace():
302-
"""Get the replace object."""
303-
304-
return TestReplace
305-
```
306-
///
278+
> [!example] Example Plugin
279+
> In the example below, we have a replace plugin that replaces the search result with the name of the file. It is
280+
> assumed this is not a binary replace, so a Unicode string is returned.
281+
>
282+
> ```py3
283+
> from __future__ import unicode_literals
284+
> from rummage.lib import rumcore
285+
> import os
286+
>
287+
>
288+
> class TestReplace(rumcore.ReplacePlugin):
289+
> """Replace object."""
290+
>
291+
> def replace(self, m):
292+
> """Replace method."""
293+
>
294+
> name = os.path.basename(self.get_file_name())
295+
> return name
296+
>
297+
>
298+
> def get_replace():
299+
> """Get the replace object."""
300+
>
301+
> return TestReplace
302+
> ```
307303
308304
## Export to CSV or HTML
309305
@@ -313,7 +309,6 @@ Rummage allows the exporting of the results to either CSV or HTML. Simply select
313309
**CSV** or **HTML**. The HTML output will be styled similar to the GUI interface with the results in tables with
314310
sortable columns.
315311
316-
/// info | Large Result Sets
317-
Really, really large sets of results will probably be best suited for CSV as a browser may have a hard time loading
318-
the entire data set at once.
319-
///
312+
> [!info] Large Result Sets
313+
> Really, really large sets of results will probably be best suited for CSV as a browser may have a hard time loading
314+
> the entire data set at once.

docs/theme/assets/pymdownx-extras/extra-928cef6c86.css

Lines changed: 0 additions & 2 deletions
This file was deleted.

docs/theme/assets/pymdownx-extras/extra-928cef6c86.css.map

Lines changed: 0 additions & 1 deletion
This file was deleted.

docs/theme/assets/pymdownx-extras/extra-95634471d6.css

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/theme/assets/pymdownx-extras/extra-95634471d6.css.map

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)