pwman-tools

Check-in [2c99721959]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Only send --url if it's a login item

Not applicable for Secure Notes and op won't allow it. Using append and
wrapping in a list because cons inserts at the front and this is no good for
what we need.

Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | master | trunk
Files: files | file ages | folders
SHA3-256: 2c99721959e4c12d3339b55e1664322f914247576121174e3f4f24024b4c73ae
User & Date: atomicules 2019-06-25 12:30:05
Context
2019-06-26
06:56
Tidy up script and README. Initial working version.

- Remove a lots of dud comments
- Remove unnecessary print statements
- Add some better print statements to provide output during op creation
- Leave file decryption commented out and add comments explaining why
- Move mapping comments to README
- Complete list of known issues/limitations
- Enable deletion of decrypted file at the end check-in: 2345f9058d user: atomicules tags: master, trunk

2019-06-25
12:30
Only send --url if it's a login item

Not applicable for Secure Notes and op won't allow it. Using append and
wrapping in a list because cons inserts at the front and this is no good for
what we need. check-in: 2c99721959 user: atomicules tags: master, trunk

12:07
Correctly identify Secure Notes, correctly send optional args

- I had SECURE-NOTE whereas in my pwman it's SECURE-NOTES. Dur!
- For creating items with op need to use args like: `--title=Title` not
`--title Title`. Will have to see if things need quoting as well.
- Remove some print statements check-in: 11718ac61a user: atomicules tags: master, trunk

Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to pwman2op.lisp.

45
46
47
48
49
50
51

52






53
54
55
56
57
58
59
		(defparameter encoded-item (read-line (sb-ext:process-output extproc)))
		;(print encoded-item)
		; Create item
		; Just going to send blanks, etc if that's what some fields are. It doesn't seem to matter.
		; ALMOST working...
		; Need to pick up correct env... I.e. thinks not logged in...
		; Maybe pass session variable to this? Maybe no need...?

		(defparameter cproc (sb-ext:run-program "op" (list  "create" "item" op-category encoded-item (concatenate 'string "--title=" name) (concatenate 'string "--url=" host) (concatenate 'string "--tags=" pwman-category)) :search :environment :output :stream))






		(defparameter output (read-line (sb-ext:process-output cproc)))
		(print output)))


; Mappings are as follows:
; `op create item <category> <encodeditem> [--title=<title>] [--url=<url>] [--vault=<vault>] [--tags=<tags>]`
;







>
|
>
>
>
>
>
>







45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
		(defparameter encoded-item (read-line (sb-ext:process-output extproc)))
		;(print encoded-item)
		; Create item
		; Just going to send blanks, etc if that's what some fields are. It doesn't seem to matter.
		; ALMOST working...
		; Need to pick up correct env... I.e. thinks not logged in...
		; Maybe pass session variable to this? Maybe no need...?
		; Need to only send url if it's a Login item
		(defparameter defaultargs (list  "create" "item" op-category encoded-item (concatenate 'string "--title=" name) (concatenate 'string "--tags=" pwman-category)))
		(defparameter args
			(if (string= op-category "Login")
				; Append, because need at end
				(append defaultargs (list (concatenate 'string "--url=" host)))
				defaultargs))
		(defparameter cproc (sb-ext:run-program "op" args :search :environment :output :stream))
		(defparameter output (read-line (sb-ext:process-output cproc)))
		(print output)))


; Mappings are as follows:
; `op create item <category> <encodeditem> [--title=<title>] [--url=<url>] [--vault=<vault>] [--tags=<tags>]`
;