-
Notifications
You must be signed in to change notification settings - Fork 165
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: add a .js script to run with scopy and update the prefs table doc.
Signed-off-by: AlexandraTrifan <[email protected]>
- Loading branch information
1 parent
cbf4e4f
commit f9e18af
Showing
2 changed files
with
56 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
function main() { | ||
var prefs = scopy.getPreferences(); | ||
var keys = Object.keys(prefs); | ||
var rst_data = ""; | ||
var output_rst_file = "preferences_table.rst"; | ||
rst_data += "Preferences\n"; | ||
rst_data += "===========\n\n"; | ||
rst_data += ".. list-table::\n"; | ||
rst_data += " :header-rows: 1\n"; | ||
rst_data += " :widths: 20 30 50\n\n"; | ||
rst_data += " * - PreferenceId\n"; | ||
rst_data += " - Title\n"; | ||
rst_data += " - Description\n"; | ||
|
||
keys.forEach(element => { | ||
var prefsDetails = scopy.getPreferenceDescription(element); | ||
if (prefsDetails === undefined) { | ||
printToConsole("Error: Preference details not found for " + element); | ||
} | ||
var title = (prefsDetails[0] !== undefined )? prefsDetails[0] : "---"; | ||
var description = (prefsDetails[1] !== undefined )? prefsDetails[1] : "---"; | ||
rst_data += " * - " + element + "\n"; | ||
rst_data += " - " + title + "\n"; | ||
rst_data += " - " + description + "\n"; | ||
}); | ||
fileIO.writeToFile(rst_data, output_rst_file); | ||
printToConsole("Documentation has been generated in " + output_rst_file); | ||
} | ||
|
||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
.. _preferences: | ||
|
||
============================================= | ||
Scopy Preferences | ||
============================================= | ||
|
||
.. image:: https://raw.githubusercontent.com/analogdevicesinc/scopy/doc_resources/resources/scopy-general-prefs.png | ||
:align: center | ||
.. | ||
Scopy Preferences can be accessed using the bottom left side **preferences | ||
button**. On the right side of the page, preferences for each plugin | ||
are available. More details can be found in their specific plugin | ||
documentation section. | ||
|
||
The **Open** button will try to open the specific OS explorer in | ||
order to find the preference storage file. | ||
|
||
Clicking the **Reset Scopy** button will reset the application to a default | ||
configuration. | ||
|
||
Changing some of the listed preferences will require an application | ||
restart. More details on each preference are listed below. | ||
|
||
.. include:: preferences_table.rst | ||
|