mirror of
https://github.com/PR0M3TH3AN/SeedPass.git
synced 2025-09-09 15:58:48 +00:00
Remove embedded demos
This commit is contained in:
@@ -454,52 +454,3 @@ class EntryManager:
|
||||
logger.error(traceback.format_exc()) # Log full traceback
|
||||
print(colored(f"Error: Failed to list all entries: {e}", "red"))
|
||||
return
|
||||
|
||||
|
||||
# Example usage (this part should be removed or commented out when integrating into the larger application)
|
||||
if __name__ == "__main__":
|
||||
from password_manager.encryption import EncryptionManager
|
||||
from password_manager.vault import Vault
|
||||
|
||||
# Initialize EncryptionManager with a dummy key for demonstration purposes
|
||||
# Replace 'your-fernet-key' with your actual Fernet key
|
||||
try:
|
||||
dummy_key = Fernet.generate_key()
|
||||
encryption_manager = EncryptionManager(dummy_key, Path("."))
|
||||
vault = Vault(encryption_manager, Path("."))
|
||||
except Exception as e:
|
||||
logger.error(f"Failed to initialize EncryptionManager: {e}")
|
||||
print(colored(f"Error: Failed to initialize EncryptionManager: {e}", "red"))
|
||||
sys.exit(1)
|
||||
|
||||
# Initialize EntryManager
|
||||
try:
|
||||
entry_manager = EntryManager(vault, Path("."))
|
||||
except Exception as e:
|
||||
logger.error(f"Failed to initialize EntryManager: {e}")
|
||||
print(colored(f"Error: Failed to initialize EntryManager: {e}", "red"))
|
||||
sys.exit(1)
|
||||
|
||||
# Example operations
|
||||
# These would typically be triggered by user interactions, e.g., via a CLI menu
|
||||
# Uncomment and modify the following lines as needed for testing
|
||||
|
||||
# Adding an entry
|
||||
# entry_manager.add_entry("Example Website", 16, "user123", "https://example.com", False)
|
||||
|
||||
# Listing all entries
|
||||
# entry_manager.list_all_entries()
|
||||
|
||||
# Retrieving an entry
|
||||
# entry = entry_manager.retrieve_entry(0)
|
||||
# if entry:
|
||||
# print(entry)
|
||||
|
||||
# Modifying an entry
|
||||
# entry_manager.modify_entry(0, username="new_user123")
|
||||
|
||||
# Deleting an entry
|
||||
# entry_manager.delete_entry(0)
|
||||
|
||||
# Restoring from a backup
|
||||
# entry_manager.restore_from_backup("path_to_backup_file.json.enc")
|
||||
|
Reference in New Issue
Block a user