Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 36 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# sublime_lib

A utility library for Sublime Text,
A utility library for Sublime Text,
providing a variety of convenience features.

## Installation

To make use of sublime_lib in a package...

1. declare it as [dependency](https://packagecontrol.io/docs/dependencies):
1. declare it as [a dependency][pc-dependencies]:

Create a file named `dependencies.json`
with the following contents in package's root directory:
Expand All @@ -25,7 +25,7 @@ To make use of sublime_lib in a package...
Open _Command Palette_ and run `Package Control: Satisfy Libraries`
to ensure sublime_lib is installed and available for use.

2. Import sublime_lib in plugins, which want to make use of it.
2. Import sublime_lib in plugins which want to make use of it.

```python
import sublime_lib
Expand All @@ -34,28 +34,50 @@ To make use of sublime_lib in a package...
## Features

For complete documentation of all features,
see the [API documentation](https://sublimetext.github.io/sublime_lib/).
see the [API documentation][docs].

Highlights include:

- [`ActivityIndicator`](https://sublimetext.github.io/sublime_lib/#activity-indicator) context manager to indicate background activity via status bar.
- [`ResourcePath`](https://sublimetext.github.io/sublime_lib/#sublime_lib.ResourcePath), a [pathlib.Path](https://docs.python.org/3/library/pathlib.html) inspired representation of ST's resource paths,
- [`ActivityIndicator`][sublime_lib.ActivityIndicator] context manager
to indicate background activity via status bar.
- [`ResourcePath`][sublime_lib.ResourcePath],
a [pathlib.Path][]-inspired representation of ST's resource paths
with methods to convert from and to filesystem paths.
- [`SettingsDict`](https://sublimetext.github.io/sublime_lib/modules/sublime_lib.settings_dict.html) provides a standard Python `dict` inspired interface for `sublime.Settings` objects.
- [`OutputPanel`](https://sublimetext.github.io/sublime_lib/modules/sublime_lib.output_panel.html), extending `ViewStream` to provide additional functionality for output panel views.
- [`ViewStream`](https://sublimetext.github.io/sublime_lib/modules/sublime_lib.view_stream.html), a standard [Python IO stream](https://docs.python.org/3/library/io.html#io.TextIOBase) wrapping a `sublime.View` object
- [`SettingsDict`][sublime_lib.SettingsDict] provides a standard Python `dict`-like interface
for `sublime.Settings` objects.
- [`ViewStream`][sublime_lib.ViewStream],
providing a standard [Python IO stream][io.TextIOBase]
wrapping a `sublime.View` object.
- [`OutputPanel`][sublime_lib.OutputPanel],
extending `ViewStream` to provide additional functionality for output panel views.

### Deprecated

The [`flags` submodule](https://sublimetext.github.io/sublime_lib/#module-sublime_lib.flags) is deprecated in favour of native API, available as of ST4135.
The [`flags` submodule][sublime_lib.flags] is deprecated
in favour of native API,
available as of ST4135.

The [`syntax` submodule](https://sublimetext.github.io/sublime_lib/modules/sublime_lib.syntax.html), is marked deprecated in favour of native API functions, available as of ST4.
The [Syntax Utilities][] are marked deprecated
in favour of native API functions,
available as of ST4.

## Releasing a new version

1. Create a tag in the format `v<major>.<minor>.<patch>`
2. Push the tag to origin.

A GitHub action should be created that builds a WHEEL file,
creates a release for this tag
and attaches the WHEEL file as an artefact.
A GitHub action builds a WHEEL file,
creates a release for this tag,
and attaches the WHEEL file as an artifact.

[docs]: https://sublimetext.github.io/sublime_lib/
[io.TextIOBase]: https://docs.python.org/3/library/io.html#io.TextIOBase
[pathlib.Path]: https://docs.python.org/3/library/pathlib.html
[pc-dependencies]: https://packagecontrol.io/docs/dependencies
[sublime_lib.ActivityIndicator]: https://sublimetext.github.io/sublime_lib/#sublime_lib.ActivityIndicator
[sublime_lib.flags]: https://sublimetext.github.io/sublime_lib/#module-sublime_lib.flags
[sublime_lib.OutputPanel]: https://sublimetext.github.io/sublime_lib/#sublime_lib.OutputPanel
[sublime_lib.ResourcePath]: https://sublimetext.github.io/sublime_lib/#sublime_lib.ResourcePath
[sublime_lib.SettingsDict]: https://sublimetext.github.io/sublime_lib/#sublime_lib.SettingsDict
[sublime_lib.ViewStream]: https://sublimetext.github.io/sublime_lib/#sublime_lib.ViewStream
[Syntax Utilities]: https://sublimetext.github.io/sublime_lib/#syntax-utilities
Loading