listpick 0.1.14.6__tar.gz → 0.1.14.7__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.
Files changed (59) hide show
  1. {listpick-0.1.14.6/src/listpick.egg-info → listpick-0.1.14.7}/PKG-INFO +1 -1
  2. {listpick-0.1.14.6 → listpick-0.1.14.7}/setup.py +1 -1
  3. {listpick-0.1.14.6 → listpick-0.1.14.7}/src/listpick/listpick_app.py +16 -7
  4. {listpick-0.1.14.6 → listpick-0.1.14.7/src/listpick.egg-info}/PKG-INFO +1 -1
  5. {listpick-0.1.14.6 → listpick-0.1.14.7}/src/listpick.egg-info/SOURCES.txt +1 -23
  6. listpick-0.1.14.6/.gitignore +0 -35
  7. listpick-0.1.14.6/CHANGELOG.md +0 -174
  8. listpick-0.1.14.6/TODO.md +0 -483
  9. listpick-0.1.14.6/assets/aria2tui_screenshot.png +0 -0
  10. listpick-0.1.14.6/assets/file_compare.png +0 -0
  11. listpick-0.1.14.6/assets/lpfman.png +0 -0
  12. listpick-0.1.14.6/examples/data_generation/list_files.toml +0 -23
  13. listpick-0.1.14.6/examples/data_generation/list_files_empty.toml +0 -22
  14. listpick-0.1.14.6/examples/data_generation/video_duplicates.toml +0 -36
  15. listpick-0.1.14.6/examples/data_generation/video_mediainfo.toml +0 -32
  16. listpick-0.1.14.6/examples/input_files/polynomials.tsv +0 -31
  17. listpick-0.1.14.6/examples/input_guides/gnuplot_graph.md +0 -13
  18. listpick-0.1.14.6/examples/picker/auxiallary_files/2024-25_Premier_League.pkl +0 -0
  19. listpick-0.1.14.6/examples/picker/footer_string_example.py +0 -30
  20. listpick-0.1.14.6/examples/picker/picker_example.py +0 -54
  21. listpick-0.1.14.6/examples/picker/template.py +0 -28
  22. listpick-0.1.14.6/examples/picker/wikipedia_table.py +0 -78
  23. listpick-0.1.14.6/listpick.py +0 -30
  24. listpick-0.1.14.6/requirements.txt +0 -13
  25. listpick-0.1.14.6/src/listpick/ui/git-bugreport-2025-08-16-1438.txt +0 -37
  26. listpick-0.1.14.6/tests/kitty_control.sh +0 -14
  27. listpick-0.1.14.6/tests/sorting_dates.csv +0 -8
  28. {listpick-0.1.14.6 → listpick-0.1.14.7}/LICENSE.txt +0 -0
  29. {listpick-0.1.14.6 → listpick-0.1.14.7}/README.md +0 -0
  30. {listpick-0.1.14.6 → listpick-0.1.14.7}/setup.cfg +0 -0
  31. {listpick-0.1.14.6 → listpick-0.1.14.7}/src/listpick/__init__.py +0 -0
  32. {listpick-0.1.14.6 → listpick-0.1.14.7}/src/listpick/__main__.py +0 -0
  33. {listpick-0.1.14.6 → listpick-0.1.14.7}/src/listpick/ui/__init__.py +0 -0
  34. {listpick-0.1.14.6 → listpick-0.1.14.7}/src/listpick/ui/build_help.py +0 -0
  35. {listpick-0.1.14.6 → listpick-0.1.14.7}/src/listpick/ui/footer.py +0 -0
  36. {listpick-0.1.14.6 → listpick-0.1.14.7}/src/listpick/ui/help_screen.py +0 -0
  37. {listpick-0.1.14.6 → listpick-0.1.14.7}/src/listpick/ui/input_field.py +0 -0
  38. {listpick-0.1.14.6 → listpick-0.1.14.7}/src/listpick/ui/keycodes.py +0 -0
  39. {listpick-0.1.14.6 → listpick-0.1.14.7}/src/listpick/ui/keys.py +0 -0
  40. {listpick-0.1.14.6 → listpick-0.1.14.7}/src/listpick/ui/pane_stuff.py +0 -0
  41. {listpick-0.1.14.6 → listpick-0.1.14.7}/src/listpick/ui/picker_colours.py +0 -0
  42. {listpick-0.1.14.6 → listpick-0.1.14.7}/src/listpick/utils/__init__.py +0 -0
  43. {listpick-0.1.14.6 → listpick-0.1.14.7}/src/listpick/utils/clipboard_operations.py +0 -0
  44. {listpick-0.1.14.6 → listpick-0.1.14.7}/src/listpick/utils/config.py +0 -0
  45. {listpick-0.1.14.6 → listpick-0.1.14.7}/src/listpick/utils/dump.py +0 -0
  46. {listpick-0.1.14.6 → listpick-0.1.14.7}/src/listpick/utils/filtering.py +0 -0
  47. {listpick-0.1.14.6 → listpick-0.1.14.7}/src/listpick/utils/generate_data.py +0 -0
  48. {listpick-0.1.14.6 → listpick-0.1.14.7}/src/listpick/utils/options_selectors.py +0 -0
  49. {listpick-0.1.14.6 → listpick-0.1.14.7}/src/listpick/utils/paste_operations.py +0 -0
  50. {listpick-0.1.14.6 → listpick-0.1.14.7}/src/listpick/utils/picker_log.py +0 -0
  51. {listpick-0.1.14.6 → listpick-0.1.14.7}/src/listpick/utils/search_and_filter_utils.py +0 -0
  52. {listpick-0.1.14.6 → listpick-0.1.14.7}/src/listpick/utils/searching.py +0 -0
  53. {listpick-0.1.14.6 → listpick-0.1.14.7}/src/listpick/utils/sorting.py +0 -0
  54. {listpick-0.1.14.6 → listpick-0.1.14.7}/src/listpick/utils/table_to_list_of_lists.py +0 -0
  55. {listpick-0.1.14.6 → listpick-0.1.14.7}/src/listpick/utils/utils.py +0 -0
  56. {listpick-0.1.14.6 → listpick-0.1.14.7}/src/listpick.egg-info/dependency_links.txt +0 -0
  57. {listpick-0.1.14.6 → listpick-0.1.14.7}/src/listpick.egg-info/entry_points.txt +0 -0
  58. {listpick-0.1.14.6 → listpick-0.1.14.7}/src/listpick.egg-info/requires.txt +0 -0
  59. {listpick-0.1.14.6 → listpick-0.1.14.7}/src/listpick.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: listpick
