Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • New Stata utility - loghelp

    Hi all. I've written a new utility called "loghelp" that creates a log file from a Stata .sthlp help file, including running any clickable examples that appear in the help file. It will also optionally create a standalone do file from the clickable examples.

    It more-or-less mimics what you'd see on the screen if you were reading the help file and clicking on the examples.

    This is useful if you have a Stata package with clickable examples in the help files and you want to check that all the examples run without error. It might also be useful if you want to confirm that the examples in a help file run on a particular installation, or if you want the text of the help files including the output of the examples for some other purpose (say a web page), or if you want to create a do file from the examples that appear in a help file.

    It's available on github - you can install via

    net install loghelp, from(https://raw.githubusercontent.com/ma...ilities/master)

    I'll wait a bit for feedback before asking Kit to put it on SSC.
    Last edited by Mark Schaffer; 25 Jul 2023, 16:15.

  • #2
    Dear Mark,
    Interesting addition to the 'Stata box of user community contributed tools'.
    At first, your link did not run on my system.
    But, using the full path did the job just fine:
    Code:
    net install loghelp, from(https://raw.githubusercontent.com/markeschaffer/stata-utilities/master)
    http://publicationslist.org/eric.melse

    Comment


    • #3
      Thanks Eric. I though I'd edited the post so that the full path would be display but ... apparently not. Thanks for spelling it out properly!

      Comment


      • #4
        Have added an "allcmd" option that means any Stata command in the help file, whether or not it's clickable, will be written to a do file if requested.

        This means you can create a do file consisting of either (1) just the clickable examples in the help file, or (2) all Stata examples in the help file, clickable or not.

        Most (all?) Stata help files have non-clickable examples, so this is generally useful for e.g. teaching purposes.

        Note - loghelp will execute only clickable examples. It will NOT execute non-clickable examples - too dangerous! - it will only write the non-clickable commands to the do file.

        Comment

        Working...
        X