Skip to content

Commit

Permalink
1.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
haghish committed Nov 11, 2016
1 parent e9510d6 commit 998e765
Show file tree
Hide file tree
Showing 3 changed files with 80 additions and 31 deletions.
63 changes: 47 additions & 16 deletions github.ado
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*** DO NOT EDIT THIS LINE -----------------------------------------------------
Version: 1.0.1
Version: 1.0.2
Title: github
Description: installs Stata packages with a particular version (release) as
well as their dependencies from
Expand All @@ -12,9 +12,36 @@ Syntax
======
{p 8 16 2}
{cmd: github} [ {bf:install} | {bf:query} ] {it:username}{bf:/}{it:repository} [{cmd:,} version(str) {it:replace force}]
{cmd: github} [ {it:subcommand} ] {it:username}{bf:/}{it:repository} [{cmd:,} version(str) {it:replace force}]
{p_end}
The __github__ command takes several subcommands, which are:
{synoptset 20 tabbed}{...}
{synopthdr:subcommand}
{synoptline}
{synopt:{opt install}}installs the specified repository. The command should be
followed by the {bf:username/repository}{p_end}
{synopt:{opt uninstall}}uninstalls a package{p_end}
{synopt:{opt query}}followed by {bf:username/repository}, it makes a table of
all of the released versions of that package and allows you to install any version
with a single click.{p_end}
{synoptline}
{p2colreset}{...}
Description
===========
__github__ simplifies installing Stata packages from
[GitHub](http://www.github.com/) website. The package also allows installing
older releaes of the package using the __version()__ option, a feature that
improves reproducibility of analyses carried out by user-written packages.
Options
=======
The __github__ command also takes several options which are discussed below:
{* the new Stata help format of putting detail before generality}{...}
{synoptset 20 tabbed}{...}
{synopthdr}
Expand All @@ -29,17 +56,6 @@ force implies {bf:replace}.{p_end}
{synoptline}
{p2colreset}{...}
The __install__ subcommand installs the package and its dependencies (if specified)
and the __query__ subcommand lists the previous versions (releases) of the
package.
Description
===========
__github__ simplifies installing Stata packages from
[GitHub](http://www.github.com/) website. The package also allows installing
older releaes of the package using the __version()__ option, a feature that
improves reproducibility of analyses carried out by user-written packages.
Installing package dependencies
===============================
Expand Down Expand Up @@ -91,7 +107,7 @@ This help file was dynamically produced by
***/


*cap prog drop github
cap prog drop github
prog define github

*installgithub username/path/to/repo , version()
Expand All @@ -101,10 +117,22 @@ prog define github
tokenize `anything'
local anything "`2'"

// Query
// ---------
if "`1'" == "query" {
githubQuery `anything'
exit
}

// Uninstall
// ---------
else if "`1'" == "uninstall" {
ado uninstall `2'
exit
}

// Install
// ---------
else if "`1'" != "install" {
err 198
}
Expand Down Expand Up @@ -182,7 +210,10 @@ prog define github
qui cd "`dir'"
local pkg : pwd
qui cd "`wd'"


// make sure it is first uninstalled
capture quietly ado uninstall "`package'"

net install "`package'", from("`pkg'") `replace' `force'

di _n "{title:Checking package dipendencies}"
Expand Down Expand Up @@ -215,5 +246,5 @@ prog define github

end

*markdoc github.ado, export(sthlp) replace
markdoc github.ado, export(sthlp) replace

47 changes: 32 additions & 15 deletions github.sthlp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{smcl}
{right:version 1.0.1}
{right:version 1.0.2}
{title:Title}

{phang}
Expand All @@ -10,9 +10,39 @@
{title:Syntax}

{p 8 16 2}
{cmd: github} [ {bf:install} | {bf:query} ] {it:username}{bf:/}{it:repository} [{cmd:,} version(str) {it:replace force}]
{cmd: github} [ {it:subcommand} ] {it:username}{bf:/}{it:repository} [{cmd:,} version(str) {it:replace force}]
{p_end}

{p 4 4 2}
The {bf:github} command takes several subcommands, which are:

{synoptset 20 tabbed}{...}
{synopthdr:subcommand}
{synoptline}
{synopt:{opt install}}installs the specified repository. The command should be
followed by the {bf:username/repository}{p_end}
{synopt:{opt uninstall}}uninstalls a package{p_end}
{synopt:{opt query}}followed by {bf:username/repository}, it makes a table of
all of the released versions of that package and allows you to install any version
with a single click.{p_end}
{synoptline}
{p2colreset}{...}


{title:Description}

{p 4 4 2}
{bf:github} simplifies installing Stata packages from
{browse "http://www.github.com/":GitHub} website. The package also allows installing
older releaes of the package using the {bf:version()} option, a feature that
improves reproducibility of analyses carried out by user-written packages.


{title:Options}

{p 4 4 2}
The {bf:github} command also takes several options which are discussed below:

{* the new Stata help format of putting detail before generality}{...}
{synoptset 20 tabbed}{...}
{synopthdr}
Expand All @@ -27,19 +57,6 @@ force implies {bf:replace}.{p_end}
{synoptline}
{p2colreset}{...}

{p 4 4 2}
The {bf:install} subcommand installs the package and its dependencies (if specified)
and the {bf:query} subcommand lists the previous versions (releases) of the
package.


{title:Description}

{p 4 4 2}
{bf:github} simplifies installing Stata packages from
{browse "http://www.github.com/":GitHub} website. The package also allows installing
older releaes of the package using the {bf:version()} option, a feature that
improves reproducibility of analyses carried out by user-written packages.


{title:Installing package dependencies}
Expand Down
1 change: 1 addition & 0 deletions sth.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[{"name":"README.md","path":"README.md","sha":"f3f0e0d492c7ea5383b788e2fd62719c766f2bac","size":5016,"url":"https://api.github.com/repos/haghish/github/contents/README.md?ref=master","html_url":"https://github.com/haghish/github/blob/master/README.md","git_url":"https://api.github.com/repos/haghish/github/git/blobs/f3f0e0d492c7ea5383b788e2fd62719c766f2bac","download_url":"https://raw.githubusercontent.com/haghish/github/master/README.md","type":"file","_links":{"self":"https://api.github.com/repos/haghish/github/contents/README.md?ref=master","git":"https://api.github.com/repos/haghish/github/git/blobs/f3f0e0d492c7ea5383b788e2fd62719c766f2bac","html":"https://github.com/haghish/github/blob/master/README.md"}},{"name":"example.do","path":"example.do","sha":"c419c51837327971c939d3e9781ae3901b8489bc","size":209,"url":"https://api.github.com/repos/haghish/github/contents/example.do?ref=master","html_url":"https://github.com/haghish/github/blob/master/example.do","git_url":"https://api.github.com/repos/haghish/github/git/blobs/c419c51837327971c939d3e9781ae3901b8489bc","download_url":"https://raw.githubusercontent.com/haghish/github/master/example.do","type":"file","_links":{"self":"https://api.github.com/repos/haghish/github/contents/example.do?ref=master","git":"https://api.github.com/repos/haghish/github/git/blobs/c419c51837327971c939d3e9781ae3901b8489bc","html":"https://github.com/haghish/github/blob/master/example.do"}},{"name":"github.ado","path":"github.ado","sha":"32c9b027a2e08fb4e6cccef234e4dc858017bf5d","size":6661,"url":"https://api.github.com/repos/haghish/github/contents/github.ado?ref=master","html_url":"https://github.com/haghish/github/blob/master/github.ado","git_url":"https://api.github.com/repos/haghish/github/git/blobs/32c9b027a2e08fb4e6cccef234e4dc858017bf5d","download_url":"https://raw.githubusercontent.com/haghish/github/master/github.ado","type":"file","_links":{"self":"https://api.github.com/repos/haghish/github/contents/github.ado?ref=master","git":"https://api.github.com/repos/haghish/github/git/blobs/32c9b027a2e08fb4e6cccef234e4dc858017bf5d","html":"https://github.com/haghish/github/blob/master/github.ado"}},{"name":"github.pkg","path":"github.pkg","sha":"bab1b00354bfead2a77c98ea16e104dd361fa022","size":470,"url":"https://api.github.com/repos/haghish/github/contents/github.pkg?ref=master","html_url":"https://github.com/haghish/github/blob/master/github.pkg","git_url":"https://api.github.com/repos/haghish/github/git/blobs/bab1b00354bfead2a77c98ea16e104dd361fa022","download_url":"https://raw.githubusercontent.com/haghish/github/master/github.pkg","type":"file","_links":{"self":"https://api.github.com/repos/haghish/github/contents/github.pkg?ref=master","git":"https://api.github.com/repos/haghish/github/git/blobs/bab1b00354bfead2a77c98ea16e104dd361fa022","html":"https://github.com/haghish/github/blob/master/github.pkg"}},{"name":"github.sthlp","path":"github.sthlp","sha":"82096831201e64c66165c5dbef0d835f18259347","size":3369,"url":"https://api.github.com/repos/haghish/github/contents/github.sthlp?ref=master","html_url":"https://github.com/haghish/github/blob/master/github.sthlp","git_url":"https://api.github.com/repos/haghish/github/git/blobs/82096831201e64c66165c5dbef0d835f18259347","download_url":"https://raw.githubusercontent.com/haghish/github/master/github.sthlp","type":"file","_links":{"self":"https://api.github.com/repos/haghish/github/contents/github.sthlp?ref=master","git":"https://api.github.com/repos/haghish/github/git/blobs/82096831201e64c66165c5dbef0d835f18259347","html":"https://github.com/haghish/github/blob/master/github.sthlp"}},{"name":"githubQuery.ado","path":"githubQuery.ado","sha":"a92dc1ed80fcc4b2db6f95f687351d85ffde6e20","size":2505,"url":"https://api.github.com/repos/haghish/github/contents/githubQuery.ado?ref=master","html_url":"https://github.com/haghish/github/blob/master/githubQuery.ado","git_url":"https://api.github.com/repos/haghish/github/git/blobs/a92dc1ed80fcc4b2db6f95f687351d85ffde6e20","download_url":"https://raw.githubusercontent.com/haghish/github/master/githubQuery.ado","type":"file","_links":{"self":"https://api.github.com/repos/haghish/github/contents/githubQuery.ado?ref=master","git":"https://api.github.com/repos/haghish/github/git/blobs/a92dc1ed80fcc4b2db6f95f687351d85ffde6e20","html":"https://github.com/haghish/github/blob/master/githubQuery.ado"}},{"name":"stata.toc","path":"stata.toc","sha":"b2174251c1ac7ca5638b3a2521a92e362a235218","size":77,"url":"https://api.github.com/repos/haghish/github/contents/stata.toc?ref=master","html_url":"https://github.com/haghish/github/blob/master/stata.toc","git_url":"https://api.github.com/repos/haghish/github/git/blobs/b2174251c1ac7ca5638b3a2521a92e362a235218","download_url":"https://raw.githubusercontent.com/haghish/github/master/stata.toc","type":"file","_links":{"self":"https://api.github.com/repos/haghish/github/contents/stata.toc?ref=master","git":"https://api.github.com/repos/haghish/github/git/blobs/b2174251c1ac7ca5638b3a2521a92e362a235218","html":"https://github.com/haghish/github/blob/master/stata.toc"}}]

0 comments on commit 998e765

Please sign in to comment.