3
- Version: 0.1.14.6
3
+ Version: 0.1.14.7
4
4
  Summary: Listpick is a powerful TUI data tool for creating TUI apps or viewing/comparing tabulated data.
5
5
  Home-page: https://github.com/grimandgreedy/listpick
6
6
  Author: Grim
@@ -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.14.6",
19
+ version = "0.1.14.7",
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.",
@@ -352,9 +352,17 @@ class Picker:
352
352
  size += sys.getsizeof(getattr(self, attr_name))
353
353
  return size
354
354
 
355
- def set_config(self, path: str ="~/.config/listpick/config.toml"):
355
+ def set_config(self, path: str ="~/.config/listpick/config.toml") -> bool:
356
356
  """ Set config from toml file. """
357
- config = self.get_config(path)
357
+ path = os.path.expanduser(os.path.expandvars(path))
358
+ if not os.path.exists(path):
359
+ return False
360
+ try:
361
+ config = self.get_config(path)
362
+ except Exception as e:
363
+ self.logger.error(f"get_config({path}) load error. {e}")
364
+ return False
365
+
358
366
  self.logger.info(f"function: set_config()")
359
367
  if "general" in config:
360
368
  for key, val in config["general"].items():
@@ -363,16 +371,17 @@ class Picker:
363
371
  setattr(self, key, val)
364
372
  except Exception as e:
365
373
  self.logger.error(f"set_config: key={key}, val={val}. {e}")
374
+ return True
375
+
366
376
 
367
377
 
368
378
  def get_config(self, path: str ="~/.config/listpick/config.toml") -> dict:
369
379
  """ Get config from file. """
370
380
  self.logger.info(f"function: get_config()")
371
381
  import toml
372
- if os.path.exists(os.path.expanduser(path)):
373
- with open(os.path.expanduser(path), "r") as f:
374
- config = toml.load(f)
375
- return config
382
+ with open(os.path.expanduser(path), "r") as f:
383
+ config = toml.load(f)
384
+ return config
376
385
 
377
386
  def calculate_section_sizes(self):
