f3495a72a10ae753d24daea0d0d3383e04aa124f
braney
  Fri Jun 11 10:47:16 2021 -0700
add a function to dump track names out for use with the image comparator

diff --git src/hg/hgTracks/hgTracks.c src/hg/hgTracks/hgTracks.c
index 8392d80..1f4c661 100644
--- src/hg/hgTracks/hgTracks.c
+++ src/hg/hgTracks/hgTracks.c
@@ -83,31 +83,31 @@
  * variables are not hgt. qualified.  It's a good idea if other
  * program's unique variables be qualified with a prefix though. */
 char *excludeVars[] = { "submit", "Submit", "dirty", "hgt.reset",
             "hgt.in1", "hgt.in2", "hgt.in3", "hgt.inBase",
             "hgt.out1", "hgt.out2", "hgt.out3", "hgt.out4",
             "hgt.left1", "hgt.left2", "hgt.left3",
             "hgt.right1", "hgt.right2", "hgt.right3",
             "hgt.dinkLL", "hgt.dinkLR", "hgt.dinkRL", "hgt.dinkRR",
             "hgt.tui", "hgt.hideAll", "hgt.visAllFromCt",
 	    "hgt.psOutput", "hideControls", "hgt.toggleRevCmplDisp",
 	    "hgt.collapseGroups", "hgt.expandGroups", "hgt.suggest",
 	    "hgt.jump", "hgt.refresh", "hgt.setWidth",
             "hgt.trackImgOnly", "hgt.ideogramToo", "hgt.trackNameFilter", "hgt.imageV1", "hgt.suggestTrack", "hgt.setWidth",
              TRACK_SEARCH,         TRACK_SEARCH_ADD_ROW,     TRACK_SEARCH_DEL_ROW, TRACK_SEARCH_PAGER,
             "hgt.contentType", "hgt.positionInput", "hgt.internal",
-            "sortExp", "sortSim", "hideTracks", "ignoreCookie",
+            "sortExp", "sortSim", "hideTracks", "ignoreCookie","dumpTracks",
             NULL };
 
 boolean genomeIsRna = FALSE;    // is genome RNA instead of DNA
 
 /* These variables persist from one incarnation of this program to the
  * next - living mostly in the cart. */
 boolean baseShowPos;           /* TRUE if should display full position at top of base track */
 boolean baseShowAsm;           /* TRUE if should display assembly info at top of base track */
 boolean baseShowScaleBar;      /* TRUE if should display scale bar at very top of base track */
 boolean baseShowRuler;         /* TRUE if should display the basic ruler in the base track (default) */
 char *baseTitle = NULL;        /* Title it should display top of base track (optional)*/
 static char *userSeqString = NULL;  /* User sequence .fa/.psl file. */
 
 /* These variables are set by getPositionFromCustomTracks() at the very
  * beginning of tracksDisplay(), and then used by loadCustomTracks(). */
@@ -8122,30 +8122,39 @@
     /* hide tracks not on any windows chromNames */
     boolean hideIt = TRUE;
     struct window *w;
     for (w = windows; w; w=w->next)
         {
         if (hTrackOnChrom(track->tdb, w->chromName))
             hideIt = FALSE;
         }
     if (hideIt)
         {
         track->limitedVis = tvHide;
         track->limitedVisSet = TRUE;
         }
     }
 
+if (cartUsualBoolean(cart, "dumpTracks", FALSE))
+    {
+    struct dyString *dy = newDyString(1024);
+    logTrackList(dy, trackList);
+
+    printf("Content-type: text/html\n\n");
+    printf("%s\n", dy->string);
+    exit(0);
+    }
 
 if (sameString(cfgOptionDefault("trackLog", "off"), "on"))
     logTrackVisibilities(cartSessionId(cart), trackList, position);
 
 
 /////////////////
 
 // NEED TO LOAD ALL WINDOWS NOW
 //
 //   Need to load one window at a time!
 //
 //   The use of the global values for a window
 //   means that differerent threads cannot use different global window values.
 //   Threads must run on just one window value at a time.
 //