#!/usr/bin/python3 ## helper script to generate bitwarden json objects import datetime # json_base = '{ # "folders": [ # { # "id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # "name": "Folder Name" # }, # ... # ], # "items": [ # { # "passwordHistory": [ # { # "lastUsedDate": "YYYY-MM-00T00:00:00.000Z", # "password": "passwordValue" # } # ], # "revisionDate": "YYYY-MM-00T00:00:00.000Z", # "creationDate": "YYYY-MM-00T00:00:00.000Z", # "deletedDate": null, # "id": "yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy", # "organizationId": null, # "folderId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # "type": 1, # "reprompt": 0, # "name": "My Gmail Login", # "notes": "This is my gmail login for import.", # "favorite": false, # "fields": [ # { # "name": "custom-field-1", # "value": "custom-field-value", # "type": 0 # }, # ... # ], # "login": { # "uris": [ # { # "match": null, # "uri": "https://mail.google.com" # } # ], # "username": "myaccount@gmail.com", # "password": "myaccountpassword", # "totp": otpauth://totp/my-secret-key # }, # "collectionIds": null # }, # ... # ] # }' now = datetime.datetime.now() print(now)