diff --git a/HISTORY.rst b/HISTORY.rst index f95e75705cca7b67f0eef5b1156463be8da6ca9e..6d97ddb7c00f7a80ab0b5a5a0ef4daa7bd5fc1f8 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -23,7 +23,7 @@ History ------------------ * New versioning scheme -2023.1.0.0 (2023-04-03) +2022.2.0.0 (2023-04-03) ------------------ * Gui updated to PySide2 * Pmw dependency dropped diff --git a/mseedpeek/mseedpeek.py b/mseedpeek/mseedpeek.py index 73f24bedcfe7bcad50895d0663a41ad122b9a453..999b13772e68a22d78981abfb56b7e8925155f3d 100644 --- a/mseedpeek/mseedpeek.py +++ b/mseedpeek/mseedpeek.py @@ -144,7 +144,6 @@ from mseedpeek.libtrace import * from mseedpeek.mseedInfo import * VERSION = "2022.2.0.0" -SPACE = " " def main(): @@ -298,6 +297,8 @@ class MainWindow(QtWidgets.QWidget): Black = QtGui.QColor(0, 0, 0) help_text = QtWidgets.QTextEdit() + #font = QtGui.QFont("Consolas") + #help_text.setFont(font) layout.addWidget(help_text) help_text.setVerticalScrollBarPolicy( QtCore.Qt.ScrollBarPolicy.ScrollBarAlwaysOff) @@ -305,207 +306,173 @@ class MainWindow(QtWidgets.QWidget): # Name help_text.setTextColor(Blue) - text = "NAME" - help_text.insertPlainText(text) + help_text.insertPlainText("NAME") help_text.setTextColor(Black) - text = "\n" + SPACE + "mseedpeek - \ - GUI for displaying mseed file headers.\n\n" - help_text.insertPlainText(text) + help_text.insertPlainText(""" + mseedpeek - GUI for displaying mseed file headers.\n\n""") # Version help_text.setTextColor(Blue) - text = "VERSION" - help_text.insertPlainText(text) + help_text.insertPlainText("VERSION") help_text.setTextColor(Black) text = "\n" + SPACE + str(VERSION) + "\n\n" - help_text.insertPlainText(text) + help_text.insertPlainText(""" + %s\n\n""" % VERSION) # Synopsis help_text.setTextColor(Blue) - text = "SYNOPSIS" - help_text.insertPlainText(text) + help_text.insertPlainText("SYNOPSIS") help_text.setTextColor(Black) - text = "\n" + SPACE + "mseedpeek\n" + SPACE + "\ - mseedpeek -#\n" + SPACE + "mseedpeek -f file_names\n\n" - help_text.insertPlainText(text) + help_text.insertPlainText(""" + mseedpeek + mseedpeek -# + mseedpeek -f file_names\n\n""") # Options help_text.setTextColor(Blue) - text = "OPTIONS" - help_text.insertPlainText(text) + help_text.insertPlainText("OPTIONS") help_text.setTextColor(Black) - text = "\n" + SPACE + "-# returns version number\n" + \ - SPACE + "-f file_name(s) - accepts command line \ - input for files to inspect (wildcards accepted)\n\n" - help_text.insertPlainText(text) + help_text.insertPlainText(""" + -# returns version number + -f file_name(s) - accepts command line input for files to inspect (wildcards accepted)\n\n""") # noqa: E501 + # Description help_text.setTextColor(Blue) - text = "DESCRIPTION" - help_text.insertPlainText(text) + help_text.insertPlainText("DESCRIPTION") help_text.setTextColor(Black) - text = "\n" + SPACE + "mseedpeek has three notebooks: " - help_text.insertPlainText(text) + help_text.insertPlainText(""" + mseedpeek has three notebooks: """) help_text.setTextColor(Green) - text = "[Trace Headers][Blockettes]" - help_text.insertPlainText(text) + help_text.insertPlainText("[Trace Headers][Blockettes]") help_text.setTextColor(Black) - text = ", and " - help_text.insertPlainText(text) + help_text.insertPlainText(", and ") help_text.setTextColor(Green) - text = "[Help]" - help_text.insertPlainText(text) + help_text.insertPlainText("[Help]") help_text.setTextColor(Black) - text = ". The " - help_text.insertPlainText(text) + help_text.insertPlainText(".") + help_text.insertPlainText(""" + The """) help_text.setTextColor(Green) - text = "[Trace Headers]\n" - help_text.insertPlainText(text) + help_text.insertPlainText("[Trace Headers]") help_text.setTextColor(Black) - text = SPACE + "notebook displays various the fixed \ - header in four levels of verbosity. The " - help_text.insertPlainText(text) + help_text.insertPlainText( + """ notebook displays various the fixed header in four levels of verbosity. + The """) help_text.setTextColor(Green) - text = "[Blockettes]\n" - help_text.insertPlainText(text) + help_text.insertPlainText("[Blockettes]") help_text.setTextColor(Black) - text = SPACE + "notebook displays blockette information.\n\n" - help_text.insertPlainText(text) + help_text.insertPlainText(""" notebook displays blockette information.\n""") # noqa: E501) help_text.setTextColor(Green) - text = SPACE + "[Trace Headers]\n" - help_text.insertPlainText(text) + help_text.insertPlainText(""" + [Trace Headers]""") help_text.setTextColor(Black) - text = SPACE + "General:\n" + SPACE + " \ - >> specify/load directories for building trace db\n" + SPACE + "\ - >> select trace for header display\n" + SPACE + "\ - >> select level of verbosity for \ - display\n\n" + SPACE + "\ - Buttons:\n" - help_text.insertPlainText(text) + help_text.insertPlainText(""" + General: + >> specify/load directories for building trace db + >> select trace for header display + >> select level of verbosity for display + + Buttons:""") help_text.setTextColor(Red) - text = SPACE + " <Build Trace db>" - help_text.insertPlainText(text) + help_text.insertPlainText(""" + <Build Trace db>""") help_text.setTextColor(Black) - text = ": Searchs the directories listed in the \"Data-Directories\" \ - entry box \n" + SPACE + " (a colon separated list) and builds a \ - list of mseed files found indexing them on unique values of\n\ - " + SPACE + " <dir>:<file_name>. It then creates a \ - dropdown menu with entries for each data \ - directory\n" + SPACE + " found.\n" - help_text.insertPlainText(text) + help_text.insertPlainText(""": Searchs the directories listed in the "Data- + Directories" entry box (a colon separated list) and builds a list of mseed + files found indexing them on unique values of <dir>:<file_name>. It then + creates a dropdown menu with entries for each data directory found.""") # noqa: E501 help_text.setTextColor(Red) - text = SPACE + " <Find>" - help_text.insertPlainText(text) + help_text.insertPlainText(""" + <Find>""") help_text.setTextColor(Black) - text = ": Launches a file browser allowing the user to add directories to \ - the \"Data Directories\" entry\n" + SPACE + " box. \ - Double clicking selects the new directory.\n" - help_text.insertPlainText(text) + help_text.insertPlainText(""": Launches a file browser allowing the user to + add directories to the "Data Directories" entry box. Double clicking selects + the new directory.""") # noqa: E501 help_text.setTextColor(Red) - text = SPACE + " <Clear>" - help_text.insertPlainText(text) + help_text.insertPlainText(""" + <Clear>""") help_text.setTextColor(Black) - text = ": Clears the \"Data Directories\" entry box.\n\n" - help_text.insertPlainText(text) - text = SPACE + " By selecting a data directory a dropdown \ - menu is created for trace selection. Selecting a trace from\n" \ - + SPACE + " this menu will create a header display.\n\n" - help_text.insertPlainText(text) - text = SPACE + "Radio Buttons:\n" - help_text.insertPlainText(text) + help_text.insertPlainText(""": Clears the "Data Directories" entry box.\n""") + help_text.insertPlainText(""" + By selecting a data directory a dropdown menu is created for + trace selection. Selecting a trace from this menu will create + a header display. + + Radio Buttons:""") help_text.setTextColor(Red) - text = SPACE + " <Standard>" - help_text.insertPlainText(text) + help_text.insertPlainText(""" + <Standard>""") help_text.setTextColor(Black) - text = ": This is the default. It displays Station, Channel, \ - Location Code, Net Code, and the\n" + SPACE + "\ - nominal Sample Rate.\n" - help_text.insertPlainText(text) + help_text.insertPlainText(""": This is the default. It displays Station, Channel, Location Code, + Net Code, and the nominal Sample Rate.""") # noqa: E501 help_text.setTextColor(Red) - text = SPACE + " <Verbose>" - help_text.insertPlainText(text) + help_text.insertPlainText(""" + <Verbose>""") help_text.setTextColor(Black) - text = ": Standard display plus time of block.\n" - help_text.insertPlainText(text) + help_text.insertPlainText(""": Standard display plus time of block.""") help_text.setTextColor(Red) - text = SPACE + " <Very Verbose>" - help_text.insertPlainText(text) + help_text.insertPlainText(""" + <Very Verbose>""") help_text.setTextColor(Black) - text = ": Verbose plus the rest of the mseed fixed header fields.\n" - help_text.insertPlainText(text) + help_text.insertPlainText(""": Verbose plus the rest of the mseed fixed header fields.""") # noqa: E501 help_text.setTextColor(Red) - text = SPACE + " <Unique>" - help_text.insertPlainText(text) + help_text.insertPlainText((""" + <Unique>""")) help_text.setTextColor(Black) - text = ": This displays changes in the Standard fields within a mseed\ - file.\n\n" - help_text.insertPlainText(text) - text = SPACE + "Slider Scale and " - help_text.insertPlainText(text) + help_text.insertPlainText(""": This displays changes in the Standard fields within a mseed file.""") + help_text.insertPlainText(""" + + Slider Scale and """) help_text.setTextColor(Red) - text = "<Jump To Block #> " - help_text.insertPlainText(text) + help_text.insertPlainText("<Jump To Block #>") help_text.setTextColor(Black) - text = "Button:\n" + SPACE + " At the bottom of the page \ - is a scale bar showing block numbers. Sliding the bar \ - scans through all\n\ - " + SPACE + " fixed headers for the selected \ - mseed file.\n\n" - help_text.insertPlainText(text) + help_text.insertPlainText(""" Button: + At the bottom of the page is a scale bar showing block numbers. Sliding + the bar scans through all fixed headers for the selected mseed file.\n""") # noqa: E501 help_text.setTextColor(Red) - text = SPACE + "<Flush Directories>" - help_text.insertPlainText(text) + + help_text.insertPlainText(""" + <Flush Dictionaries>""") help_text.setTextColor(Black) - text = ": Clears cached trace header data. As you view \ - mseed headers, mseedpeek\n\ - " + SPACE + " maintains a cache of previously \ - viewed headers for quick, future access. If \ - you wish to monitor\n\ - " + SPACE + " changes to mseed files you \ - need to flush the dictionaries so that the \ - new changes will be displayed.\n\n" - help_text.insertPlainText(text) + help_text.insertPlainText(""": Clears cached trace header data. + As you view mseed headers, mseedpeek maintains a cache of previously + viewed headers for quick, future access. If you wish to monitor changes + to mseed files you need to flush the dictionaries so that the new + changes will be displayed.""") help_text.setTextColor(Green) - text = SPACE + "[Blockettes]" - help_text.insertPlainText(text) + help_text.insertPlainText(""" + + [Blockettes]""") help_text.setTextColor(Black) - text = ":\n" - help_text.insertPlainText(text) - text = SPACE + " The 'Blockettes' notebook displays all blockettes \ - found for the select mseed file in a dropdown menu.\n\ - " + SPACE + " By selecting a blockette from the \ - dropdown menu, the contents \ - of the blockette will be\n" + SPACE + " displayed.\n" - help_text.insertPlainText(text) + help_text.insertPlainText(""": + The 'Blockettes' notebook displays all blockettes found for the select + mseed file in a dropdown menu. By selecting a blockette from the dropdown + menu, the contents of the blockette will be displayed.""") # noqa: E501 help_text.setTextColor(Red) - text = SPACE + " <Blockette Info>" - help_text.insertPlainText(text) + help_text.insertPlainText(""" + <Blockette Info>""") help_text.setTextColor(Black) - text = ": Displays a pop-up window with a definition of the \ - SEED Blockette.\n\n" - help_text.insertPlainText(text) - text = SPACE + " At the bottom of the page is a scale bar showing \ - block numbers and sliding the bar scans through all\n\ - " + SPACE + " blockettes for the selected mseed file.\n\n" - help_text.insertPlainText(text) + help_text.insertPlainText(""": Displays a pop-up window with a definition of the SEED Blockette. + + At the bottom of the page is a scale bar showing block numbers and + Sliding the bar scans through all blockettes for the selected mseed file.\n""") # noqa: E501 help_text.setTextColor(Blue) - text = "KEYWORDS\n" - help_text.insertPlainText(text) + help_text.insertPlainText("\nKEYWORDS") help_text.setTextColor(Black) - text = SPACE + "mseed; header information\n\n" - help_text.insertPlainText(text) + help_text.insertPlainText(""" + mseed; header information\n""") help_text.setTextColor(Blue) - text = "SEE ALSO\n" - help_text.insertPlainText(text) + help_text.insertPlainText("\nSEE ALSO") help_text.setTextColor(Black) - text = SPACE + "SEED manual (pdf), fixhdr, mseedhdr\n\n" - help_text.insertPlainText(text) + help_text.insertPlainText(""" + SEED manual (pdf), fixhdr, mseedhdr\n""") help_text.setTextColor(Blue) - text = "AUTHOR\n" - help_text.insertPlainText(text) + help_text.insertPlainText("\nAUTHOR") help_text.setTextColor(Black) - text = SPACE + "Bruce Beaudoin <bruce@passcal.nmt.edu>" - help_text.insertPlainText(text) + help_text.insertPlainText(""" + Bruce Beaudoin <bruce@passcal.nmt.edu> + """) def build_blockettes(self): """