Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

RE: st: aliases for help files


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   RE: st: aliases for help files
Date   Fri, 19 May 2006 15:52:13 +0100

Ulrich's neat idea can breed happily with mine. 

1. Maintain "one big" alias-like file your end. 

2. Each time you revise your package, 
run the extraction program to create the 
set of individual files. 

3. That way, SSC (in your case) and users
get all the files, but most of your maintenance 
can be on fewer files. 

Nick 
[email protected] 

Ulrich Kohler
 
> Hi Ben,
> 
> I have an idea and leave it up to discussion whether it is a 
> good one. 
> 
> Consider you write the aliases into one file like this: 
> 
> --------------------moremata.hlp.alias---
> x whatever
> y and
> z some
> t more
> -----------------------------------------
> 
> Consider also you write a program -hextract- which read something like
> this:
> 
> -----------------------hextract.ado-----
> ...
> file open extract using moremata.hlp.alias, read
> file read extract line
> while r(eof)==0 {
> 	tokenize `line' 
> 	file open handle using `1'  .hlp, write
> 	file write handle ".`2'" _n
> 	file close handle
> 	file read extract line
> }
> ...
> -------------------------------------------
> 
> You can than distribute the alias file togehter with 
> hextract. -hextract- will  
> "extract" the lines of the alias-file into the singular help 
> files on the 
> user side.
> 
> This would makes it easier for you to maintain the aliases, 
> and would also 
> diminish the download time. The downside would be that you 
> have to ask the 
> user to run hextract after installation, which would be 
> rather uncommon in 
> Stata world. 
> 
> Uli
> 
> On Friday 19 May 2006 14:38, Ben Jann wrote:
> > Hi, I asked Stata Tech Support about whether it is possible 
> for users to
> >
> > create aliases for help files:
> > > Stata 9 has files containing helpfile aliases (e.g.
> > > "ahelp_alias.maint"). My question is whether there is any way to
> >
> > provide
> >
> > > such alias-files in user packages. The background is as 
> follows: My
> > > -moremata- package (see -ssc d moremata-) contains some 
> 50 functions
> >
> > or
> >
> > > so and keeps on growing. For each function there is a 
> sourcefile and a
> > > helpfile. However only about 20 helpfiles or so are 
> "real" helpfiles.
> > > The remaining helpfiles just point to another helpfile 
> (i.e. contain
> >
> > ".h
> >
> > > whatever" to point to whatever.hlp). It would be great to 
> be able to
> > > gather together these aliases in just one file and thus reduce the
> > > number of files in the package.
> >
> > Stata Tech Support replied:
> > > Unfortunately, there isn't a way for users to create 
> their own aliases
> >
> > for
> >
> > > help files, etc.  You might want to post your question to 
> Stata's list
> > > server (Statalist) to see what other authors have done in 
> the past.
> >
> > So this is what I do now. Does anyone have suggestions?

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index