1 Star 1 Fork 7

连享会/nwcommands

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
webnwuse.ado 1.16 KB
一键复制 编辑 原始数据 按行查看 历史
ThomasGrund 提交于 2015-09-18 19:13 . v1.5.1
*! Date : 3sept2014
*! Version : 1.0
*! Author : Thomas Grund, Linkping University
*! Email : contact@nwcommands.org
capture program drop webnwuse
program webnwuse
syntax anything [, * nwclear]
`nwclear'
capture drop _running
local subcommand = word("`anything'",1)
local path = "\$nwwebpath"
local thispath = "`path'"
if "`subcommand'" != "set" {
if "`thispath'" == "" | "`thispath'" == "\" {
global nwwebpath = "http://nwcommands.org/data"
}
}
if "`subcommand'" == "set" {
local subcmd2 = word("`anything'",2)
if "`subcmd2'" == "" {
global nwwebpath = "http://nwcommands.org/data"
}
else {
global nwwebpath = word("`anything'",2)
}
exit
}
if "`subcommand'" == "query" {
di `"{txt}(prefix now "{bf:$nwwebpath}")"'
exit
}
local path = "\$nwwebpath"
local thispath = "`path'"
local webname = subinstr("`anything'", ".dta","",99)
if substr("`webname'",1,4) == "http" {
nwuse `webname', `options'
}
else {
nwuse `thispath'/`webname', `options'
}
qui nwload, labelonly
end
*! v1.5.0 __ 17 Sep 2015 __ 13:09:53
*! v1.5.1 __ 17 Sep 2015 __ 14:54:23
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/arlionn/nwcommands.git
git@gitee.com:arlionn/nwcommands.git
arlionn
nwcommands
nwcommands
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385