haghish / github

a module for building, searching, installing, managing, and mining Stata packages from GitHub
http://haghish.github.io/github/
101 stars 41 forks source link

MAKEDLG: question regarding TOC and PKG generation #7

Closed jpazvd closed 5 years ago

jpazvd commented 5 years ago

Is it possible to pull files from a sub directory within my GitHub repository.

My stata ado files are organized in the following structure

.../src/a .../src/e .../src/_

I would like to generate a pkg which would allow me to files from sub directories within my REPO. Is that possible? or all fields need to be in the root directory?

I have used the following syntax to make my TOC and PKG:

makedlg adecomp, /// replace toc pkg title("ADECOMP: Stata module to estimate Shapley Decomposition by Components of a Welfare Measure"') /// version("1.1") license("MIT") author("Joao Pedro Azevedo") affiliation("World Bank") /// url("http://www.worldbank.org/en/about/people/j/joao-pedro-azevedo") /// email("jazevedo@worldbank.org") /// install(""C:\Users\wb255520\Documents\myados\adecomp\src\a\adecomp.ado" "C:\Users\wb255520\Documents\myados\adecomp\src\a\adecomp.sthlp" "C:\Users\wb255520\Documents\myados\adecomp\src__ex_adecomp.ado""') /// ancillary(`""C:\Users\wb255520\Documents\myados\adecomp\src\e\exdata_adecomp.dta""')

Best regards,

JP

haghish commented 5 years ago

At the time I was developing makedlg, I thought about it. My final thought was to keep the program as simple as possible. To allow what you are asking for, I needed to get the working directory of the repository and then remove the similarities between the paths. But then, there is other complications, namely, the URL might be different on GitHub (but I am not very sure). You could try editing the pkg file by adding the sub-directories before F filename.ado and see if it works.

I know it can be done...

jpazvd commented 5 years ago

I have tried by simply adding the folder structure (from a root).

I replaced

f a.ado

by

f src/a/a.ado

I think it has worked.

Best,

JP

From: E. F. Haghish notifications@github.com Sent: Monday, December 10, 2018 9:20 AM To: haghish/github github@noreply.github.com Cc: Joao Pedro Wagner De Azevedo jazevedo@worldbank.org; Author author@noreply.github.com Subject: Re: [haghish/github] MAKEDLG: question regarding TOC and PKG generation (#7)

[External]

At the time I was developing makedlg, I thought about it. My final thought was to keep the program as simple as possible. To allow what you are asking for, I needed to get the working directory of the repository and then remove the similarities between the paths. But then, there is other complications, namely, the URL might be different on GitHub (but I am not very sure). You could try editing the pkg file by adding the sub-directories before F filename.ado and see if it works.

I know it can be done...

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/haghish/github/issues/7#issuecomment-445831064, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AdqfKUMaYpL99qzAsJs4_PLdPqXMGlzdks5u3m1-gaJpZM4ZKWLf.