listpick 0.1.4.0__py3-none-any.whl

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.
@@ -0,0 +1,186 @@
1
+ Metadata-Version: 2.4
2
+ Name: listpick
3
+ Version: 0.1.4.0
4
+ Summary: List Picker is a powerful TUI data tool for creating TUI apps or viewing/comparing tabulated data.
5
+ Home-page: https://github.com/grimandgreedy/list_picker
6
+ Author: Grim
7
+ Author-email: grimandgreedy@protonmail.com
8
+ Project-URL: Bug Tracker, https://github.com/grimandgreedy/list_picker/issues
9
+ Classifier: Programming Language :: Python :: 3
10
+ Classifier: Operating System :: Unix
11
+ Requires-Python: >=3.0
12
+ Description-Content-Type: text/markdown
13
+ Requires-Dist: setuptools
14
+ Requires-Dist: dill
15
+ Requires-Dist: wcwidth
16
+ Requires-Dist: ipython
17
+ Requires-Dist: msgpack
18
+ Requires-Dist: openpyxl
19
+ Requires-Dist: pandas
20
+ Requires-Dist: pyperclip
21
+ Requires-Dist: toml
22
+ Requires-Dist: traitlets
23
+ Dynamic: author
24
+ Dynamic: author-email
25
+ Dynamic: classifier
26
+ Dynamic: description
27
+ Dynamic: description-content-type
28
+ Dynamic: home-page
29
+ Dynamic: project-url
30
+ Dynamic: requires-dist
31
+ Dynamic: requires-python
32
+ Dynamic: summary
33
+
34
+ # list_picker
35
+
36
+ List Picker is a TUI tool which allows one to display and select from a list of rows. A very simple concept but also, I hope, a powerful tool that will make it easier for people to develop TUI apps.
37
+
38
+ Rows of data can be viewed, selected, generated, saved, loaded, refreshed, modified or copied to the clipboard. Easy to integrate into your project by creating a `menu = Picker(stdscr, items:list[list[str]])` and then the menu will be displayed by running `menu.run()`.
39
+
40
+ It works great as the backend for a TUI application and can also be used as a standalone data viewer.
41
+
42
+ **NOTE**: list_picker is still in development.
43
+
44
+ # Quickstart
45
+
46
+ ```
47
+ git clone https://github.com/grimandgreedy/list_picker
48
+
49
+ cd list_picker && python -m pip install -r requirements.txt
50
+
51
+ python list_picker.py -g ./examples/list_files.py
52
+ ```
53
+
54
+ ## Overview
55
+
56
+ The application allows you to:
57
+ - Select multiple items from different file types and input streams
58
+ - Delete individual items
59
+ - Highlight specific items for quick selection
60
+ - Filtering: supports regular expressions for row- and column-based filtering.
61
+ - Searching: supports regular expressions for row- and column-based searching.
62
+ - Sort data based on specified columns and sort-type
63
+ - Save and load data.
64
+ - Copy/paste selections to clipboard
65
+ - Generate rows from a list of commands in an input.toml file.
66
+
67
+ ## Examples
68
+
69
+
70
+ - Identify video duplicates (./examples/video_duplicates.toml):
71
+ ```python
72
+ python list_picker.py -g ./examples/video_duplicates.toml
73
+ ```
74
+ - From the list of commands in the toml file we generate the properties we will use to identify the duplicates.
75
+
76
+ - In the example file we set the directory and get the files with a simle `eza` (`ls`) command. We could also use `find` or `cat` from a list of files.
77
+
78
+
79
+ - We get the SHA1 hash to identify identical files; we also get the size, duration, resolution, and bitrate so that we can identify a video duplicate that may have the same duration but a lower resolution.
80
+
81
+ <div align="center"> <img src="assets/file_compare.png" alt="Video Compare" width="70%"> </div>
82
+
83
+
84
+ - [Aria2TUI](https://github.com/grimandgreedy/Aria2TUI) is implemented using list_picker. This is a good example of how list_picker can be used for menus, data viewing, and active data retrieval.
85
+
86
+ <div align="center"> <img src="assets/aria2tui_screenshot.png" alt="Aria2TUI" width="70%"> </div>
87
+
88
+ - [lpfman](https://github.com/grimandgreedy/lpfman) is a basic file manager created for the purposes of illustrating how easy TUI apps can be developed with the use of list_picker. In 20 minutes and <100 lines of code we made a very basic file manager.
89
+
90
+ <div align="center"> <img src="assets/lpfman.png" alt="lpfman" width="70%"> </div>
91
+
92
+
93
+
94
+ ## Description
95
+
96
+ ### Key Features:
97
+ 1. **File Input Support:**
98
+ ```python
99
+ python list_picker.py -i ~/dn.pkl -t pkl
100
+ ```
101
+ - Text files (TSV, CSV)
102
+ - JSON
103
+ - XLSX
104
+ - ODS (OpenDocument Spreadsheet)
105
+ - Pickle
106
+
107
+ 2. **Generate data based on an toml file with relevant commands to generate the rows.**
108
+ ```python
109
+ python list_picker.py -g ./examples/video_duplicates.toml
110
+ ```
111
+
112
+ - See ./examples/
113
+
114
+ 3. **Highlighting:**
115
+ - Highlight specific strings for display purposes.
116
+ - E.g., when we search for a string we will highlight strings in the rows that match the search.
117
+
118
+ 4. **Filtering and Sorting:**
119
+ - Apply custom filters and sort criteria on the fly
120
+
121
+ 5. **Modes:**
122
+ - Default modes are supported so that a certain filter/search/sort can structure the data in a way that is easy to move between.
123
+
124
+
125
+ 6. **Options:**
126
+ - Along with returning the selected rows, the user can also return options.
127
+ - Input field with readline support
128
+ - Options select box
129
+
130
+ 7. **Colour themes:**
131
+ - Several colour themes are available
132
+
133
+ 8. **Copy rows:**
134
+ - 'y' to copy rows in various formats: CSV, TSV, python list
135
+ 9. **Save data:**
136
+ - Data can be saved so that it can be loaded with the -i flag.
137
+ - This is very helpful if your data generation takes a long time.
138
+ 10. **Customisable keybinds:**
139
+ - The list_picker application takes a key dictionary so that certain functions can easily be changed to a preferred keybind.
140
+ - Also allows the restriction of certain functions by not assigning a key.
141
+ 11. **Dynamic or manual refresh of data**:
142
+ - If a refresh_function is passed with auto_refresh=True then list_picker will automatically refresh the data.
143
+ - If a refresh_function is passed then one can also manually refresh by pressing f5.
144
+ 12. Notifications.
145
+ - Supports notifications upon certain events
146
+ 13. Visual options
147
+ - Display/hide title.
148
+ - Display/hide footer with selection information
149
+ - Display/hide columns
150
+ - Display/hide highlights
151
+ - Option to centre in cells, centre in terminal and centre rows vertically.
152
+
153
+ 14. Change settings on the fly.
154
+ - Press '~' to see list of display settings or press '`' to enter a command to change display settings.
155
+ - Change visual options
156
+ - Cycle through themes
157
+ - Centre data in cells or centre rows vertically
158
+ - Show/hide the footer
159
+ - Show/hide a specific column.
160
+ - Select a column
161
+ - Toggle auto-refresh
162
+ - Toggle highlights
163
+
164
+ 15. Pipe the data from the selected rows in the focussed column to a bash command ('|')
165
+ - By default when you press '|' it will fill the input field with `xargs -d '\n' -I {} `. You can remove this if you like (^U).
166
+ - If you add `notify-send {}` to this it will display notifications containing the data from the current column
167
+ - Useful for:
168
+ - Opening files with a specific application `xargs -d \n -I{} mpv {}` will open the files in mpv
169
+ - Dumping data. `xargs -d \n -I{} echo {} > ~/stuff.txt`
170
+
171
+ ## Overview
172
+
173
+ The application allows you to:
174
+ - Select multiple items from different file types and input streams
175
+ - Navigate between selected items with arrow keys
176
+ - Delete individual items
177
+ - Highlight specific items for quick selection
178
+ - Perform complex filtering operations
179
+ - Sort data based on specified columns
180
+ - Persistent save/load of selections
181
+ - Copy/paste selections to clipboard
182
+
183
+
184
+ ## Support and Feedback
185
+
186
+ Feel free to request features. Please report any errors you encounter with appropriate context.
@@ -0,0 +1,22 @@
1
+ list_picker/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
+ list_picker/list_picker_app.py,sha256=ekgg7dDsIS407Mo7_yZfJqhVpy4on-7Y_uV46n9aZWc,109661
3
+ list_picker/ui/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
+ list_picker/ui/help_screen.py,sha256=OJnTI8DI-H9UUTUjdKgvfj5dFXs866gfNESR2vpYkBs,5540
5
+ list_picker/ui/input_field.py,sha256=VdVjXmbUOYXsJu4byCZuzjdQ5_hw7fwFuDl_cjjnFk8,7165
6
+ list_picker/ui/keys.py,sha256=KzUZaYEA-axgL4Qf5jDZJDKXx6kKyaLezhiGFVu8aSg,12303
7
+ list_picker/ui/list_picker_colours.py,sha256=hOy7KFgGtLm13dYXWRdX3iymxgKk9CzgGyyaNOkTDRI,7668
8
+ list_picker/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
9
+ list_picker/utils/clipboard_operations.py,sha256=dlRVz3aOON6y7gjBy2eP5y3Tf7zVFalHpQ47GE219EI,1678
10
+ list_picker/utils/dump.py,sha256=oSoT8rTCAPxF5Sl4AwWpGrUztNKUXwOowCudW0Pj0yw,3299
11
+ list_picker/utils/filtering.py,sha256=ER2dHyFOgABE-aXbl7MbNM4fDWZe9dqkyexGBuWICHU,938
12
+ list_picker/utils/generate_data.py,sha256=TBeSLhB6O-UD0mQUMQSSUESoWOHYDXcX99ahbyUwfOo,2497
13
+ list_picker/utils/options_selectors.py,sha256=cFWz-7i4UzsTaelh6RyPv90-joeDw8TZqcDX0GdjXR8,2299
14
+ list_picker/utils/search_and_filter_utils.py,sha256=WUykgedUr9ZsRzCbS_u4bDOqvUwnx0bG7dgC3LSUATQ,2778
15
+ list_picker/utils/searching.py,sha256=dy-RWVOs1fFV6do0-G3k3unE6mtyyoUGEyJWZvudxRs,2809
16
+ list_picker/utils/sorting.py,sha256=4VmwExgXbDwc7Oe6jdsWbyGuXzFOG3QbmOvsVXHWmPs,4951
17
+ list_picker/utils/table_to_list_of_lists.py,sha256=TKllsvcyGlTBbR_nJBu7hY0cUw_PGoGYV-xFrbspRc8,7047
18
+ list_picker/utils/utils.py,sha256=euZYNGJiGViq84h8LGpaDO061IL9mFSINgSy6_yaqjc,9370
19
+ listpick-0.1.4.0.dist-info/METADATA,sha256=InM8DzyAV-NN3UNuOHaOI6n5pKOt_Shdfo-Jm5YYzCY,7126
20
+ listpick-0.1.4.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
21
+ listpick-0.1.4.0.dist-info/top_level.txt,sha256=HY8phc8kRMVcP4QE5WA2HmjFJ4kmDJ7N7-RNUKQCOnc,12
22
+ listpick-0.1.4.0.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (80.9.0)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1 @@
1
+ list_picker