pwman-tools

Check-in [1baafd9e95]
Login

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

Overview
Comment:Remove some of the unnecessary prints and comments
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | master | trunk
Files: files | file ages | folders
SHA3-256: 1baafd9e955ae7da30e9348be4fbca84fc08c4c9884cbc67da37c8d226f0c060
User & Date: atomicules 2019-08-09 17:13:57
Context
2019-08-12
15:34
Remove outdated comment Leaf check-in: e3c3ae3637 user: atomicules tags: master, trunk
2019-08-09
17:13
Remove some of the unnecessary prints and comments check-in: 1baafd9e95 user: atomicules tags: master, trunk
15:48
Much more sensible escaping of quotes I'd tried unicode before, but couldn't get it to work, I think because I was missing an extra backslash that is required for some reason. check-in: 2165591f67 user: atomicules tags: master, trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to pwman2op.lisp.

30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
		; Case would be better if I can figure that out
		(defparameter template
			(if (string= op-category "Login")
				(template-login username passwd launch)
				; Need to do this and not multiple ifs in progn as otherwise template picks up NIL from progmn
				; Need to combine fields for Secure notes
				(template-secure-note (concatenate 'string "host: " host "; user: " username "; password: " passwd "; launch: " launch))))
		; Command line notes, because multiple levels of escaping are confusing
		; echo | sed 's#DOUBLEQUOTE#\\"#'
		; echo | sed s#SINGLEQUOTE#\\\'#
		; should work
		(defparameter extproc (sb-ext:run-program "sh" (list "-c" (concatenate 'string "echo '" template "' | op encode")) :search :environment :output :stream))
		(defparameter encoded-item (read-line (sb-ext:process-output extproc)))
		(print template)
		(print encoded-item)
		; Create item
		; Just going to send blanks, etc if that's what some fields are. It doesn't seem to matter.
		; 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







<
<
<
<


<
<







30
31
32
33
34
35
36




37
38


39
40
41
42
43
44
45
		; Case would be better if I can figure that out
		(defparameter template
			(if (string= op-category "Login")
				(template-login username passwd launch)
				; Need to do this and not multiple ifs in progn as otherwise template picks up NIL from progmn
				; Need to combine fields for Secure notes
				(template-secure-note (concatenate 'string "host: " host "; user: " username "; password: " passwd "; launch: " launch))))




		(defparameter extproc (sb-ext:run-program "sh" (list "-c" (concatenate 'string "echo '" template "' | op encode")) :search :environment :output :stream))
		(defparameter encoded-item (read-line (sb-ext:process-output extproc)))


		; Create item
		; Just going to send blanks, etc if that's what some fields are. It doesn't seem to matter.
		; 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