2f73d7595b0e37b159e9c9355f8e99512bf37e81
max
  Wed Sep 10 08:33:03 2025 -0700
Merging Jim Robinsons code into the kent tree. Due to whitespace changes in his IDE, I'm merging this manually.
The original code is at https://github.com/igvteam/ucsc_dev/. changes up to 48816bc are included.
Also adding an API call to get the 2bit file and code to use it.

diff --git src/hg/hubApi/apiUtils.c src/hg/hubApi/apiUtils.c
index bcb8dd7d5d4..21b6a2c6260 100644
--- src/hg/hubApi/apiUtils.c
+++ src/hg/hubApi/apiUtils.c
@@ -726,39 +726,44 @@
        absFileName = trackHubRelativeUrl((hubGenome->trackHub)->url, aliasFile);
     if (absFileName)
         {
         chromAliasSetupBb(NULL, absFileName);
         }
     }
 }
 
 static struct dyString *textOutput = NULL;
 
 void textLineOut(char *lineOut)
 /* accumulate text lines for output in the dyString textOutput */
 {
 if (NULL == textOutput)
     {
-    char outString[1024];
     textOutput = dyStringNew(0);
+
+    boolean doContext = (cgiInt(argSkipContext)==0);
+    if (doContext)
+        {
+        char outString[1024];
         time_t timeNow = time(NULL);
         struct tm tm;
         gmtime_r(&timeNow, &tm);
         safef(outString, sizeof(outString),
            "# downloadTime: \"%d:%02d:%02dT%02d:%02d:%02dZ\"",
             1900+tm.tm_year, tm.tm_mon+1, tm.tm_mday, tm.tm_hour, tm.tm_min,
              tm.tm_sec);
         dyStringPrintf(textOutput, "%s\n", outString);
         safef(outString, sizeof(outString), "# downloadTimeStamp: %lld",
             (long long) timeNow);
         dyStringPrintf(textOutput, "%s\n", outString);
         }
+    }
 
 dyStringPrintf(textOutput, "%s\n", lineOut);
 }
 
 void textFinishOutput()
 /* all done with text output, print it all out */
 {
 puts("Content-Type:text/plain\n");
 printf("%s", dyStringCannibalize(&textOutput));
 }