Closed arthur-shaw closed 9 months ago
@kbjarkefur , let's continue the conversation here to brainstorm the best place to capture the package name.
Here is my suggestions in order of preference.
Capture the package name form the file name <packagename>.pkg
. This file should always be named like that, and ad_publish
checks that the file name matches the name in title in the file. My preference since it adds the least requirements to the file.
We can have a commented-out field in the pkg
file with name. In a pkg
file, a line with a *
is considered a comment. For example, net describe
skips that when rendering the output. I took advantage of that when coming up with title headers that can be used in adodown
. So the lines *** title
etc is no convention that means anything else than it is a comment to Stata. For adodown
I needed section headers to be able to programmatically read and update the file. This means we can absolutely do this in the pkg file. The first top rows are considered comments, and we can get the package name from *** name labeller
.
*** name labeller
*** title
d 'LABELLER': module to manage variable and value labels during data cleaning and preparation
Let me know what you think.
I agree. Let's pluck the name from the file name (i.e., <packagename>.pkg
).
adodown
no longer has aname
field in thepkg
file. The name needs to be extracted from elsewhere. See this conversation.