How to Add an Example Flowgraph to a Block Doc

From GNU Radio
Jump to navigation Jump to search

Why?

Part of the value of our Block Doc pages is having an Example Flowgraph to show how that block can be used. In a recent review of our 555 current blocks, 214 of them did not have an Example Flowgraph!

To which pages?

Look at Pages with no Example Flowgraph and Documentation Stubs for the lists of pages in need of Example Flowgraphs.

This document describes the process to add an Example Flowgraph to an existing Block Doc; you'll find all of them in the Category Block Docs.

How?

The following steps use Complex To Float as a specific example.

Sign into the Wiki

If you have a Wiki account, sign in before proceeding. Otherwise you won't be able to upload the files.
If you don't have an account, click on "Request account" at the top right of any of our wiki pages (including this one). Then fill in the fields. It may take a day or two for a moderator to approve you.

Find or Create a Flowgraph

  1. Find or create a flowgraph containing the subject block.
  2. Load and execute the flowgraph to test that it works!

Screen Capture the Flowgraph Image

  1. In GRC, select File -> Screen Capture
  2. Change the file type in the lower right corner to PNG
  3. Change the filename to "<your flowgraph file>_fg.png" (e.g. SSB_rcv_weaver_fg.png)
  4. Change the folder to '~/Pictures/Screenshots'
  5. Save

Upload the Screen Capture

  1. Go to Special:Upload, Choose File, select the Screen Capture file, and upload it.
  2. Save the file name and pixel dimensions in your notes.
    e.g. File:SSB_rcv_weaver_fg.png 1,552 × 623 pixels

Upload the Flowgraph .grc File

  1. Go to Special:Upload, Choose File, select the flowgraph .grc file, and upload it.
  2. Save the file name in your notes.
    e.g. File:SSB_rcv_weaver.grc

Edit the Block Doc page

  1. Open the subject block doc and select the 'Edit' tab next to the 'Read' tab.
  2. Below the == Example Flowgraph == line, if there is any placeholder text, delete it and enter the flowgraph file information in the following format: [[File:SSB_rcv_weaver_fg.png|800px]]
    where File:SSB_rcv_weaver_fg.png is your screenshot, and the 800px is the width to display.
    Note: if the original pixel width is less than 800, omit |800px.
  3. On the following line, enter <p>This flowgraph can be downloaded from [[Media:SSB_rcv_weaver.grc]].</p>
    where Media:SSB_rcv_weaver.grc is your flowgraph .grc file
    Note: Changing the filename from "File:" to "Media:" allows easy one-click download.
  4. Find the line which contains [[Category:Pages with no Example Flowgraph]] or [[Category:Stub Docs]] and delete it.
  5. In the Summary entry box, enter "add Example Flowgraph"
  6. Click "Show preview" to examine what you have done.
  7. In addition to checking the Example Flowgraph, scroll to the bottem of the page and check that the only Category shown is "Block Docs".
  8. Make any corrections needed and then click "Save page".

Getting Help

You can always ask questions on our Matrix server in the #gnuradio:gnuradio.org room; if it's specifically about help with editing documentation, please reach out to the documentation team in the #Docs:gnuradio.org room.