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

Wishlist for "1.0" release #3

Open
7 of 13 tasks
dgw opened this issue Aug 14, 2023 · 2 comments
Open
7 of 13 tasks

Wishlist for "1.0" release #3

dgw opened this issue Aug 14, 2023 · 2 comments
Labels
enhancement New feature or request
Milestone

Comments

@dgw
Copy link
Member

dgw commented Aug 14, 2023

These are things that would be nice to support/fix before declaring the plugin "stable" and releasing it on PyPI.

  • Meta: Switch from setup.py-style build/install to pyproject.toml
  • Indicate "Dead comment" vs. just plain "Comment" when a comment is "dead": true in Firebase JSON
  • Handle null items (e.g. mistyped or otherwise mangled ID, nuked beyond dead status, etc.)
    • Quick test of json.loads("null") says this should mean the item/user will satisfy is None, which is an easy sanity check to add at runtime and give a friendly error message if the object doesn't exist
    • Current code already does this, actually; only relevant to not-yet-handled stuff like users, which mentions the possibility of null separately
  • Show story submitter
  • Handle/differentiate "job" post type
  • Handle(/differentiate?) "poll" post type
    • Sample items: 126809 ("poll" type example from HN API docs)
    • Handle "pollopt" item type? Listed under "parts" field of a "type": "poll" item
      Can't imagine people will ever link directly to a poll option, so maybe summarizing the poll options when a "poll" gets linked is better? (Lot of extra API hits, though.)
  • Handle/differentiate items from "ask" & "show" tabs
    • Also of "type": "story", but will have text instead of url and usually a category-specific prefix on the title ("Ask HN:"/"Tell HN:" for "ask" tab; "Show HN:" for "show" tab)
    • Sample items:
      • 37111256 – "story" type with text only, found under "ask" tab
      • 37119235 – text post that does NOT start with "Ask HN" but was discovered near the top of the "ask" tab anyway, somehow
  • Handle stories of any type with no url field (current state as of 88c39cb: KeyError: 'url')
  • Handle deleted items (only deleted: true, id, time, and type fields present)
  • Handle user profiles
    • Samples:
      • voyagerfan5761 – me! …until I can get a username change
        • about field contains ", so make sure to decode HTML entities in user bios
      • pg – founder/developer? lots of activity, submitted item 1 😮
      • dgwnot me! (at least not yet.)
        • as of writing this, has no public activity; such users are just null in the API, making users who've never posted/commented indistinguishable from nonexistent users (which should also be handled)
  • Deal with useless (on IRC) HTML tags, to avoid cases such as described in Wishlist for "1.0" release #3 (comment)
  • Maybe handle oddball links someone might copy by accident, like /edit?id=NNNNNN

I'll add to this if I think of more after submitting the issue.

@dgw dgw added the enhancement New feature or request label Aug 14, 2023
@dgw dgw added this to the 1.0.0 milestone Aug 14, 2023
@ghost
Copy link

ghost commented Nov 26, 2023

One to not forget: double links because of <a href> tags.

<user> https://news.ycombinator.com/item?id=38421121

<bot> [Hacker News] Comment by Ringz (2 hours, 28 minutes ago): My perfect bookmark manager is Markdownload <a href="https://github.com/deathau/markdownload">https://github.com/deathau/markdownload</a> ⏎ Just save the complete page, only selected text or only the link to a markdown file or Obsidian. With downloaded, linked or without pictures. My OS and Obsidian can search those files, they have more (automatically added) metadata. ⏎ I can even edit them […]


Edit: another example:

<user> https://news.ycombinator.com/item?id=38472130

<bot> [Hacker News] Comment by i13e (2 hours, 8 minutes ago): This matches your requirements:<a href="https://maps.google.com/" rel="nofollow noreferrer">https://maps.google.com/</a>

@dgw
Copy link
Member Author

dgw commented Jan 19, 2024

v0.1.0 cut today with all the important functionality available. Submissions and comments work, and common edge cases like deleted items are handled.

In descending order of precedence, what's missing:

  • User profile handling
  • Stripping useless HTML, as mentioned in a comment above
  • Differentiating/displaying polls and their options/results
  • Handling "Ask/Show HN" items specially (maybe? just regular items with a specific title prefix, except when they're not)
  • Support oddball HN links that happen to include an item ID anyway, like /edit (maybe?)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant