Skip to content
Snippets Groups Projects
  1. Aug 11, 2022
  2. Aug 10, 2022
    • Albert Gräf's avatar
      Add document generation for ReadMe.html and Welcome.html. · 332cdadb
      Albert Gräf authored
      These two are now generated from Markdown source, using awk for
      preprocessing (macro substitution and selection of OS-dependent
      sections) and pandoc for formatting. A nice-looking GH-style-alike style
      sheet is also included. All this stuff including the Markdown source can
      be found in packages/gendoc.
      
      This replaces the jumble of echo commands in the packages/Makefile which
      was hardly maintainable and produced subpar results. The content of
      the ReadMe document was outdated as well, so I updated it.
      
      The main advantages are that it is now much easier to edit these
      documents (simply edit the Markdown source in gendoc/ReadMe.md and
      gendoc/Welcome.md), replacement of version numbers and OS-dependent
      information is automatically performed by the awk script, and the
      resulting html documents produced with pandoc look much better.
      
      I consider this important, since these documents (especially
      ReadMe.html) are pretty much the first bits of Purr Data related
      documentation the user sees when installing the package, on Mac and
      Windows at least where they are prominently featured during the
      installation. If ReadMe.html then looks like some webpage from the
      1990s, with information that is hopelessly outdated, that doesn't make
      for a great onboarding experience. The new system solves this problem.
      
      The only downside that I see is that this requires special tools, awk
      and pandoc. Awk is readily available on all platforms we support, but
      pandoc must be installed in the runners. Fortunately, pandoc is
      available from both Homebrew and MacPorts. For Windows there is a
      package from the upstream website at https://pandoc.org/installing.html
      which works in msys2 just fine, if PATH is set up accordingly. On Arch
      and Debian/Ubuntu, pandoc is readily available in the official package
      repositories. So this shouldn't be a big issue.
      332cdadb
  3. Aug 09, 2022
  4. Aug 08, 2022
  5. Aug 03, 2022
  6. Aug 02, 2022
  7. Aug 01, 2022
  8. Jul 29, 2022
  9. May 15, 2022
  10. May 14, 2022
  11. Feb 06, 2022
  12. Aug 29, 2021
  13. Aug 28, 2021
  14. Aug 27, 2021
    • Gabriela Bittencourt's avatar
      f7055ba4
    • Albert Gräf's avatar
      Add some autocomplete options to the gui preferences. · 3440d1d1
      Albert Gräf authored and Gabriela Bittencourt's avatar Gabriela Bittencourt committed
      The autcomplete option globally enables or disables autocompletion.
      
      The autocomplete_prefix option only matches object name prefixes,
      instead of looking for the text anywhere in an object name. So, e.g.,
      typing "me" lists "metro", but not "timer" as possible completions if
      this option is enabled.
      
      Both options are currently disabled by default.
      
      TODO: French translations.
      3440d1d1
    • Gabriela Bittencourt's avatar
      Remove message and comment autocompletion · 533ebff2
      Gabriela Bittencourt authored
      The autocompletion of messages and comments doesn't properly deal with
      line breaks in the current implementation. Disable those for now.
      533ebff2
    • Gabriela Bittencourt's avatar
      Add the autocomplete dropdown feature · 81bdfb62
      Gabriela Bittencourt authored
      This adds a dropdown menu with completions from the completion index
      when the user creates a new object, message or comment, and starts
      typing. Note that this index is initially populated with objects from
      the search index of the help browser. As the user types object names,
      arguments, messages and comments, they will be added to the completion
      index as well.
      
      Entries from the menu can be chosen with the cursor up and down
      keys. The enter key can then be used to select an entry and insert the
      corresponding completion. Alternatively, clicking with the mouse also
      selects an entry.
      
      NOTES / TODO:
      
      This is a very first implementation of autocompletion for purr-data, and
      as such it still has a few minor quirks and shortcomings:
      
      - Help index completions: Completions from the help browser's index will
        only be available once that index has been built. By default, this
        happens when the help browser is first launched. However, you can
        change this so that the help index i...
      81bdfb62
    • Gabriela Bittencourt's avatar
      Prototype of autocomplete feature · 848a6e5e
      Gabriela Bittencourt authored
      For now the results are shown in the purr-data console,
      printing the first 10 completions.
      848a6e5e
    • Gabriela Bittencourt's avatar
      Create a completion_index for the autocompletion feature · 8dc2b854
      Gabriela Bittencourt authored
      - create the completion_index at the initialization of purr data
      - add newly created objects to the completion_index
      - update the completion_index by adding all objects from the index
        of the help browser whenever the index is created via make_index
      - the completion_index is saved into a json file when purr-data
        quits, and also every 50 changes in order to mitigate data loss
        in case purr-data crashes
      8dc2b854
  15. Aug 26, 2021
    • Albert Gräf's avatar
      Rework the index creation process. · 0e23379b
      Albert Gräf authored
      Pass 1 now iterates over the default hierarchy (either doc or the entire
      libdir) and the help path (if enabled) to determine names and locations
      of all help patches in the scope of the help browser (as set in the GUI
      preferences). This initial pass is needed, in particular, to resolve
      related object references in the meta data in pass 2.
      
      Pass 2 then iterates over all index entries constructed in pass 1,
      adding all the available meta data, including cross references to
      related objects. When pass 2 finishes, index construction is complete
      and the index cache is written to disk.
      
      Note the new revision of the help browser narrows indexing to just the
      -help.pd patches. Previous versions would index all .pd files. This may be
      subject to review, but the new indexing scheme is faster and produces less
      noise in the earch results (i.e., you won't see any helper abstractions or
      other patches which just happen to be bundled with the help patches).
      0e23379b
  16. Aug 25, 2021
    • Gabriela Bittencourt's avatar
      Add link to related_objects to each -help file · 9309710e
      Gabriela Bittencourt authored and Albert Gräf's avatar Albert Gräf committed
      This adds clickable links (employing calls to pdgui.doc_open) to the
      help patches for related objects, if we can locate them. To support
      this, we add an initial scan of the help patches, recording their names
      and paths in the search index so that we can quickly look up their
      locations.
      
      NOTE: At present, the initial scan only covers the default hierarchy in
      libdir, regardless of what the actual scope of the browser set in the
      gui preferences and the help path is. Meta data will only be retrieved
      for the help patches discovered in the initial scan.
      9309710e