textual-fspicker 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- textual_fspicker-0.1.0/.github/FUNDING.yml +3 -0
- textual_fspicker-0.1.0/.github/workflows/style-and-lint.yaml +46 -0
- textual_fspicker-0.1.0/.gitignore +8 -0
- textual_fspicker-0.1.0/.pre-commit-config.yaml +10 -0
- textual_fspicker-0.1.0/.pylintrc +5 -0
- textual_fspicker-0.1.0/.python-version +1 -0
- textual_fspicker-0.1.0/ChangeLog.md +101 -0
- textual_fspicker-0.1.0/LICENSE +21 -0
- textual_fspicker-0.1.0/Makefile +115 -0
- textual_fspicker-0.1.0/PKG-INFO +81 -0
- textual_fspicker-0.1.0/README.md +50 -0
- textual_fspicker-0.1.0/img/textual-fspicker.png +0 -0
- textual_fspicker-0.1.0/pyproject.toml +63 -0
- textual_fspicker-0.1.0/requirements-dev.lock +54 -0
- textual_fspicker-0.1.0/requirements.lock +34 -0
- textual_fspicker-0.1.0/src/textual_fspicker/__init__.py +29 -0
- textual_fspicker-0.1.0/src/textual_fspicker/__main__.py +97 -0
- textual_fspicker-0.1.0/src/textual_fspicker/base_dialog.py +163 -0
- textual_fspicker-0.1.0/src/textual_fspicker/file_dialog.py +184 -0
- textual_fspicker-0.1.0/src/textual_fspicker/file_open.py +53 -0
- textual_fspicker-0.1.0/src/textual_fspicker/file_save.py +53 -0
- textual_fspicker-0.1.0/src/textual_fspicker/parts/__init__.py +12 -0
- textual_fspicker-0.1.0/src/textual_fspicker/parts/directory_navigation.py +471 -0
- textual_fspicker-0.1.0/src/textual_fspicker/parts/drive_navigation.py +141 -0
- textual_fspicker-0.1.0/src/textual_fspicker/path_filters.py +65 -0
- textual_fspicker-0.1.0/src/textual_fspicker/path_maker.py +48 -0
- textual_fspicker-0.1.0/src/textual_fspicker/py.typed +0 -0
- textual_fspicker-0.1.0/src/textual_fspicker/safe_tests.py +77 -0
- textual_fspicker-0.1.0/src/textual_fspicker/select_directory.py +88 -0
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
name: Code quality tests
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
pull_request:
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
|
|
11
|
+
style-lint-and-test:
|
|
12
|
+
|
|
13
|
+
name: Style and lint
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
strategy:
|
|
16
|
+
matrix:
|
|
17
|
+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
|
|
18
|
+
|
|
19
|
+
steps:
|
|
20
|
+
|
|
21
|
+
- name: Checkout Code
|
|
22
|
+
uses: actions/checkout@v4
|
|
23
|
+
|
|
24
|
+
- name: Set up Python
|
|
25
|
+
uses: actions/setup-python@v4
|
|
26
|
+
with:
|
|
27
|
+
python-version: ${{ matrix.python-version }}
|
|
28
|
+
|
|
29
|
+
- name: Install Rye
|
|
30
|
+
uses: eifinger/setup-rye@v4
|
|
31
|
+
with:
|
|
32
|
+
version: "latest"
|
|
33
|
+
|
|
34
|
+
- name: Install Dependencies
|
|
35
|
+
run: make setup
|
|
36
|
+
|
|
37
|
+
- name: Check the Code style
|
|
38
|
+
run: make codestyle
|
|
39
|
+
|
|
40
|
+
- name: Lint the code
|
|
41
|
+
run: make lint
|
|
42
|
+
|
|
43
|
+
- name: Type check the code
|
|
44
|
+
run: make stricttypecheck
|
|
45
|
+
|
|
46
|
+
### style-and-lint.yaml ends here
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3.13.1
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
# ChangeLog
|
|
2
|
+
|
|
3
|
+
## v0.1.0
|
|
4
|
+
|
|
5
|
+
**Released: 2025-01-15**
|
|
6
|
+
|
|
7
|
+
- Added <kbd>backspace</kbd> as a navigation shortcut for "change to parent"
|
|
8
|
+
([thanks to ihabunek](https://github.com/davep/textual-fspicker/pull/7)).
|
|
9
|
+
- Added support for drive selection on Microsoft Windows
|
|
10
|
+
([davidfokkema](https://github.com/davep/textual-fspicker/pull/9)),
|
|
11
|
+
|
|
12
|
+
## v0.0.10
|
|
13
|
+
|
|
14
|
+
**Released: 2023-08-07**
|
|
15
|
+
|
|
16
|
+
- Fixed a breaking change with threaded workers with newer versions of
|
|
17
|
+
Textual ([thanks to
|
|
18
|
+
adeemm](https://github.com/davep/textual-fspicker/pull/3)).
|
|
19
|
+
- Fixed the look and size of the main navigation control in all dialogs,
|
|
20
|
+
taking into account recent default styling changes in Textual.
|
|
21
|
+
|
|
22
|
+
## v0.0.9
|
|
23
|
+
|
|
24
|
+
**Released: 2023-06-04**
|
|
25
|
+
|
|
26
|
+
- Changed the underlying type of the dialog screens to be `Path | None`
|
|
27
|
+
rather than `Path`.
|
|
28
|
+
- Changed the way the dialogs cancel. Instead of dismissing with no result,
|
|
29
|
+
a result is now set to `None`. That is, if something is selected then a
|
|
30
|
+
`Path` will be the result, if the user cancels then `None` is the result.
|
|
31
|
+
- Fixed `SelectDirectory` not showing the current selection on startup.
|
|
32
|
+
|
|
33
|
+
## v0.0.8
|
|
34
|
+
|
|
35
|
+
**Released: 2023-06-04**
|
|
36
|
+
|
|
37
|
+
- Fixed the initial filter in the `FileOpen` and `FileSave` dialogs not
|
|
38
|
+
applying on startup.
|
|
39
|
+
|
|
40
|
+
## v0.0.7
|
|
41
|
+
|
|
42
|
+
**Released: 2023-06-03**
|
|
43
|
+
|
|
44
|
+
- Updated how the messages work to take into account changes around
|
|
45
|
+
`control`.
|
|
46
|
+
- Updated dependency information making this require a Textual version of at
|
|
47
|
+
least 0.27.0.
|
|
48
|
+
|
|
49
|
+
## v0.0.6
|
|
50
|
+
|
|
51
|
+
**Released: 2023-06-03**
|
|
52
|
+
|
|
53
|
+
- Add support for setting an alternative to `Path` as the core of path
|
|
54
|
+
handling in the library.
|
|
55
|
+
- Fixed a problem where text was unreadable when a Textual application was
|
|
56
|
+
in light mode.
|
|
57
|
+
|
|
58
|
+
## v0.0.5
|
|
59
|
+
|
|
60
|
+
**Released: 2023-05-23**
|
|
61
|
+
|
|
62
|
+
- Added `FileSave`.
|
|
63
|
+
|
|
64
|
+
## v0.0.4
|
|
65
|
+
|
|
66
|
+
**Released: 2023-05-22**
|
|
67
|
+
|
|
68
|
+
- Moved much of the code in `FileOpen` into `FileSystemPickerScreen`,
|
|
69
|
+
providing a common base class for other dialogs.
|
|
70
|
+
- Added `SelectDirectory`.
|
|
71
|
+
|
|
72
|
+
## v0.0.3
|
|
73
|
+
|
|
74
|
+
**Released: 2023-05-21**
|
|
75
|
+
|
|
76
|
+
- Added the ability to style the content of the `DirectoryNaviation` widget.
|
|
77
|
+
- Added support for file filters to `FileOpen`.
|
|
78
|
+
|
|
79
|
+
## v0.0.2
|
|
80
|
+
|
|
81
|
+
**Released: 2023-05-19**
|
|
82
|
+
|
|
83
|
+
- Typing a directory into the input control of the `FileOpen` dialog now
|
|
84
|
+
changes the directory in the navigator and stays within the dialog.
|
|
85
|
+
- Sprinkled some `PermissionError`-handling code around the `FileOpen`
|
|
86
|
+
dialog, so that if the user tries to go where they don't belong, the
|
|
87
|
+
application won't blow up.
|
|
88
|
+
- Made it easier for the user of the library to restyle the look of the
|
|
89
|
+
`FileOpen` dialog (documentation will follow for that at some point, but
|
|
90
|
+
reading of the `DEFAULT_CSS` will give some ideas).
|
|
91
|
+
- Simplified the internals of prompt creation in the `DirectoryNaviation`
|
|
92
|
+
widget, with a view to setting about improving what's shown and adding
|
|
93
|
+
configurable styling pretty soon.
|
|
94
|
+
|
|
95
|
+
## v0.0.1
|
|
96
|
+
|
|
97
|
+
**Released: 2023-05-18**
|
|
98
|
+
|
|
99
|
+
Initial release.
|
|
100
|
+
|
|
101
|
+
[//]: # (ChangeLog.md ends here)
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2023 Dave Pearson <davep@davep.org>
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to
|
|
7
|
+
deal in the Software without restriction, including without limitation the
|
|
8
|
+
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
|
9
|
+
sell copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
|
13
|
+
all copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
20
|
+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
|
21
|
+
IN THE SOFTWARE.
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
lib := textual_fspicker
|
|
2
|
+
src := src/
|
|
3
|
+
run := rye run
|
|
4
|
+
test := rye test
|
|
5
|
+
python := $(run) python
|
|
6
|
+
lint := rye lint -- --select I
|
|
7
|
+
fmt := rye fmt
|
|
8
|
+
mypy := $(run) mypy
|
|
9
|
+
|
|
10
|
+
##############################################################################
|
|
11
|
+
# Local "interactive testing" of the code.
|
|
12
|
+
.PHONY: run
|
|
13
|
+
run: # Run the code in a testing context
|
|
14
|
+
$(python) -m $(lib)
|
|
15
|
+
|
|
16
|
+
.PHONY: debug
|
|
17
|
+
debug: # Run the code with Textual devtools enabled
|
|
18
|
+
TEXTUAL=devtools make
|
|
19
|
+
|
|
20
|
+
.PHONY: console
|
|
21
|
+
console: # Run the textual console
|
|
22
|
+
$(run) textual console
|
|
23
|
+
|
|
24
|
+
##############################################################################
|
|
25
|
+
# Setup/update packages the system requires.
|
|
26
|
+
.PHONY: setup
|
|
27
|
+
setup: # Set up the repository for development
|
|
28
|
+
rye sync
|
|
29
|
+
$(run) pre-commit install
|
|
30
|
+
|
|
31
|
+
.PHONY: update
|
|
32
|
+
update: # Update all dependencies
|
|
33
|
+
rye sync --update-all
|
|
34
|
+
|
|
35
|
+
.PHONY: resetup
|
|
36
|
+
resetup: realclean # Recreate the virtual environment from scratch
|
|
37
|
+
make setup
|
|
38
|
+
|
|
39
|
+
##############################################################################
|
|
40
|
+
# Checking/testing/linting/etc.
|
|
41
|
+
.PHONY: lint
|
|
42
|
+
lint: # Check the code for linting issues
|
|
43
|
+
$(lint) $(src)
|
|
44
|
+
|
|
45
|
+
.PHONY: codestyle
|
|
46
|
+
codestyle: # Is the code formatted correctly?
|
|
47
|
+
$(fmt) --check $(src)
|
|
48
|
+
|
|
49
|
+
.PHONY: typecheck
|
|
50
|
+
typecheck: # Perform static type checks with mypy
|
|
51
|
+
$(mypy) --scripts-are-modules $(src)
|
|
52
|
+
|
|
53
|
+
.PHONY: stricttypecheck
|
|
54
|
+
stricttypecheck: # Perform a strict static type checks with mypy
|
|
55
|
+
$(mypy) --scripts-are-modules --strict $(src)
|
|
56
|
+
|
|
57
|
+
.PHONY: checkall
|
|
58
|
+
checkall: codestyle lint stricttypecheck # Check all the things
|
|
59
|
+
|
|
60
|
+
##############################################################################
|
|
61
|
+
# Package/publish.
|
|
62
|
+
.PHONY: package
|
|
63
|
+
package: # Package the library
|
|
64
|
+
rye build
|
|
65
|
+
|
|
66
|
+
.PHONY: spackage
|
|
67
|
+
spackage: # Create a source package for the library
|
|
68
|
+
rye build --sdist
|
|
69
|
+
|
|
70
|
+
.PHONY: testdist
|
|
71
|
+
testdist: package # Perform a test distribution
|
|
72
|
+
rye publish --yes --skip-existing --repository testpypi --repository-url https://test.pypi.org/legacy/
|
|
73
|
+
|
|
74
|
+
.PHONY: dist
|
|
75
|
+
dist: package # Upload to pypi
|
|
76
|
+
rye publish --yes --skip-existing
|
|
77
|
+
|
|
78
|
+
##############################################################################
|
|
79
|
+
# Utility.
|
|
80
|
+
.PHONY: repl
|
|
81
|
+
repl: # Start a Python REPL in the venv.
|
|
82
|
+
$(python)
|
|
83
|
+
|
|
84
|
+
.PHONY: delint
|
|
85
|
+
delint: # Fix linting issues.
|
|
86
|
+
$(lint) --fix $(src)
|
|
87
|
+
|
|
88
|
+
.PHONY: pep8ify
|
|
89
|
+
pep8ify: # Reformat the code to be as PEP8 as possible.
|
|
90
|
+
$(fmt) $(src)
|
|
91
|
+
|
|
92
|
+
.PHONY: tidy
|
|
93
|
+
tidy: delint pep8ify # Tidy up the code, fixing lint and format issues.
|
|
94
|
+
|
|
95
|
+
.PHONY: clean
|
|
96
|
+
clean: # Clean the build directories
|
|
97
|
+
rm -rf dist
|
|
98
|
+
|
|
99
|
+
.PHONY: realclean
|
|
100
|
+
realclean: clean # Clean the venv and build directories
|
|
101
|
+
rm -rf .venv
|
|
102
|
+
|
|
103
|
+
.PHONY: help
|
|
104
|
+
help: # Display this help
|
|
105
|
+
@grep -Eh "^[a-z]+:.+# " $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.+# "}; {printf "%-20s %s\n", $$1, $$2}'
|
|
106
|
+
|
|
107
|
+
##############################################################################
|
|
108
|
+
# Housekeeping tasks.
|
|
109
|
+
.PHONY: housekeeping
|
|
110
|
+
housekeeping: # Perform some git housekeeping
|
|
111
|
+
git fsck
|
|
112
|
+
git gc --aggressive
|
|
113
|
+
git remote update --prune
|
|
114
|
+
|
|
115
|
+
### Makefile ends here
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
Metadata-Version: 2.3
|
|
2
|
+
Name: textual-fspicker
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: A simple Textual filesystem picker dialog library.
|
|
5
|
+
Project-URL: Homepage, https://github.com/davep/textual-fspicker
|
|
6
|
+
Project-URL: Repository, https://github.com/davep/textual-fspicker
|
|
7
|
+
Project-URL: Documentation, https://github.com/davep/textual-fspicker/blob/main/README.md
|
|
8
|
+
Project-URL: Source, https://github.com/davep/textual-fspicker
|
|
9
|
+
Project-URL: Issues, https://github.com/davep/textual-fspicker/issues
|
|
10
|
+
Project-URL: Discussions, https://github.com/davep/textual-fspicker/discussions
|
|
11
|
+
Author-email: Dave Pearson <davep@davep.org>
|
|
12
|
+
License: License :: OSI Approved :: MIT License
|
|
13
|
+
Keywords: dialog,file system,filesystem,library,terminal
|
|
14
|
+
Classifier: Development Status :: 3 - Alpha
|
|
15
|
+
Classifier: Environment :: Console
|
|
16
|
+
Classifier: Intended Audience :: Developers
|
|
17
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
18
|
+
Classifier: Operating System :: OS Independent
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
23
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
24
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
25
|
+
Classifier: Topic :: Software Development :: Libraries
|
|
26
|
+
Classifier: Topic :: Terminals
|
|
27
|
+
Classifier: Typing :: Typed
|
|
28
|
+
Requires-Python: >=3.8
|
|
29
|
+
Requires-Dist: textual>=1.0.0
|
|
30
|
+
Description-Content-Type: text/markdown
|
|
31
|
+
|
|
32
|
+
# textual-fspicker
|
|
33
|
+
|
|
34
|
+

|
|
35
|
+
*An example of `textual-fspicker` being used in a Textual application*
|
|
36
|
+
|
|
37
|
+
## Introduction
|
|
38
|
+
|
|
39
|
+
This library provides a simple set of filesystem navigation and picking
|
|
40
|
+
dialogs (actually, as of the time of writing, it only provides two, this is
|
|
41
|
+
a very early WiP you're seeing). The aim is to provide "ready to go" dialogs
|
|
42
|
+
that should also be fairly easy to tailor to your own applications.
|
|
43
|
+
|
|
44
|
+
## Installing
|
|
45
|
+
|
|
46
|
+
The package can be installed with `pip` or related tools, for example:
|
|
47
|
+
|
|
48
|
+
```sh
|
|
49
|
+
$ pip install textual-fspicker
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## The library
|
|
53
|
+
|
|
54
|
+
Right at the moment there's just two dialogs available:
|
|
55
|
+
|
|
56
|
+
- `FileOpen` -- For selecting a file from the filesystem.
|
|
57
|
+
- `FileSave` -- For selecting a file for saving in the filesystem.
|
|
58
|
+
- `SelectDirectory` -- For selecting a directory from the filesysrem.
|
|
59
|
+
|
|
60
|
+
You can see them in action in the [demo/test
|
|
61
|
+
code](https://github.com/davep/textual-fspicker/blob/main/src/textual_fspicker/__main__.py).
|
|
62
|
+
|
|
63
|
+
Yes, I know that documentation is lacking right now -- I'm still fleshing
|
|
64
|
+
out how this will work and what it will provide -- so the best place to see
|
|
65
|
+
how the code can be used is in that demo/test code.
|
|
66
|
+
|
|
67
|
+
## TODO
|
|
68
|
+
|
|
69
|
+
- [ ] Flesh out what's displayed for directory entries
|
|
70
|
+
- [ ] Add lots of styling options for directory entries
|
|
71
|
+
- [ ] Settle on a final set of default styles for the dialogs
|
|
72
|
+
- [X] Add a more file-save-oriented dialog
|
|
73
|
+
- [X] Add a directory picking dialog
|
|
74
|
+
- [X] Add file filtering (extensions using `Select`)
|
|
75
|
+
- [X] Expose the hidden show/hide facility of the navigator in the dialogs
|
|
76
|
+
- [ ] Better documentation
|
|
77
|
+
- [X] Test on Windows
|
|
78
|
+
- [ ] Add custom mtime formatting
|
|
79
|
+
- [ ] Add support for showing different times
|
|
80
|
+
|
|
81
|
+
[//]: # (README.md ends here)
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# textual-fspicker
|
|
2
|
+
|
|
3
|
+

|
|
4
|
+
*An example of `textual-fspicker` being used in a Textual application*
|
|
5
|
+
|
|
6
|
+
## Introduction
|
|
7
|
+
|
|
8
|
+
This library provides a simple set of filesystem navigation and picking
|
|
9
|
+
dialogs (actually, as of the time of writing, it only provides two, this is
|
|
10
|
+
a very early WiP you're seeing). The aim is to provide "ready to go" dialogs
|
|
11
|
+
that should also be fairly easy to tailor to your own applications.
|
|
12
|
+
|
|
13
|
+
## Installing
|
|
14
|
+
|
|
15
|
+
The package can be installed with `pip` or related tools, for example:
|
|
16
|
+
|
|
17
|
+
```sh
|
|
18
|
+
$ pip install textual-fspicker
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## The library
|
|
22
|
+
|
|
23
|
+
Right at the moment there's just two dialogs available:
|
|
24
|
+
|
|
25
|
+
- `FileOpen` -- For selecting a file from the filesystem.
|
|
26
|
+
- `FileSave` -- For selecting a file for saving in the filesystem.
|
|
27
|
+
- `SelectDirectory` -- For selecting a directory from the filesysrem.
|
|
28
|
+
|
|
29
|
+
You can see them in action in the [demo/test
|
|
30
|
+
code](https://github.com/davep/textual-fspicker/blob/main/src/textual_fspicker/__main__.py).
|
|
31
|
+
|
|
32
|
+
Yes, I know that documentation is lacking right now -- I'm still fleshing
|
|
33
|
+
out how this will work and what it will provide -- so the best place to see
|
|
34
|
+
how the code can be used is in that demo/test code.
|
|
35
|
+
|
|
36
|
+
## TODO
|
|
37
|
+
|
|
38
|
+
- [ ] Flesh out what's displayed for directory entries
|
|
39
|
+
- [ ] Add lots of styling options for directory entries
|
|
40
|
+
- [ ] Settle on a final set of default styles for the dialogs
|
|
41
|
+
- [X] Add a more file-save-oriented dialog
|
|
42
|
+
- [X] Add a directory picking dialog
|
|
43
|
+
- [X] Add file filtering (extensions using `Select`)
|
|
44
|
+
- [X] Expose the hidden show/hide facility of the navigator in the dialogs
|
|
45
|
+
- [ ] Better documentation
|
|
46
|
+
- [X] Test on Windows
|
|
47
|
+
- [ ] Add custom mtime formatting
|
|
48
|
+
- [ ] Add support for showing different times
|
|
49
|
+
|
|
50
|
+
[//]: # (README.md ends here)
|
|
Binary file
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "textual-fspicker"
|
|
3
|
+
version = "0.1.0"
|
|
4
|
+
description = "A simple Textual filesystem picker dialog library."
|
|
5
|
+
authors = [
|
|
6
|
+
{ name = "Dave Pearson", email = "davep@davep.org" }
|
|
7
|
+
]
|
|
8
|
+
dependencies = [
|
|
9
|
+
"textual>=1.0.0",
|
|
10
|
+
]
|
|
11
|
+
readme = "README.md"
|
|
12
|
+
requires-python = ">=3.8"
|
|
13
|
+
license = { text = "License :: OSI Approved :: MIT License" }
|
|
14
|
+
keywords = [
|
|
15
|
+
"terminal",
|
|
16
|
+
"library",
|
|
17
|
+
"file system",
|
|
18
|
+
"filesystem",
|
|
19
|
+
"dialog",
|
|
20
|
+
]
|
|
21
|
+
classifiers = [
|
|
22
|
+
"License :: OSI Approved :: MIT License",
|
|
23
|
+
"Environment :: Console",
|
|
24
|
+
"Development Status :: 3 - Alpha",
|
|
25
|
+
"Intended Audience :: Developers",
|
|
26
|
+
"Operating System :: OS Independent",
|
|
27
|
+
"Programming Language :: Python :: 3.8",
|
|
28
|
+
"Programming Language :: Python :: 3.9",
|
|
29
|
+
"Programming Language :: Python :: 3.10",
|
|
30
|
+
"Programming Language :: Python :: 3.11",
|
|
31
|
+
"Programming Language :: Python :: 3.12",
|
|
32
|
+
"Programming Language :: Python :: 3.13",
|
|
33
|
+
"Topic :: Terminals",
|
|
34
|
+
"Topic :: Software Development :: Libraries",
|
|
35
|
+
"Typing :: Typed",
|
|
36
|
+
]
|
|
37
|
+
|
|
38
|
+
[project.urls]
|
|
39
|
+
Homepage = "https://github.com/davep/textual-fspicker"
|
|
40
|
+
Repository = "https://github.com/davep/textual-fspicker"
|
|
41
|
+
Documentation = "https://github.com/davep/textual-fspicker/blob/main/README.md"
|
|
42
|
+
Source = "https://github.com/davep/textual-fspicker"
|
|
43
|
+
Issues = "https://github.com/davep/textual-fspicker/issues"
|
|
44
|
+
Discussions = "https://github.com/davep/textual-fspicker/discussions"
|
|
45
|
+
|
|
46
|
+
[build-system]
|
|
47
|
+
# https://github.com/astral-sh/rye/issues/1446
|
|
48
|
+
requires = ["hatchling==1.26.3", "hatch-vcs"]
|
|
49
|
+
# requires = ["hatchling"]
|
|
50
|
+
build-backend = "hatchling.build"
|
|
51
|
+
|
|
52
|
+
[tool.rye]
|
|
53
|
+
managed = true
|
|
54
|
+
dev-dependencies = [
|
|
55
|
+
"pre-commit>=4.0.1",
|
|
56
|
+
"mypy>=1.14.1",
|
|
57
|
+
]
|
|
58
|
+
|
|
59
|
+
[tool.hatch.metadata]
|
|
60
|
+
allow-direct-references = true
|
|
61
|
+
|
|
62
|
+
[tool.hatch.build.targets.wheel]
|
|
63
|
+
packages = ["src/textual_fspicker"]
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# generated by rye
|
|
2
|
+
# use `rye lock` or `rye sync` to update this lockfile
|
|
3
|
+
#
|
|
4
|
+
# last locked with the following flags:
|
|
5
|
+
# pre: false
|
|
6
|
+
# features: []
|
|
7
|
+
# all-features: false
|
|
8
|
+
# with-sources: false
|
|
9
|
+
# generate-hashes: false
|
|
10
|
+
# universal: false
|
|
11
|
+
|
|
12
|
+
-e file:.
|
|
13
|
+
cfgv==3.4.0
|
|
14
|
+
# via pre-commit
|
|
15
|
+
distlib==0.3.9
|
|
16
|
+
# via virtualenv
|
|
17
|
+
filelock==3.16.1
|
|
18
|
+
# via virtualenv
|
|
19
|
+
identify==2.6.5
|
|
20
|
+
# via pre-commit
|
|
21
|
+
linkify-it-py==2.0.3
|
|
22
|
+
# via markdown-it-py
|
|
23
|
+
markdown-it-py==3.0.0
|
|
24
|
+
# via mdit-py-plugins
|
|
25
|
+
# via rich
|
|
26
|
+
# via textual
|
|
27
|
+
mdit-py-plugins==0.4.2
|
|
28
|
+
# via markdown-it-py
|
|
29
|
+
mdurl==0.1.2
|
|
30
|
+
# via markdown-it-py
|
|
31
|
+
mypy==1.14.1
|
|
32
|
+
mypy-extensions==1.0.0
|
|
33
|
+
# via mypy
|
|
34
|
+
nodeenv==1.9.1
|
|
35
|
+
# via pre-commit
|
|
36
|
+
platformdirs==4.3.6
|
|
37
|
+
# via textual
|
|
38
|
+
# via virtualenv
|
|
39
|
+
pre-commit==4.0.1
|
|
40
|
+
pygments==2.19.1
|
|
41
|
+
# via rich
|
|
42
|
+
pyyaml==6.0.2
|
|
43
|
+
# via pre-commit
|
|
44
|
+
rich==13.9.4
|
|
45
|
+
# via textual
|
|
46
|
+
textual==1.0.0
|
|
47
|
+
# via textual-fspicker
|
|
48
|
+
typing-extensions==4.12.2
|
|
49
|
+
# via mypy
|
|
50
|
+
# via textual
|
|
51
|
+
uc-micro-py==1.0.3
|
|
52
|
+
# via linkify-it-py
|
|
53
|
+
virtualenv==20.28.1
|
|
54
|
+
# via pre-commit
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# generated by rye
|
|
2
|
+
# use `rye lock` or `rye sync` to update this lockfile
|
|
3
|
+
#
|
|
4
|
+
# last locked with the following flags:
|
|
5
|
+
# pre: false
|
|
6
|
+
# features: []
|
|
7
|
+
# all-features: false
|
|
8
|
+
# with-sources: false
|
|
9
|
+
# generate-hashes: false
|
|
10
|
+
# universal: false
|
|
11
|
+
|
|
12
|
+
-e file:.
|
|
13
|
+
linkify-it-py==2.0.3
|
|
14
|
+
# via markdown-it-py
|
|
15
|
+
markdown-it-py==3.0.0
|
|
16
|
+
# via mdit-py-plugins
|
|
17
|
+
# via rich
|
|
18
|
+
# via textual
|
|
19
|
+
mdit-py-plugins==0.4.2
|
|
20
|
+
# via markdown-it-py
|
|
21
|
+
mdurl==0.1.2
|
|
22
|
+
# via markdown-it-py
|
|
23
|
+
platformdirs==4.3.6
|
|
24
|
+
# via textual
|
|
25
|
+
pygments==2.19.1
|
|
26
|
+
# via rich
|
|
27
|
+
rich==13.9.4
|
|
28
|
+
# via textual
|
|
29
|
+
textual==1.0.0
|
|
30
|
+
# via textual-fspicker
|
|
31
|
+
typing-extensions==4.12.2
|
|
32
|
+
# via textual
|
|
33
|
+
uc-micro-py==1.0.3
|
|
34
|
+
# via linkify-it-py
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"""A library that provides widgets for selecting things from the filesystem."""
|
|
2
|
+
|
|
3
|
+
##############################################################################
|
|
4
|
+
# Python imports.
|
|
5
|
+
from importlib.metadata import version
|
|
6
|
+
|
|
7
|
+
######################################################################
|
|
8
|
+
# Main app information.
|
|
9
|
+
__author__ = "Dave Pearson"
|
|
10
|
+
__copyright__ = "Copyright 2023, Dave Pearson"
|
|
11
|
+
__credits__ = ["Dave Pearson"]
|
|
12
|
+
__maintainer__ = "Dave Pearson"
|
|
13
|
+
__email__ = "davep@davep.org"
|
|
14
|
+
__version__ = version("textual_fspicker")
|
|
15
|
+
__licence__ = "MIT"
|
|
16
|
+
|
|
17
|
+
##############################################################################
|
|
18
|
+
# Local imports.
|
|
19
|
+
from .file_open import FileOpen
|
|
20
|
+
from .file_save import FileSave
|
|
21
|
+
from .path_filters import Filters
|
|
22
|
+
from .path_maker import MakePath
|
|
23
|
+
from .select_directory import SelectDirectory
|
|
24
|
+
|
|
25
|
+
##############################################################################
|
|
26
|
+
# Export the imports.
|
|
27
|
+
__all__ = ["FileOpen", "FileSave", "SelectDirectory", "Filters", "MakePath"]
|
|
28
|
+
|
|
29
|
+
### __init__.py ends here
|