-
Notifications
You must be signed in to change notification settings - Fork 6
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
feat(ptd): add support for new types #23
Conversation
this is already implemented in the ptd package: https://pkg.go.dev/willnorris.com/go/microformats/ptd . If you want to add support for additional types, add them there? Though I'd also want to see how closely those additional types match what is used in the wild, and/or other microformat parsers. |
Oh, I have no idea how I missed the sub-package. I will take a better look and update the PR.
Regarding that, indeed I'm not sure how common we'll find them in the wild. The post types do exist, but are not considered for the algorithm. My personal case before, when I implemented this, was to not allow certain post types. https://micropublish.net/ for example has support for most of the post types. |
@willnorris I updated the PR to only add support for XRay for example gives those
XRay seems to also have support for bookmark, checkin and follows: I can add those if desired, and leave the other ones out. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #23 +/- ##
===========================================
- Coverage 100.00% 98.28% -1.72%
===========================================
Files 4 5 +1
Lines 843 935 +92
===========================================
+ Hits 843 919 +76
- Misses 0 11 +11
- Partials 0 5 +5 ☔ View full report in Codecov by Sentry. |
oops... looks like I had email notifications for this repo getting filtered so I didn't see your reply 😕 In any event, this looks great. And I'd be down with adding the other that XRay supports as well. Though interestingly, I don't think XRay has different methods for PostType and ReplyType, which is how the spec breaks it out. For things like |
@willnorris just pushed an addition for
|
I think just checking for existence is fine in both cases. If those properties are present, then I think the intent is clear. |
new supported types: recipe, review, audio, bookmark, follow, and checkin.
@willnorris updated :) I think it should be ready. |
Ping @willnorris |
Sorry, still haven't fixed my mail filter for GitHub notifications 😱 Thanks for adding this! |
Adds the post type discovery algorithm to this package. I have it in my library, but I think that it might fit here better since its... Microformats. It is a slightly augmented version compared to the original, as it checks for other post types too.
--
Thanks @nekr0z for asking me I had thought about making a PR here.