opvault.js/Untitled.ipynb
2021-10-26 20:48:58 -04:00

281 lines
7.8 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{
"cells": [
{
"cell_type": "code",
"execution_count": 2,
"id": "aa8a7fc4",
"metadata": {},
"outputs": [],
"source": [
"import fs from \"fs\";\n",
"import { resolve } from \"path\";"
]
},
{
"cell_type": "code",
"execution_count": 3,
"id": "d909c03d",
"metadata": {},
"outputs": [],
"source": [
"import { OnePassword } from \"./src/index\";"
]
},
{
"cell_type": "code",
"execution_count": 9,
"id": "56b32a8e-af25-4356-8e13-ba8ca840f986",
"metadata": {},
"outputs": [],
"source": [
"const instance = new OnePassword({ path: \"./freddy-2013-12-04.opvault\" });\n",
"const vault = await instance.getProfile(\"default\");\n",
"await vault.unlock(\"freddy\");\n",
"void 0;"
]
},
{
"cell_type": "code",
"execution_count": 8,
"id": "6c940edd-e225-4397-a92f-4fa8927854ab",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"[\n",
" { ps: 0 },\n",
" {\n",
" title: 'Personal',\n",
" ainfo: 'Wendy Appleseed',\n",
" tags: [ 'Sample', 'Personal' ],\n",
" ps: 0\n",
" },\n",
" {\n",
" title: 'Hulu',\n",
" URLs: [ [Object] ],\n",
" ainfo: 'wendy@appleseed.com',\n",
" url: 'http://www.hulu.com/',\n",
" tags: [ 'Sample' ],\n",
" ps: 66\n",
" },\n",
" {\n",
" title: \"Wendy's driver's license\",\n",
" ps: 0,\n",
" ainfo: 'D6101-40706-60905'\n",
" },\n",
" { title: 'Orders', ainfo: '10.0.1.50', tags: [ 'Sample' ], ps: 0 },\n",
" {\n",
" URLs: [ [Object] ],\n",
" tags: [ 'Sample' ],\n",
" title: 'Skype',\n",
" url: 'https://secure.skype.com/account/login?message=login_required',\n",
" ainfo: 'WendyAppleseed',\n",
" ps: 78\n",
" },\n",
" {\n",
" title: 'YouTube',\n",
" URLs: [ [Object] ],\n",
" ainfo: 'wendy@appleseed.com',\n",
" url: 'http://www.youtube.com/login?next=/index',\n",
" tags: [ 'Sample' ],\n",
" ps: 78\n",
" },\n",
" { title: 'example.com', ps: 0, ainfo: 'wappleseed' },\n",
" {\n",
" title: 'Dropbox',\n",
" URLs: [ [Object] ],\n",
" ainfo: 'wendy@appleseed.com',\n",
" url: 'https://www.getdropbox.com/',\n",
" tags: [ 'Sample' ],\n",
" ps: 78\n",
" },\n",
" {\n",
" title: \"Company's FTP\",\n",
" URLs: [ [Object] ],\n",
" ainfo: 'admin',\n",
" url: 'ftp://ftp.dreamhost.com',\n",
" tags: [ 'Sample' ],\n",
" ps: 60\n",
" },\n",
" {\n",
" title: 'Tumblr',\n",
" URLs: [ [Object] ],\n",
" ainfo: 'wendy@appleseed.com',\n",
" url: 'http://www.tumblr.com/login',\n",
" tags: [ 'Sample' ],\n",
" ps: 48\n",
" },\n",
" { title: 'Social Security', ps: 0, ainfo: 'Wendy Appleseed' },\n",
" {\n",
" title: 'Last.fm',\n",
" URLs: [ [Object] ],\n",
" ainfo: 'WendyAppleseed',\n",
" url: 'https://www.last.fm/login',\n",
" tags: [ 'Sample' ],\n",
" ps: 72\n",
" },\n",
" { title: 'Tim Hortons', ps: 0, ainfo: 'Tim Hortens' },\n",
" { title: 'Snipe Hunting License', ps: 0, ainfo: 'Wendy Appleseed' },\n",
" {\n",
" title: 'A note to Trash',\n",
" ainfo: 'Lets create a note that we will throw in the trash but not expunge.',\n",
" ps: 0\n",
" },\n",
" {\n",
" title: 'CapitalOne MasterCard ***3456',\n",
" ainfo: '1234 *********** 3456',\n",
" tags: [ 'Sample' ],\n",
" ps: 0\n",
" },\n",
" {\n",
" title: 'What is a Secure Note?',\n",
" ainfo: '',\n",
" tags: [ 'Sample' ],\n",
" ps: 0\n",
" },\n",
" {\n",
" title: 'The Unofficial Apple Weblog',\n",
" URLs: [ [Object] ],\n",
" ainfo: 'WendyAppleseed',\n",
" url: 'http://www.tuaw.com',\n",
" tags: [ 'Sample' ],\n",
" ps: 78\n",
" },\n",
" { title: \"Wendy's passport\", ps: 0, ainfo: 'ZZ200000' },\n",
" {\n",
" title: 'Chase VISA ***4356',\n",
" ainfo: '1234 *********** 4356',\n",
" tags: [ 'Sample' ],\n",
" ps: 0\n",
" },\n",
" {\n",
" title: 'Bank of America',\n",
" URLs: [ [Object] ],\n",
" ainfo: 'WendyAppleseed',\n",
" url: 'https://www.bankofamerica.com/',\n",
" tags: [ 'Sample', 'Personal' ],\n",
" ps: 66\n",
" },\n",
" {\n",
" title: 'A note with some attachments',\n",
" ps: 0,\n",
" ainfo: 'This note has two attachments.'\n",
" },\n",
" { title: '1Password', ainfo: '3.0', tags: [ 'Sample' ], ps: 0 },\n",
" { title: 'TextExpander', ainfo: '1.3', tags: [ 'Sample' ], ps: 0 },\n",
" {\n",
" title: 'Business',\n",
" ainfo: 'Wendy Appleseed',\n",
" tags: [ 'Business', 'Sample' ],\n",
" ps: 0\n",
" },\n",
" {\n",
" title: 'MobileMe',\n",
" URLs: [ [Object] ],\n",
" ainfo: 'wendy.appleseed@me.com',\n",
" url: 'https://www.icloud.com/',\n",
" tags: [ 'Sample' ],\n",
" ps: 66\n",
" },\n",
" { title: 'Email Account', ps: 0, ainfo: 'wendy.appleseed@me.com' },\n",
" {\n",
" title: 'Johnny Appleseed Society',\n",
" ps: 0,\n",
" ainfo: 'Wendy Appleseed'\n",
" }\n",
"]"
]
},
"execution_count": 8,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"vault.overviews.values()"
]
},
{
"cell_type": "code",
"execution_count": 6,
"id": "1547939f-3ee1-49df-9401-c54b8511acb4",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"[Object: null prototype] {\n",
" async: [Function (anonymous)],\n",
" done: [Function (anonymous)],\n",
" sendResult: [Function (anonymous)],\n",
" sendError: [Function (anonymous)],\n",
" mime: [Function (anonymous)],\n",
" text: [Function (anonymous)],\n",
" html: [Function (anonymous)],\n",
" svg: [Function (anonymous)],\n",
" png: [Function (anonymous)],\n",
" jpeg: [Function (anonymous)],\n",
" json: [Function (anonymous)],\n",
" input: [Function (anonymous)],\n",
" display: [Function (anonymous)],\n",
" clear: [Function (anonymous)]\n",
"}"
]
},
"execution_count": 6,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"$$"
]
},
{
"cell_type": "code",
"execution_count": 6,
"id": "3625d249-b27e-4990-b433-94238a60f3db",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<a href=\"#\">meow</a>"
]
},
"execution_count": 6,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"$$.jsx(<a href=\"#\">meow</a>)"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "9899de99-b1a9-4f91-9d48-a63808baedc1",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "jp-Babel (Node.js)",
"language": "babel",
"name": "babel"
},
"language_info": {
"file_extension": ".js",
"mimetype": "application/javascript",
"name": "javascript",
"version": "16.10.0"
}
},
"nbformat": 4,
"nbformat_minor": 5
}