Move pick to lispusers (#881)
* Make PICK a Lispusers module * PICK moved to lispusers, HCFILES moved to test repo (currently new/printing) * redo PICK documentation * Update documents and projects choices * more testing and restore lost edits to TEDIT * fix some typos
This commit is contained in:
87
lispusers/PICK
Normal file
87
lispusers/PICK
Normal file
@@ -0,0 +1,87 @@
|
||||
(DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP" BASE 10)
|
||||
|
||||
(FILECREATED "11-Aug-2022 17:53:58" {DSK}<home>larry>medley>lispusers>PICK.;3 4261
|
||||
|
||||
:CHANGES-TO (VARS PICKCOMS)
|
||||
(FNS PICK)
|
||||
|
||||
:PREVIOUS-DATE "10-Aug-2022 16:57:49" {DSK}<home>larry>medley>lispusers>PICK.;1)
|
||||
|
||||
|
||||
(PRETTYCOMPRINT PICKCOMS)
|
||||
|
||||
(RPAQQ PICKCOMS ((COMMANDS "pick")
|
||||
(DECLARE%: EVAL@COMPILE DONTCOPY (FILES (LOADCOP)
|
||||
GITFNS))
|
||||
(FILES GITFNS)
|
||||
(FNS PICK)))
|
||||
|
||||
(DEFCOMMAND "pick" (FIRST . REST) (PICK FIRST REST))
|
||||
(DECLARE%: EVAL@COMPILE DONTCOPY
|
||||
|
||||
(FILESLOAD (LOADCOP)
|
||||
GITFNS)
|
||||
)
|
||||
|
||||
(FILESLOAD GITFNS)
|
||||
(DEFINEQ
|
||||
|
||||
(PICK
|
||||
[LAMBDA (TYPE CHOICES) (* ; "Edited 11-Aug-2022 17:15 by lmm")
|
||||
(* ; "Edited 10-Aug-2022 16:57 by lmm")
|
||||
(SELECTQ (MKATOM (U-CASE (MKSTRING TYPE)))
|
||||
(ONEOF (* ;
|
||||
"PICK ONEOF A1 A2 A3 ... - just choose from choices listed")
|
||||
[CAR (NTH CHOICES (RAND 1 (LENGTH CHOICES])
|
||||
(NIL (* ;
|
||||
"pick -- choose an issue, a file, a project")
|
||||
[PICK (PICK 'ONEOF '(FILE ISSUE PROJECT])
|
||||
(ISSUE (* ;
|
||||
"pick issue [number] -- display an issue; if none given, choose one at random")
|
||||
(LET ([ISSUE (PICK 'ONEOF (OR CHOICES (GIT-COMMAND
|
||||
"gh issue list -L 5000 -R interlisp/medley | sed 's/\([0-9]*\).*/\1/'"
|
||||
]
|
||||
(STR (OPENTEXTSTREAM))
|
||||
(COMMENTS T)
|
||||
(TITLE))
|
||||
(for S in (GIT-COMMAND (CL:FORMAT NIL "gh issue view -R interlisp/medley ~d"
|
||||
ISSUE)) do (CL:FORMAT STR "~a~&" S)
|
||||
finally
|
||||
|
||||
(* ;;
|
||||
"this TEDIT call is wrong -- it takes the keyboard and the promptwindow prompt is wrong")
|
||||
|
||||
[TEDIT STR NIL NIL `(READONLY T TITLE ,(SETQ TITLE (CL:FORMAT NIL
|
||||
"Issue #~d"
|
||||
ISSUE]
|
||||
|
||||
(* ;; "if there are comments (or always) show comments too -- the -w switch doesn't work online -- no browser")
|
||||
|
||||
(IF COMMENTS
|
||||
THEN (GIT-COMMAND (CL:FORMAT NIL
|
||||
"gh issue view -R interlisp/medley ~a -w"
|
||||
ISSUE)))
|
||||
(RETURN TITLE))))
|
||||
(DIR
|
||||
(* ;; "pick a directory to choose files from")
|
||||
|
||||
(PICK 'ONEOF '(LISPUSERS LIBRARY DOCTOOLS SOURCES INTERNAL)))
|
||||
(FILE
|
||||
(* ;; " pick a file from a (randomly chosen) directory")
|
||||
|
||||
[LIST 'FILE (PICK 'ONEOF (DIRECTORY (OR (MEDLEYDIR (OR (CAR CHOICES)
|
||||
(PICK 'DIR))
|
||||
NIL T)
|
||||
(FETCH (GIT-PROJECT CLONEPATH)
|
||||
OF (CDR (ASSOC (CAR CHOICES)
|
||||
GIT-PROJECTS])
|
||||
(PROJECT
|
||||
(* ;; "pick PROJECT will choose some repo to work on")
|
||||
|
||||
[PICK 'ONEOF (PICK 'ONEOF (LIST (MAPCAR GIT-PROJECTS #'CAR)
|
||||
'(CLOS ROOMS ONLINE WEBSITE COMMUNITY ENVOS])
|
||||
(HELP TYPE "Unknown type"])
|
||||
)
|
||||
(DECLARE%: DONTCOPY
|
||||
(FILEMAP (NIL (735 4238 (PICK 745 . 4236)))))
|
||||
STOP
|
||||
BIN
lispusers/PICK.LCOM
Normal file
BIN
lispusers/PICK.LCOM
Normal file
Binary file not shown.
BIN
lispusers/PICK.TEDIT
Normal file
BIN
lispusers/PICK.TEDIT
Normal file
Binary file not shown.
Reference in New Issue
Block a user