mirror of
https://github.com/PR0M3TH3AN/SeedPass.git
synced 2025-09-07 14:58:56 +00:00
Merge pull request #25 from PR0M3TH3AN/codex/push-backup-to-nostr-after-adding-entry
Backup to nostr after entry
This commit is contained in:
@@ -736,11 +736,25 @@ class PasswordManager:
|
||||
# Provide user feedback
|
||||
print(
|
||||
colored(
|
||||
f"\n[+] Password generated and indexed with ID {index}.\n", "green"
|
||||
f"\n[+] Password generated and indexed with ID {index}.\n",
|
||||
"green",
|
||||
)
|
||||
)
|
||||
print(colored(f"Password for {website_name}: {password}\n", "yellow"))
|
||||
|
||||
# Automatically push the updated encrypted index to Nostr so the
|
||||
# latest changes are backed up remotely.
|
||||
try:
|
||||
encrypted_data = self.get_encrypted_data()
|
||||
if encrypted_data:
|
||||
self.nostr_client.publish_json_to_nostr(encrypted_data)
|
||||
logging.info(
|
||||
"Encrypted index posted to Nostr after entry addition."
|
||||
)
|
||||
except Exception as nostr_error:
|
||||
logging.error(f"Failed to post updated index to Nostr: {nostr_error}")
|
||||
logging.error(traceback.format_exc())
|
||||
|
||||
except Exception as e:
|
||||
logging.error(f"Error during password generation: {e}")
|
||||
logging.error(traceback.format_exc())
|
||||
|
Reference in New Issue
Block a user