Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: RE: SSC Archive help files now available in HTML


From   Kit Baum <baum@bc.edu>
To   statalist@hsphsun2.harvard.edu
Subject   st: RE: SSC Archive help files now available in HTML
Date   Sun, 29 Mar 2009 11:14:50 -0400

<>
Roger said

This is very impressive. Are there any plans to distribute a conversion package from .sthlp to .html on SSC? (Or even in official Stata, in case any StataCorp people are listening?)


You don't need one. Just do

log html foo.sthlp foo.html

which is all that my routine is doing in processing these files. This is the same trick used by -log2html-, which has been around for quite a while.


Here is a Mata function that converts all .hlp and .sthlp in the current working directory:

-----------------
version 10.1
mata:
void function genhlpfiles()
{
        helpfiles = dir(".","files","*.*hlp")
        if (rows(helpfiles) > 0) {
helpnames = substr(helpfiles, 1, (strpos(helpfiles,".") :- 1))
        for(i=1; i<=rows(helpfiles); i++) {
cmd = "log html "+helpfiles[i]+" "+helpnames[i]+".html, replace"
        cmd
        stata(cmd)
        }
    }
}
end
----------------

Kit Baum   |   Boston College Economics & DIW Berlin   |   http://ideas.repec.org/e/pba1.html
An Introduction to Stata Programming | http://www.stata-press.com/books/isp.html
   An Introduction to Modern Econometrics Using Stata  |   http://www.stata-press.com/books/imeus.html



*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



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