forked from haghish/github
-
Notifications
You must be signed in to change notification settings - Fork 0
/
github.dlg
147 lines (112 loc) · 3.07 KB
/
github.dlg
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
* developed by E. F. Haghish - 2018
VERSION 12
POSITION . . 380 175
// Specify package license
// https://help.github.com/articles/licensing-a-repository/
LIST language_list
BEGIN
Stata
SAS
R
Python
Matlab
Mathematica
all
END
LIST in_list
BEGIN
name, description
name
description
readme
all
END
LIST date_list
BEGIN
created
updated
END
DIALOG make, label("github search")
BEGIN
// pkg
CHECKBOX all 10 10 @ . , option(all) default(0) ///
label("show GitHub repositories that are not installable Stata packages")
// net
CHECKBOX net 10 +20 @ . , option(net) default(0) ///
label("include packages outside GitHub (SJ, net, ssc, etc)")
// other Stata resources
CHECKBOX local 10 +20 @ . , option(local) default(0) ///
label("include local resources from Stata (FAQs, etc)")
/*
// select installable files
TEXT tx_pkginfo 10 +40 . ., label("Package information")
*/
// title of the document
TEXT tx_keyword 10 +40 . ., label("keywords")
EDIT keyword 80 @ 285 19 , default("")
// in
TEXT tx_in 10 +25 . 310, label("search in")
COMBOBOX in 80 @ 130 . , dropdownlist contents(in_list)
// language
TEXT tx_language 10 +25 . 310, label("language")
COMBOBOX language 80 @ 130 . , dropdownlist contents(language_list)
/*
// date search
TEXT tx_date 10 +40 . 310, label("limit your search to a date range (optional)")
COMBOBOX date 10 +25 70 . , dropdownlist contents(date_list)
TEXT tx_from 80 @ 112 ., label("from")
EDIT from 115 @ 90 19 , default("YYYY-MM-DD")
TEXT tx_to 215 @ 300 ., label("to")
EDIT to 235 @ 90 19 , default("YYYY-MM-DD")
*/
END
OK ok1, label("OK")
CANCEL can1, label("Cancel")
SUBMIT sub1, label("Submit")
HELP hlp1, view("help github")
RESET res1
*COPY copy1
// ---------------------------------------------------------
// MAKE COMMAND
// =========================================================
PROGRAM command
BEGIN
// search command
put "github search "
put make.keyword
// adding the option's comma if an option is needed
/*
if (make.all | make.net | make.local | !make.language.iseq("Stata") | !make.in.iseq("name") | (!make.from.iseq("YYYY-MM-DD") & !make.to.iseq("YYYY-MM-DD"))) {
put ", "
}
*/
if (make.all | make.net | make.local | !make.language.iseq("Stata") | !make.in.iseq("name, description")) {
put ", "
}
option make.all
option make.net
option make.local
if (!make.language.iseq("Stata")) {
put " language("
put make.language
put ") "
}
if (!make.in.iseq("name, description")) {
put `" in(""'
put make.in
put `"") "'
}
/*
if (!make.from.iseq("YYYY-MM-DD") & !make.to.iseq("YYYY-MM-DD")) {
put " " make.date "("
put make.from
}
if (!make.from.iseq("YYYY-MM-DD") & !make.to.iseq("YYYY-MM-DD") & !make.from.iseq(">") & !make.from.iseq(">=") & !make.from.iseq("<") & !make.from.iseq("<=")) {
put ".."
}
if (!make.from.iseq("YYYY-MM-DD") & !make.to.iseq("YYYY-MM-DD")) {
put make.to
put ") "
}
*/
END