dbbdata 1.0.1__tar.gz → 1.0.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: dbbdata
3
- Version: 1.0.1
3
+ Version: 1.0.2
4
4
  Summary: Odoo x DATEV. Jemand muss es ja tun.
5
5
  Author: DBB DATA Solutions GmbH
6
6
  License: MIT
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "dbbdata"
7
- version = "1.0.1"
7
+ version = "1.0.2"
8
8
  description = "Odoo x DATEV. Jemand muss es ja tun."
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.8"
@@ -0,0 +1,69 @@
1
+ """DBB DATA - Odoo x DATEV.
2
+
3
+ Jemand muss es ja tun.
4
+
5
+ Ein kleines Easter Egg: einfach importieren.
6
+
7
+ >>> import dbbdata
8
+ """
9
+
10
+ import os
11
+ import sys
12
+ import time
13
+
14
+ __version__ = "1.0.2"
15
+ __all__ = ["banner", "slogan"]
16
+
17
+ slogan = "Jemand muss es ja tun."
18
+
19
+ _LOGO = r"""
20
+ ██████ ██████ ██████
21
+ ██ ██ ██ ██ ██ ██
22
+ ██ ██ ██████ ██████
23
+ ██ ██ ██ ██ ██ ██
24
+ ██████ ██████ ██████ D A T A
25
+ """
26
+
27
+ _TASKS = ["mapping SKR04", "belege 14.327", "konformität"]
28
+
29
+
30
+ def _is_tty():
31
+ try:
32
+ return sys.stdout.isatty() and os.environ.get("TERM") != "dumb"
33
+ except Exception:
34
+ return False
35
+
36
+
37
+ def _progress(label, animate, width=12):
38
+ line = " [{bar}] {lbl:<16}{ok}"
39
+ if animate:
40
+ for i in range(width + 1):
41
+ bar = "#" * i + "." * (width - i)
42
+ sys.stdout.write("\r" + line.format(bar=bar, lbl=label, ok=""))
43
+ sys.stdout.flush()
44
+ time.sleep(0.025)
45
+ sys.stdout.write("\r" + line.format(bar="#" * width, lbl=label, ok="ok") + "\n")
46
+ else:
47
+ sys.stdout.write(line.format(bar="#" * width, lbl=label, ok="ok") + "\n")
48
+ sys.stdout.flush()
49
+
50
+
51
+ def banner():
52
+ """Zeigt das DBB-Logo, eine kurze Animation und die Kontaktdaten."""
53
+ animate = _is_tty()
54
+ print(_LOGO.strip("\n"))
55
+ print()
56
+ for task in _TASKS:
57
+ _progress(task, animate)
58
+ print()
59
+ print(" ODOO x DATEV")
60
+ print(" DATEV-Schnittstellen, FiBu & Lohn")
61
+ print()
62
+ print(" \u201e" + slogan + "\u201c")
63
+ print()
64
+ print(" https://dbbdata.de")
65
+ print()
66
+
67
+
68
+ # Easter Egg: beim Import automatisch anzeigen.
69
+ banner()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dbbdata
3
- Version: 1.0.1
3
+ Version: 1.0.2
4
4
  Summary: Odoo x DATEV. Jemand muss es ja tun.
5
5
  Author: DBB DATA Solutions GmbH
6
6
  License: MIT
@@ -1,89 +0,0 @@
1
- """DBB DATA – Odoo x DATEV.
2
-
3
- Jemand muss es ja tun.
4
-
5
- Ein kleines Easter Egg: einfach importieren.
6
-
7
- >>> import dbbdata
8
-
9
- Farben lassen sich mit der Umgebungsvariable NO_COLOR abschalten.
10
- """
11
-
12
- import os
13
- import sys
14
-
15
- __version__ = "1.0.1"
16
- __all__ = ["banner", "slogan"]
17
-
18
- slogan = "Jemand muss es ja tun."
19
-
20
-
21
- def _enable_windows_ansi():
22
- """Aktiviert ANSI-Farben in aelteren Windows-Terminals. True bei Erfolg."""
23
- try:
24
- import ctypes
25
-
26
- kernel32 = ctypes.windll.kernel32
27
- handle = kernel32.GetStdHandle(-11) # STD_OUTPUT_HANDLE
28
- mode = ctypes.c_uint32()
29
- if not kernel32.GetConsoleMode(handle, ctypes.byref(mode)):
30
- return False
31
- # ENABLE_VIRTUAL_TERMINAL_PROCESSING = 0x0004
32
- return bool(kernel32.SetConsoleMode(handle, mode.value | 0x0004))
33
- except Exception:
34
- return False
35
-
36
-
37
- def _supports_color():
38
- if os.environ.get("NO_COLOR") is not None:
39
- return False
40
- if not sys.stdout.isatty():
41
- return False
42
- if os.environ.get("TERM") == "dumb":
43
- return False
44
- if os.name == "nt":
45
- return _enable_windows_ansi()
46
- return True
47
-
48
-
49
- _USE_COLOR = _supports_color()
50
-
51
- _BLUE = "\033[38;5;33m" if _USE_COLOR else ""
52
- _DIM = "\033[2m" if _USE_COLOR else ""
53
- _BOLD = "\033[1m" if _USE_COLOR else ""
54
- _RESET = "\033[0m" if _USE_COLOR else ""
55
-
56
- _FINGERPRINT = r"""
57
- .-==========-.
58
- .-' ____ '-.
59
- .' .-' '-. '.
60
- / .' ___ '. \
61
- / / .' '. \ \
62
- | | | .-. | | |
63
- | | | '-' | | |
64
- | | '. .' | |
65
- \ \ '-' / /
66
- \ '. .' /
67
- '. '-.__.-' .'
68
- '-. .-'
69
- '-======-'
70
- """
71
-
72
-
73
- def banner():
74
- """Gibt den Fingerabdruck, den Slogan und die Kontaktdaten aus."""
75
- lines = _FINGERPRINT.strip("\n").splitlines()
76
- fp = "\n".join(_BLUE + ln + _RESET for ln in lines)
77
- print(fp)
78
- print()
79
- print(f" {_BOLD}{_BLUE}DBB DATA{_RESET} {_DIM}ODOO x DATEV{_RESET}")
80
- print(f" {_DIM}DATEV-Schnittstellen, FiBu & Lohn{_RESET}")
81
- print()
82
- print(f" \u201e{slogan}\u201c")
83
- print()
84
- print(f" {_BLUE}https://dbbdata.de{_RESET}")
85
- print()
86
-
87
-
88
- # Easter Egg: beim Import automatisch anzeigen.
89
- banner()
File without changes
File without changes
File without changes