378
387
  """
@@ -3684,7 +3693,7 @@ def main() -> None:
3684
3693
  app.load_input_history("~/.config/listpick/cmdhist.json")
3685
3694
  app.run()
3686
3695
 
3687
- app.save_input_history("~/.config/listpick/cmdhist.json")
3696
+ # app.save_input_history("~/.config/listpick/cmdhist.json")
3688
3697
  except Exception as e:
3689
3698
  print(e)
3690
3699
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: listpick
3
- Version: 0.1.14.6
3
+ Version: 0.1.14.7
4
4
  Summary: Listpick is a powerful TUI data tool for creating TUI apps or viewing/comparing tabulated data.
5
5
  Home-page: https://github.com/grimandgreedy/listpick
6
6
  Author: Grim
@@ -1,25 +1,6 @@
1
- .gitignore
2
- CHANGELOG.md
3
1
  LICENSE.txt
4
2
  README.md
5
- TODO.md
6
- listpick.py
7
- requirements.txt
8
3
  setup.py
9
- assets/aria2tui_screenshot.png
10
- assets/file_compare.png
11
- assets/lpfman.png
12
- examples/data_generation/list_files.toml
13
- examples/data_generation/list_files_empty.toml
14
- examples/data_generation/video_duplicates.toml
15
- examples/data_generation/video_mediainfo.toml
16
- examples/input_files/polynomials.tsv
17
- examples/input_guides/gnuplot_graph.md
18
- examples/picker/footer_string_example.py
19
- examples/picker/picker_example.py
20
- examples/picker/template.py
21
- examples/picker/wikipedia_table.py
22
- examples/picker/auxiallary_files/2024-25_Premier_League.pkl
23
4
  src/listpick/__init__.py
24
5
  src/listpick/__main__.py
25
6
  src/listpick/listpick_app.py
@@ -32,7 +13,6 @@ src/listpick.egg-info/top_level.txt
32
13
  src/listpick/ui/__init__.py
33
14
  src/listpick/ui/build_help.py
34
15
  src/listpick/ui/footer.py
35
- src/listpick/ui/git-bugreport-2025-08-16-1438.txt
36
16
  src/listpick/ui/help_screen.py
37
17
  src/listpick/ui/input_field.py
38
18
  src/listpick/ui/keycodes.py
@@ -52,6 +32,4 @@ src/listpick/utils/search_and_filter_utils.py
52
32
  src/listpick/utils/searching.py
53
33
  src/listpick/utils/sorting.py
54
34
  src/listpick/utils/table_to_list_of_lists.py
55
- src/listpick/utils/utils.py
56
- tests/kitty_control.sh
57
- tests/sorting_dates.csv
35
+ src/listpick/utils/utils.py
@@ -1,35 +0,0 @@
1
- aria2tui.toml
2
- data_stuff.py
3
- *.pyc
4
- oldcode.py
5
- .vscode
6
- ./.vscode
7
- tmp/
8
- ./list_picker/tmp/
9
- ./scripts
10
-
11
- # Compile stuff
12
- __pycache__/
13
- src/listpick/__pycache__
14
- src/listpick/utils/__pycache__/
15
- src/listpick/ui/__pycache__/
16
-
17
- # Distribution / packaging
18
- .Python
19
- build/
20
- develop-eggs/
21
- dist/
22
- downloads/
23
- eggs/
24
- .eggs/
25
- lib64/
26
- parts/
27
- sdist/
28
- var/
29
- wheels/
30
- share/python-wheels/
31
- *.egg-info/
32
- .installed.cfg
33
- *.egg
34
- MANIFEST
35
-
@@ -1,174 +0,0 @@
1
- # CHANGELOG.md
2
- Note that the changes between 0.1.11.0 and 1.1.12.0 are listed under 0.1.11
3
-
4
- ## [0.1.15] 2025-??-??
5
- - Added info screen to display all information on the running Picker.
6
- - Added keys for file_next and file_prev
7
- - Added __sizeof__() function for the Picker class.
8
- - Fixed rows resizing twice when opening/switching between some files.
9
- - Added to settings: goto row, goto column
10
- - NaN replaced with empty string when loading empty cells from xlsx or ods files.
11
- - Added Picker.get_config(path) method.
12
- - Can now take input on stdin -- e.g., `du -h | listpick --stdin`
13
- - We now get user input via '/dev/tty' rather than stdscr.getch() (which uses stdin).
14
- - This was necessary to ensure that we can pipe data in via stdin and still receive user input.
15
- - Bugs fixed:
16
- - Closing files causes issues switching between files.
17
- - Create ~/.config/listpick directory for storing input history if it doesn't already exist.
18
- - Added error checking when opening files.
19
- - Added --headerless flag to prevent interpreting the first line of the input as the header.
20
- - Fixed special keys not working:
21
- - arrow keys (main picker)
22
- - meta+key (input_field)
23
- - Added column number to footer
24
- - Improved splitting of whitespace separated data passed on stdin.
25
-
26
- ## [0.1.14] 2025-08-20
27
- - Fixed bug when cells are centred vertically.
28
- - Added "level" keyword for highlight dictionary.
29
- - l0: show highlight above base rows
30
- - l1: show highlight above selected cells/rows
31
- - l2: show highlight above cursor cell/row.
32
- - Added separate selected_column argument (distinct from sort_column) so that columns can be navigated without sorting on the selected column. 's' has to be pressed on the selected_column to trigger sorting.
33
- - Changed scrolling to start/end so that it selects the first/last column.
34
- - Bug fixes:
35
- - When data was centred vertically it would take an extra draw_screen loop to determine the proper column widths when the column sizes changed. This has been fixed.
36
- - Refreshing sorted data would resort it on the selected column rather than the sort column. Fixed.
37
- - Fixed error when padding uneven lists when a list of strings is passed instead of a list of lists.
38
- - Fixed crash when showing certain notifications. The notification message was not being split into lines properly.
39
- - Fixed wrong page number in the footer when paginate=True.
40
- - Added some extra options to the settings:
41
- - Toggle header
42
- - Toggle row header
43
- - Toggle modes
44
- - Add/insert blank row
45
- - Add/insert blank column
46
- - Added splash screen to picker which can be displayed when loading a large data set, for example.
47
- - Ensured that the curses colour pairs are redefined if we are loading from a picker save state.
48
- - Added functions to insert an empty row/column at an an arbitrary position in the picker items.
49
- - Adjusted the commandline arguments so that the filename can be passed without the -i flag.
50
- - If no input file type is specified on the command line it will now guess based on the input file's extension.
51
- - Improved display of cells/rows with various unicode characters. It is much better but there are still some problems with alignment and highlighting.
52
- - Setup logging for the Picker class. Currently still very basic but will track to the last function that was run before crash if the --debug flag is passed to the picker.
53
- - Added pin_cursor options which keeps the cursor on the same row during a refresh rather than tracking the id of the highlighted row.
54
- - Updated StandardFooter. Now shows information on two lines rather than three; all cursor and selection information on the first line and the sort information on the second. Cursor, Visual (de)selection now abreviated to C, VS, and VDS.
55
- - Added try-except wrapper to draw_screen function to prevent crashes during rapid resizing.
56
- - Speed improvements:
57
- - Create and track self.selected_cells_by_row when selections change rather than derive it from the self.cell_selections
58
- - Much faster with very large data sets as we need to determine selected_cells_by_row every time we run self.draw_screen()
59
- - We can now pipe data from cells in multiple columns to a command.
60
- - e.g., pipe two cols to gnuplot
61
- - Features added:
62
- - Listpick now supports multiple open files.
63
- - 'file_next' setting
64
- - Listpick now supports files with multiple sheets.
65
- - 'sheet_next' setting
66
- - Fixed error when opening xlsx files.
67
- - Can now open multiple files from the command line: listpick -i file1.csv, file2.csv
68
-
69
- ## [0.1.13] 2025-07-28
70
- - Cell-based picker is now supported.
71
- - Cell-wise navigation.
72
- - Cell-wise selection.
73
- - Cell-wise copying.
74
- - Cell-wise pasting.
75
- - Pasting cells a picker is now supported
76
- - Added footer_style class variable which can be given to select the footer style. Currently supports StandardFooter, CompactFooter, and NoFooter.
77
- - Fixed bug which showed a distorted footer when the footer string was one char longer than the width of the terminal.
78
- - Can now display a left-justified column indicating the row numbers (show_row_header)
79
- - Selecting column to the left or right now scrolls the selected column into view.
80
- - Input field autocompletion significantly improved.
81
- - Now shows popup list showing the next autocomplete suggestions
82
- - Supports auto-completing any words passed to the auto_complete_words argument of the input_field function
83
- - Search and filter autocomplete any words in the items of the picker by default.
84
- - Supports auto-complete functions %time and %date
85
- - Supports auto-complete formulae.
86
- - Will allow formulae filling at a later date.
87
- - Can now edit input_field string in nvim by pressing ctrl+x
88
- - Added functionality to add (empty) rows after the cursor and add (empty) columns after the cursor.
89
-
90
- ## [0.1.12] 2025-07-25
91
- - The Picker now supports different footer options. Three options have been added:
92
- - StandardFooter
93
- - CompactFooter
94
- - NoFooter
95
- - Added input field history for search and filter, pipe, settings, and opts.
96
- - Fixed instacrash when a terminal doesn't have 8bit colour support.
97
- - Created a fallback colour theme for terminals with < 256 colours available.
98
- - Fixed bug when scrollbar doesn't show with several thousand entries. Ensured it is always at least 1 character high.
99
- - Fixed colour configuration errors on some terminals by setting curses.use_default_colours().
100
- - Added save and load history functions.
101
- - Can now load full Picker from pickled save state.
102
- - Fixed size of option-picker dialogue.
103
- - Added the ability to add highlights from the settings input.
104
- - hl,.*,3,8: highlight field 3
105
- - Can now select theme with th# in settings; th still cycles as before.
106
-
107
- ## [0.1.11] 2025-07-13
108
- - Greatly improved the input_field
109
- - Implemented path auto-completion with tab/shift+tab
110
- - History can be passed to the input field
111
- - Implemented a kill-ring
112
- - Can paste into the input_field
113
- - Implemented more readline keybinds:
114
- - Alt+w: delete to word-separator character (' ' or '/')
115
- - Alt+f: forwards one word
116
- - Alt+b: backwards one word
117
- - Ctrl+g: exit
118
- - Ctrl+y: Yank from the top of the kill ring
119
- - Alt+y: Yank from the kill ring. As is typical, this only works after a yank.
120
- - Ctrl+n: Cycle forwards through history
121
- - Ctrl+p: Cycle backwards through history
122
- - Now accepts curses colour pair to set colours.
123
- - Fixed bug where searching with a lot of matches causes slow down.
124
- -
125
-
126
- ## [0.1.10] 2025-07-04
127
- - Help is now *built* (rather than simply displaying help text) using the active keys_dict and so only shows keys that function in the current Picker object.
128
-
129
- ## [0.1.9] 2025-07-04
130
- - Added asynchronous data refresh requests using threading.
131
-
132
- ## [0.1.8] 2025-07-03
133
- - Added left-right scrolling using h/l.
134
- - Scroll to home/end with H/L.
135
- - Fixed header columns not being aligned when len(header)>10.
136
-
137
- ## [0.1.7] 2025-07-02
138
- - Added row-wise highlighting.
139
- - Added MIT license information.
140
-
141
- ## [0.1.6] 2025-07-01
142
- - Fixed footer_string not displaying immediately if passed with a refresh function.
143
-
144
- ## [0.1.5] 2025-06-29
145
- - Renamed list_picker listpick.
146
- - Restructured project and added it to pypi so that it can be intalled with pip.
147
- - Modified dependencies so that the dependencies required for loading/saving--pandas, csv, openpyxl, etc.--are only installed with `python -m pip install listpick[full]`."
148
- - `python -m pip install listpick` will install all run-time dependencies outside of those used for saving data.
149
-
150
- ## [0.1.4] 2025-06-27
151
- - Added more themes: blue and purple.
152
- - Added an a key dict which will work well with data passed in to be edited--e.g., settings.
153
- - Column width is now determined by the width of the visible data rather than all data in the column.
154
- - Notifications and options-picker can be exited with escape.
155
-
156
- ## [0.1.3] 2025-06-19
157
- - Fixed bug where list_picker crashed when rapidly resizing terminal or rapidly changing font-size.
158
- - Fixed bug with filtering/searching where multiple tokens could not be specified for the same column.
159
- - Visual improvements:
160
- - Changed the footer colour to match the title bar in the main theme.
161
- - Right aligned the elements in the footer
162
- - Improved the appearance of the refresh indicator.
163
- - Pickle files can now be loaded from the command line in addition to being able to be loaded wile running the Picker.
164
-
165
- ## [0.1.2] 2025-06-18
166
- - Added the ability to edit current instance of Picker in ipython when Ctrl+e is pressed.
167
- - Quick-toggle footer with '_'.
168
-
169
- ## [0.1.1] 2025-06-18
170
- - Added a footer string function which can be auto refreshed with a given function.
171
-
172
- ## [0.1.0] 2025-06-17
173
- - CHANGELOG created
174
- - Converted the underlying Picker from a function into a class.