Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rich text support in console output #359

Closed
wants to merge 59 commits into from

Commits on Apr 1, 2023

  1. Support for rendering a subset of HTML tags in status content

    Code is adapted from GPL3-licensed muv by @seonon
    https://github.com/seonon/muv
    danschwarz committed Apr 1, 2023
    Configuration menu
    Copy the full SHA
    80814eb View commit details
    Browse the repository at this point in the history
  2. comments and formatting

    danschwarz committed Apr 1, 2023
    Configuration menu
    Copy the full SHA
    3b4f46c View commit details
    Browse the repository at this point in the history
  3. Removed unneeded import

    danschwarz committed Apr 1, 2023
    Configuration menu
    Copy the full SHA
    717a0e4 View commit details
    Browse the repository at this point in the history

Commits on Apr 4, 2023

  1. Support for rendering a subset of HTML tags in status content

    Code is adapted from GPL3-licensed muv by @seonon
    https://github.com/seonon/muv
    danschwarz committed Apr 4, 2023
    Configuration menu
    Copy the full SHA
    479907b View commit details
    Browse the repository at this point in the history
  2. Ignore warning W503

    danschwarz committed Apr 4, 2023
    Configuration menu
    Copy the full SHA
    4ceb3e5 View commit details
    Browse the repository at this point in the history
  3. add get_lists method

    danschwarz committed Apr 4, 2023
    Configuration menu
    Copy the full SHA
    eb8033c View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    524115e View commit details
    Browse the repository at this point in the history
  5. Add basic support for Mastodon Lists

    Fixes issue ihabunek#255
    danschwarz committed Apr 4, 2023
    Configuration menu
    Copy the full SHA
    d65cac1 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    7189c6b View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    94315dd View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    85c228b View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    678cc19 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    1164d0c View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    7ad9e7c View commit details
    Browse the repository at this point in the history
  12. Changed parameters for list cmds

    Title is now a positional parameter.
    
    Also added some error handling in the command processing
    for looking up list IDs per @ihabunek 's suggestions
    danschwarz committed Apr 4, 2023
    Configuration menu
    Copy the full SHA
    0430eed View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    45cffb6 View commit details
    Browse the repository at this point in the history
  14. Break up integration tests

    ihabunek authored and danschwarz committed Apr 4, 2023
    Configuration menu
    Copy the full SHA
    037f7f9 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    1c9935e View commit details
    Browse the repository at this point in the history
  16. Add integration tests for lists

    ihabunek authored and danschwarz committed Apr 4, 2023
    Configuration menu
    Copy the full SHA
    4023bf0 View commit details
    Browse the repository at this point in the history
  17. Fix tests

    ihabunek authored and danschwarz committed Apr 4, 2023
    Configuration menu
    Copy the full SHA
    fe3044f View commit details
    Browse the repository at this point in the history
  18. Extract fetching list ID

    Also don't check if account is found, that function alredy raises a
    ConsoleError.
    ihabunek authored and danschwarz committed Apr 4, 2023
    Configuration menu
    Copy the full SHA
    006ad85 View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    d3ea1e5 View commit details
    Browse the repository at this point in the history
  20. Configuration menu
    Copy the full SHA
    1fb0561 View commit details
    Browse the repository at this point in the history
  21. Configuration menu
    Copy the full SHA
    c48501e View commit details
    Browse the repository at this point in the history
  22. Make output match existing master branch status rendering exactly

    Top level widgets are separated by blank lines, but
    The final blank line of the status is omitted. This exactly
    matches existing status rendering in master, for statuses that
    contain only the currently supported tags
    danschwarz committed Apr 4, 2023
    Configuration menu
    Copy the full SHA
    dc9fa05 View commit details
    Browse the repository at this point in the history
  23. fixed up palette constants a bit

    No longer specifying color "white" when it's more correct to
    omit the color and just specify an attribute like underline,
    bold, etc.
    danschwarz committed Apr 4, 2023
    Configuration menu
    Copy the full SHA
    9ed0a47 View commit details
    Browse the repository at this point in the history
  24. Removed unneeded import

    danschwarz committed Apr 4, 2023
    Configuration menu
    Copy the full SHA
    6e1d36f View commit details
    Browse the repository at this point in the history
  25. Configuration menu
    Copy the full SHA
    0098371 View commit details
    Browse the repository at this point in the history
  26. Configuration menu
    Copy the full SHA
    84663d6 View commit details
    Browse the repository at this point in the history
  27. Make HTML class handling more sensible

    If the class name appears in the constants.py PALETTE entry, it is
    honored. Otherwise, the class is ignored and the tag is handled
    as a generic tag of that type.  This allows hashtag anchors
    to be highlighted, and URL anchors to be styled differently
    regardless of the strange class markup that Akkoma adds to URL
    anchors
    danschwarz committed Apr 4, 2023
    Configuration menu
    Copy the full SHA
    486cd6c View commit details
    Browse the repository at this point in the history
  28. Configuration menu
    Copy the full SHA
    103767d View commit details
    Browse the repository at this point in the history
  29. Configuration menu
    Copy the full SHA
    eb64cb9 View commit details
    Browse the repository at this point in the history
  30. Configuration menu
    Copy the full SHA
    e6b708f View commit details
    Browse the repository at this point in the history

Commits on Apr 5, 2023

  1. make pytest work properly

    danschwarz committed Apr 5, 2023
    Configuration menu
    Copy the full SHA
    72aa934 View commit details
    Browse the repository at this point in the history

Commits on Apr 6, 2023

  1. fix markup for br tag

    danschwarz committed Apr 6, 2023
    Configuration menu
    Copy the full SHA
    e9b4bfb View commit details
    Browse the repository at this point in the history

Commits on Apr 7, 2023

  1. elaborated comment

    danschwarz committed Apr 7, 2023
    Configuration menu
    Copy the full SHA
    bb31054 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    739c009 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    0e6c726 View commit details
    Browse the repository at this point in the history

Commits on May 15, 2023

  1. README.rst: Fix image links

    vitorgalvao authored and danschwarz committed May 15, 2023
    Configuration menu
    Copy the full SHA
    306cf45 View commit details
    Browse the repository at this point in the history
  2. added urwidgets dependency

    danschwarz committed May 15, 2023
    Configuration menu
    Copy the full SHA
    5d47a0a View commit details
    Browse the repository at this point in the history
  3. Support OSC 8 underline of anchor links

    Uses the Hyperlink widget along with TextEmbed widget
    danschwarz committed May 15, 2023
    Configuration menu
    Copy the full SHA
    9ccfd6b View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    4a5db5b View commit details
    Browse the repository at this point in the history
  5. Added a workaround for statuses with malformed HTML

    We see this problem with statuses from Pixelfed servers.
    Per the Mastodon API spec, the content tag is supposed to be
    HTML, but Pixelfed sends statuses that often start as plain text.
    They may include embedded anchor tags etc. within the text.
    This confuses BeautifulSoup HTML parsers and results in bad
    rendering artifacts.
    
    This workaround detects the above condition and attempts to fix it by
    surrounding the status in <p></p>. This converts it to nominally
    valid HTML (at least, parseable by BeautifulSoup.)
    danschwarz committed May 15, 2023
    Configuration menu
    Copy the full SHA
    baa50ca View commit details
    Browse the repository at this point in the history
  6. Hashtag highlighting now works correctly

    Also, hashtags are created as OCS-8 hyperlinks, so they are
    directly clickable in terminals that support OCS-8
    danschwarz committed May 15, 2023
    Configuration menu
    Copy the full SHA
    de3461e View commit details
    Browse the repository at this point in the history
  7. Fix for rendering HTML that starts with an inline tag

    Also, now renders HTML in Account overlay page
    danschwarz committed May 15, 2023
    Configuration menu
    Copy the full SHA
    457facd View commit details
    Browse the repository at this point in the history
  8. Switched to released version of urwidgets (0.1.0)

    Also, removed Python 3.6 tests as urwidgets is Python 3.7+
    danschwarz committed May 15, 2023
    Configuration menu
    Copy the full SHA
    fe88a40 View commit details
    Browse the repository at this point in the history

Commits on May 16, 2023

  1. Configuration menu
    Copy the full SHA
    b3c654b View commit details
    Browse the repository at this point in the history
  2. fix ws

    danschwarz committed May 16, 2023
    Configuration menu
    Copy the full SHA
    86304df View commit details
    Browse the repository at this point in the history

Commits on May 17, 2023

  1. Removed followed_tags highlight feature (incompatible with HTML render)

    Also converted polls.py to use HTML rendering
    danschwarz committed May 17, 2023
    Configuration menu
    Copy the full SHA
    6109257 View commit details
    Browse the repository at this point in the history

Commits on May 25, 2023

  1. HTML-to-markup conversion for status output to console/clipboard

    This introduces a dependency on html2text. The library works
    well for our limited use cases, but has not been updated since
    2020.
    danschwarz committed May 25, 2023
    Configuration menu
    Copy the full SHA
    3b92466 View commit details
    Browse the repository at this point in the history

Commits on May 26, 2023

  1. Configuration menu
    Copy the full SHA
    2563f42 View commit details
    Browse the repository at this point in the history
  2. Strip extra newlines from status text output

    This allows us to pass existing test_console.py tests
    danschwarz committed May 26, 2023
    Configuration menu
    Copy the full SHA
    5c00edb View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    bd375de View commit details
    Browse the repository at this point in the history
  4. HTML-to-markup conversion for status output to console/clipboard

    This introduces a dependency on html2text. The library works
    well for our limited use cases, but has not been updated since
    2020.
    danschwarz committed May 26, 2023
    Configuration menu
    Copy the full SHA
    93a5306 View commit details
    Browse the repository at this point in the history

Commits on May 29, 2023

  1. Configuration menu
    Copy the full SHA
    290bac2 View commit details
    Browse the repository at this point in the history
  2. Login to servers that don't honor the uri spec for V1::Instance

    Pleroma, Akkoma, and other servers do not follow the Mastodon spec
    for the 'uri' attribute which specifies that it contains the domain
    name of the instance. Instead, they return a complete URI.
    
    As a workaround, we now detect this situation and parse out the
    domain from the URI when necessary. This fixes issue ihabunek#347.
    
    Thanks to @laleanor for their patch and @rjp for ideas on how to
    make it work with GotoSocial and other servers
    danschwarz committed May 29, 2023
    Configuration menu
    Copy the full SHA
    474d1f4 View commit details
    Browse the repository at this point in the history
  3. Anchor tags with class = hashtag or mention_hashtag are highlighted

    Previously this only worked for anchor tags with nested spans.
    Now it works for anchor tags with or without nested spans.
    danschwarz committed May 29, 2023
    Configuration menu
    Copy the full SHA
    439aaa6 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    18ef70c View commit details
    Browse the repository at this point in the history

Commits on Jun 23, 2023

  1. Configuration menu
    Copy the full SHA
    a770afc View commit details
    Browse the repository at this point in the history