tedit 2.7.0__tar.gz → 2.7.2__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: tedit
3
- Version: 2.7.0
3
+ Version: 2.7.2
4
4
  Summary: TE: a cross-platform terminal text editor with mouse support and syntax highlighting
5
5
  Project-URL: Homepage, https://github.com/alby13/TE-Text-Editor
6
6
  Author-email: alby13 <alby13@singularityon.com>
@@ -2,12 +2,9 @@
2
2
  requires = ["hatchling"]
3
3
  build-backend = "hatchling.build"
4
4
 
5
- [tool.hatch.build]
6
- packages = ["src/tedit"]
7
-
8
5
  [project]
9
6
  name = "tedit"
10
- version = "2.7.0" # must be > 0.9.1
7
+ version = "2.7.2" # must be > 0.9.1
11
8
  description = "TE: a cross-platform terminal text editor with mouse support and syntax highlighting"
12
9
  readme = "README.md"
13
10
  requires-python = ">=3.9"
@@ -26,4 +23,11 @@ dependencies = [
26
23
  ]
27
24
 
28
25
  [project.urls]
29
- Homepage = "https://github.com/alby13/TE-Text-Editor"
26
+ Homepage = "https://github.com/alby13/TE-Text-Editor"
27
+
28
+ [project.scripts]
29
+ tedit = "tedit:cli"
30
+ te = "tedit:cli"
31
+
32
+ [tool.hatch.build.targets.wheel]
33
+ packages = ["src/tedit"]
@@ -7,7 +7,7 @@ import os
7
7
  import sys
8
8
  import copy
9
9
  import time
10
- import pyperclip
10
+ import pyperclip
11
11
  from pygments import highlight, lex
12
12
  from pygments.lexers import get_lexer_by_name, guess_lexer_for_filename
13
13
  from pygments.formatter import Formatter
@@ -2218,7 +2218,6 @@ class TextEditor:
2218
2218
  def main(stdscr):
2219
2219
  curses.start_color()
2220
2220
  # Redefine COLOR_BLACK to true black using curses's own color API
2221
- # RGB values are 0-1000 in curses, so 0,0,0 = true black
2222
2221
  if curses.can_change_color():
2223
2222
  curses.init_color(0, 0, 0, 0) # redefine index 0 = true black
2224
2223
  curses.init_color(8, 47, 47, 47) # index 8 = gray (50% RGB)
@@ -2234,7 +2233,8 @@ def main(stdscr):
2234
2233
  traceback.print_exc()
2235
2234
  input("Press Enter to continue...")
2236
2235
 
2237
- if __name__ == "__main__":
2236
+ def cli():
2237
+ """Entry point for `te` and `tedit` commands."""
2238
2238
  try:
2239
2239
  curses.wrapper(main)
2240
2240
  except curses.error as e:
@@ -2243,4 +2243,8 @@ if __name__ == "__main__":
2243
2243
  except Exception as e:
2244
2244
  print(f"A fatal error occurred: {e}")
2245
2245
  import traceback
2246
- traceback.print_exc()
2246
+ traceback.print_exc()
2247
+ input("Press Enter to continue...")
2248
+
2249
+ if __name__ == "__main__":
2250
+ cli() # calling the wrapper
File without changes
File without changes
File without changes