mirror of
https://github.com/PR0M3TH3AN/SeedPass.git
synced 2025-09-09 15:58:48 +00:00
Merge pull request #213 from PR0M3TH3AN/codex/add-pyperclip-to-requirements-and-update-cli
Add clipboard copy to totp command
This commit is contained in:
@@ -42,6 +42,7 @@ pycoin==0.92.20241201
|
|||||||
pycparser==2.22
|
pycparser==2.22
|
||||||
pycryptodome==3.23.0
|
pycryptodome==3.23.0
|
||||||
pycryptodomex==3.23.0
|
pycryptodomex==3.23.0
|
||||||
|
pyperclip==1.9.0
|
||||||
Pygments==2.19.2
|
Pygments==2.19.2
|
||||||
PyNaCl==1.5.0
|
PyNaCl==1.5.0
|
||||||
PySocks==1.7.1
|
PySocks==1.7.1
|
||||||
|
@@ -809,6 +809,7 @@ def main(argv: list[str] | None = None) -> int:
|
|||||||
print(code)
|
print(code)
|
||||||
try:
|
try:
|
||||||
pyperclip.copy(code)
|
pyperclip.copy(code)
|
||||||
|
print(colored("Code copied to clipboard", "green"))
|
||||||
except Exception as exc:
|
except Exception as exc:
|
||||||
logging.warning(f"Clipboard copy failed: {exc}")
|
logging.warning(f"Clipboard copy failed: {exc}")
|
||||||
return 0
|
return 0
|
||||||
|
@@ -63,4 +63,5 @@ def test_totp_command(monkeypatch, capsys):
|
|||||||
assert rc == 0
|
assert rc == 0
|
||||||
out = capsys.readouterr().out
|
out = capsys.readouterr().out
|
||||||
assert "123456" in out
|
assert "123456" in out
|
||||||
|
assert "copied to clipboard" in out.lower()
|
||||||
assert called.get("val") == "123456"
|
assert called.get("val") == "123456"
|
||||||
|
Reference in New Issue
Block a user