listpick 0.1.16.1__tar.gz → 0.1.16.4__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.
Potentially problematic release.
This version of listpick might be problematic. Click here for more details.
- {listpick-0.1.16.1 → listpick-0.1.16.4}/CHANGELOG.md +9 -0
- {listpick-0.1.16.1/src/listpick.egg-info → listpick-0.1.16.4}/PKG-INFO +1 -1
- {listpick-0.1.16.1 → listpick-0.1.16.4}/TODO.md +6 -0
- {listpick-0.1.16.1 → listpick-0.1.16.4}/setup.py +1 -1
- {listpick-0.1.16.1 → listpick-0.1.16.4}/src/listpick/listpick_app.py +1 -0
- {listpick-0.1.16.1 → listpick-0.1.16.4}/src/listpick/ui/footer.py +3 -3
- {listpick-0.1.16.1 → listpick-0.1.16.4}/src/listpick/utils/generate_data.py +8 -1
- {listpick-0.1.16.1 → listpick-0.1.16.4}/src/listpick/utils/generate_data_multithreaded.py +8 -1
- {listpick-0.1.16.1 → listpick-0.1.16.4}/src/listpick/utils/utils.py +2 -3
- {listpick-0.1.16.1 → listpick-0.1.16.4/src/listpick.egg-info}/PKG-INFO +1 -1
- {listpick-0.1.16.1 → listpick-0.1.16.4}/.gitignore +0 -0
- {listpick-0.1.16.1 → listpick-0.1.16.4}/LICENSE.txt +0 -0
- {listpick-0.1.16.1 → listpick-0.1.16.4}/README.md +0 -0
- {listpick-0.1.16.1 → listpick-0.1.16.4}/assets/aria2tui_screenshot.png +0 -0
- {listpick-0.1.16.1 → listpick-0.1.16.4}/assets/file_compare.png +0 -0
- {listpick-0.1.16.1 → listpick-0.1.16.4}/assets/lpfman.png +0 -0
- {listpick-0.1.16.1 → listpick-0.1.16.4}/examples/data_generation/list_files.toml +0 -0
- {listpick-0.1.16.1 → listpick-0.1.16.4}/examples/data_generation/list_files_empty.toml +0 -0
- {listpick-0.1.16.1 → listpick-0.1.16.4}/examples/data_generation/video_duplicates.toml +0 -0
- {listpick-0.1.16.1 → listpick-0.1.16.4}/examples/data_generation/video_mediainfo.toml +0 -0
- {listpick-0.1.16.1 → listpick-0.1.16.4}/examples/input_files/polynomials.tsv +0 -0
- {listpick-0.1.16.1 → listpick-0.1.16.4}/examples/input_guides/gnuplot_graph.md +0 -0
- {listpick-0.1.16.1 → listpick-0.1.16.4}/examples/picker/auxiallary_files/2024-25_Premier_League.pkl +0 -0
- {listpick-0.1.16.1 → listpick-0.1.16.4}/examples/picker/footer_string_example.py +0 -0
- {listpick-0.1.16.1 → listpick-0.1.16.4}/examples/picker/picker_example.py +0 -0
- {listpick-0.1.16.1 → listpick-0.1.16.4}/examples/picker/template.py +0 -0
- {listpick-0.1.16.1 → listpick-0.1.16.4}/examples/picker/wikipedia_table.py +0 -0
- {listpick-0.1.16.1 → listpick-0.1.16.4}/listpick.py +0 -0
- {listpick-0.1.16.1 → listpick-0.1.16.4}/requirements.txt +0 -0
- {listpick-0.1.16.1 → listpick-0.1.16.4}/setup.cfg +0 -0
- {listpick-0.1.16.1 → listpick-0.1.16.4}/src/listpick/__init__.py +0 -0
- {listpick-0.1.16.1 → listpick-0.1.16.4}/src/listpick/__main__.py +0 -0
- {listpick-0.1.16.1 → listpick-0.1.16.4}/src/listpick/pane/__init__.py +0 -0
- {listpick-0.1.16.1 → listpick-0.1.16.4}/src/listpick/pane/get_data.py +0 -0
- {listpick-0.1.16.1 → listpick-0.1.16.4}/src/listpick/pane/pane_functions.py +0 -0
- {listpick-0.1.16.1 → listpick-0.1.16.4}/src/listpick/pane/pane_utils.py +0 -0
- {listpick-0.1.16.1 → listpick-0.1.16.4}/src/listpick/ui/__init__.py +0 -0
- {listpick-0.1.16.1 → listpick-0.1.16.4}/src/listpick/ui/build_help.py +0 -0
- {listpick-0.1.16.1 → listpick-0.1.16.4}/src/listpick/ui/help_screen.py +0 -0
- {listpick-0.1.16.1 → listpick-0.1.16.4}/src/listpick/ui/input_field.py +0 -0
- {listpick-0.1.16.1 → listpick-0.1.16.4}/src/listpick/ui/keys.py +0 -0
- {listpick-0.1.16.1 → listpick-0.1.16.4}/src/listpick/ui/picker_colours.py +0 -0
- {listpick-0.1.16.1 → listpick-0.1.16.4}/src/listpick/utils/__init__.py +0 -0
- {listpick-0.1.16.1 → listpick-0.1.16.4}/src/listpick/utils/clipboard_operations.py +0 -0
- {listpick-0.1.16.1 → listpick-0.1.16.4}/src/listpick/utils/config.py +0 -0
- {listpick-0.1.16.1 → listpick-0.1.16.4}/src/listpick/utils/dump.py +0 -0
- {listpick-0.1.16.1 → listpick-0.1.16.4}/src/listpick/utils/filtering.py +0 -0
- {listpick-0.1.16.1 → listpick-0.1.16.4}/src/listpick/utils/graphing.py +0 -0
- {listpick-0.1.16.1 → listpick-0.1.16.4}/src/listpick/utils/keycodes.py +0 -0
- {listpick-0.1.16.1 → listpick-0.1.16.4}/src/listpick/utils/options_selectors.py +0 -0
- {listpick-0.1.16.1 → listpick-0.1.16.4}/src/listpick/utils/paste_operations.py +0 -0
- {listpick-0.1.16.1 → listpick-0.1.16.4}/src/listpick/utils/picker_log.py +0 -0
- {listpick-0.1.16.1 → listpick-0.1.16.4}/src/listpick/utils/search_and_filter_utils.py +0 -0
- {listpick-0.1.16.1 → listpick-0.1.16.4}/src/listpick/utils/searching.py +0 -0
- {listpick-0.1.16.1 → listpick-0.1.16.4}/src/listpick/utils/sorting.py +0 -0
- {listpick-0.1.16.1 → listpick-0.1.16.4}/src/listpick/utils/table_to_list_of_lists.py +0 -0
- {listpick-0.1.16.1 → listpick-0.1.16.4}/src/listpick/utils/user_input.py +0 -0
- {listpick-0.1.16.1 → listpick-0.1.16.4}/src/listpick.egg-info/SOURCES.txt +0 -0
- {listpick-0.1.16.1 → listpick-0.1.16.4}/src/listpick.egg-info/dependency_links.txt +0 -0
- {listpick-0.1.16.1 → listpick-0.1.16.4}/src/listpick.egg-info/entry_points.txt +0 -0
- {listpick-0.1.16.1 → listpick-0.1.16.4}/src/listpick.egg-info/requires.txt +0 -0
- {listpick-0.1.16.1 → listpick-0.1.16.4}/src/listpick.egg-info/top_level.txt +0 -0
- {listpick-0.1.16.1 → listpick-0.1.16.4}/tests/kitty_control.sh +0 -0
- {listpick-0.1.16.1 → listpick-0.1.16.4}/tests/sorting_dates.csv +0 -0
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
# CHANGELOG.md
|
|
2
2
|
Note that the changes between 0.1.11.0 and 1.1.12.0 are listed under 0.1.11
|
|
3
3
|
|
|
4
|
+
## [0.1.16.4] 2025-09-09
|
|
5
|
+
- Commands passed to generate_picker_data can now use multiple {} and each will be replaced by the filename
|
|
6
|
+
- E.g., `[[ -f {} ]] && du -h {}`
|
|
7
|
+
- Improved the handling of filenames when opening files and generating column-data for files.
|
|
8
|
+
- Hide header in notifications.
|
|
9
|
+
|
|
10
|
+
## [0.1.16.2] 2025-09-07
|
|
11
|
+
- Fixed some f-strings with nested quotes.
|
|
12
|
+
|
|
4
13
|
## [0.1.16.1] 2025-09-07
|
|
5
14
|
- Massive improvements to Picker data generation.
|
|
6
15
|
- Data generation is now multithreaded.
|
|
@@ -34,6 +34,12 @@
|
|
|
34
34
|
> - [ ] The selected column can be a hidden column
|
|
35
35
|
> - [ ] Hide all columns and toggle cell cursor mode. >> Hangs
|
|
36
36
|
> - [ ] Toggle last visible column in cell cursor mode. >> Hangs
|
|
37
|
+
> - [ ] Data generation
|
|
38
|
+
> - [ ] Changing directories in lpfman before all cells have loaded throws errors as threads try to operate on files that aren't in the new directory
|
|
39
|
+
> - [ ] Need to terminate threads when Picker.run() exits.
|
|
40
|
+
> - [ ] Keep track of running threads and tasks to do.
|
|
41
|
+
> - [ ] Go to a loading directory > filter > move down the entries. We are brought back to the top.
|
|
42
|
+
> - [ ] Probably due to calling Picker.initialise_variables() when we get new data.
|
|
37
43
|
|
|
38
44
|
|
|
39
45
|
|
|
@@ -16,7 +16,7 @@ with open("README.md", "r", encoding = "utf-8") as fh:
|
|
|
16
16
|
|
|
17
17
|
setuptools.setup(
|
|
18
18
|
name = "listpick",
|
|
19
|
-
version = "0.1.16.
|
|
19
|
+
version = "0.1.16.4",
|
|
20
20
|
author = "Grim",
|
|
21
21
|
author_email = "grimandgreedy@protonmail.com",
|
|
22
22
|
description = "Listpick is a powerful TUI data tool for creating TUI apps or viewing/comparing tabulated data.",
|
|
@@ -160,7 +160,7 @@ class StandardFooter(Footer):
|
|
|
160
160
|
if state["footer_string"]:
|
|
161
161
|
footer_string_width = min(w-1, len(state["footer_string"])+2)
|
|
162
162
|
|
|
163
|
-
disp_string = f"{state[
|
|
163
|
+
disp_string = f"{state['footer_string'][:footer_string_width]}"
|
|
164
164
|
disp_string = f" {disp_string:>{footer_string_width-2}} "
|
|
165
165
|
self.stdscr.addstr(self.footer_string_y, w-footer_string_width-1, " "*footer_string_width, curses.color_pair(self.colours_start+24))
|
|
166
166
|
self.stdscr.addstr(self.footer_string_y, w-footer_string_width-1, f"{disp_string}", curses.color_pair(self.colours_start+24))
|
|
@@ -259,7 +259,7 @@ class CompactFooter(Footer):
|
|
|
259
259
|
if state["footer_string"]:
|
|
260
260
|
footer_string_width = min(w-1, len(state["footer_string"])+2)
|
|
261
261
|
|
|
262
|
-
disp_string = f"{state[
|
|
262
|
+
disp_string = f"{state['footer_string'][:footer_string_width]}"
|
|
263
263
|
disp_string = f" {disp_string:>{footer_string_width-2}} "
|
|
264
264
|
self.stdscr.addstr(h - 1, w-footer_string_width-1, " "*footer_string_width, curses.color_pair(self.colours_start+24))
|
|
265
265
|
self.stdscr.addstr(h - 1, w-footer_string_width-1, f"{disp_string}", curses.color_pair(self.colours_start+24))
|
|
@@ -318,7 +318,7 @@ class NoFooter(Footer):
|
|
|
318
318
|
|
|
319
319
|
if state["footer_string"]:
|
|
320
320
|
footer_string_width = min(w-1, len(state["footer_string"])+2)
|
|
321
|
-
disp_string = f"{state[
|
|
321
|
+
disp_string = f"{state['footer_string'][:footer_string_width]}"
|
|
322
322
|
disp_string = f" {disp_string:>{footer_string_width-2}} "
|
|
323
323
|
self.stdscr.addstr(h - 1, w-footer_string_width-1, " "*footer_string_width, curses.color_pair(self.colours_start+24))
|
|
324
324
|
self.stdscr.addstr(h - 1, w-footer_string_width-1, f"{disp_string}", curses.color_pair(self.colours_start+24))
|
|
@@ -16,6 +16,7 @@ import logging
|
|
|
16
16
|
|
|
17
17
|
logger = logging.getLogger('picker_log')
|
|
18
18
|
import concurrent.futures
|
|
19
|
+
import re
|
|
19
20
|
|
|
20
21
|
def generate_columns(funcs: list, files: list) -> list[list[str]]:
|
|
21
22
|
"""
|
|
@@ -79,7 +80,7 @@ def command_to_func(command: str) -> Callable:
|
|
|
79
80
|
"""
|
|
80
81
|
logger.info("function: command_to_func (generate_data.py)")
|
|
81
82
|
|
|
82
|
-
func = lambda arg: subprocess.run(command
|
|
83
|
+
func = lambda arg: subprocess.run(replace_braces(command, repr(arg)), shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE).stdout.decode("utf-8").strip()
|
|
83
84
|
return func
|
|
84
85
|
|
|
85
86
|
def load_environment(envs:dict):
|
|
@@ -91,6 +92,12 @@ def load_environment(envs:dict):
|
|
|
91
92
|
if "cwd" in envs:
|
|
92
93
|
os.chdir(os.path.expandvars(os.path.expanduser(envs["cwd"])))
|
|
93
94
|
|
|
95
|
+
def replace_braces(text, s):
|
|
96
|
+
text = re.sub(r'\{\{(.*?)\}\}', r'@@\1@@', text)
|
|
97
|
+
text = re.sub(r'\{\}', s, text)
|
|
98
|
+
text = re.sub(r'@@(.*?)@@', r'{{\1}}', text)
|
|
99
|
+
return text
|
|
100
|
+
|
|
94
101
|
|
|
95
102
|
def read_toml(file_path) -> Tuple[dict, list, list]:
|
|
96
103
|
"""
|
|
@@ -25,6 +25,8 @@ import logging
|
|
|
25
25
|
import threading
|
|
26
26
|
from queue import PriorityQueue
|
|
27
27
|
import time
|
|
28
|
+
import re
|
|
29
|
+
import shlex
|
|
28
30
|
|
|
29
31
|
logger = logging.getLogger('picker_log')
|
|
30
32
|
|
|
@@ -84,7 +86,7 @@ def command_to_func(command: str) -> Callable:
|
|
|
84
86
|
"""
|
|
85
87
|
logger.info("function: command_to_func (generate_data.py)")
|
|
86
88
|
|
|
87
|
-
func = lambda arg: subprocess.run(command
|
|
89
|
+
func = lambda arg: subprocess.run(replace_braces(command, arg), shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE).stdout.decode("utf-8").strip()
|
|
88
90
|
return func
|
|
89
91
|
|
|
90
92
|
def load_environment(envs:dict):
|
|
@@ -96,6 +98,11 @@ def load_environment(envs:dict):
|
|
|
96
98
|
if "cwd" in envs:
|
|
97
99
|
os.chdir(os.path.expandvars(os.path.expanduser(envs["cwd"])))
|
|
98
100
|
|
|
101
|
+
def replace_braces(text, s):
|
|
102
|
+
text = re.sub(r'\{\{(.*?)\}\}', r'@@\1@@', text)
|
|
103
|
+
text = re.sub(r'\{\}', shlex.quote(s), text)
|
|
104
|
+
text = re.sub(r'@@(.*?)@@', r'{{\1}}', text)
|
|
105
|
+
return text
|
|
99
106
|
|
|
100
107
|
def read_toml(file_path) -> Tuple[dict, list, list]:
|
|
101
108
|
"""
|
|
@@ -14,6 +14,7 @@ import tempfile
|
|
|
14
14
|
import os
|
|
15
15
|
from typing import Tuple, Dict
|
|
16
16
|
import logging
|
|
17
|
+
import shlex
|
|
17
18
|
|
|
18
19
|
logger = logging.getLogger('picker_log')
|
|
19
20
|
|
|
@@ -290,9 +291,7 @@ def openFiles(files: list[str]) -> str:
|
|
|
290
291
|
apps[app] = [t]
|
|
291
292
|
|
|
292
293
|
return apps
|
|
293
|
-
for
|
|
294
|
-
if ' ' in files[i] and files[i][0] not in ["'", '"']:
|
|
295
|
-
files[i] = repr(files[i])
|
|
294
|
+
files = [shlex.quote(file) for file in files]
|
|
296
295
|
|
|
297
296
|
types = get_mime_types(files)
|
|
298
297
|
apps = get_applications(types.keys())
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{listpick-0.1.16.1 → listpick-0.1.16.4}/examples/picker/auxiallary_files/2024-25_Premier_League.pkl
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|