HTML::...::hTodo(3pm)

πŸ’– HTML::...::hTodo β€” bestie edition πŸ’–

okay so this is a User Contributed Perl Documentation page for HTML::...::hTodo(3pm) and we are gonna get through it together, no stress, i promise 🫢


✨ NAME ✨

HTML::Microformats::Format::hTodo β€” an hCalendar todo component πŸ’…

literally that's the whole vibe. it's the little todo list living inside your calendar, and it's here to slay.


🌸 SYNOPSIS 🌸

here's the moment, the main character entrance, the code:

use Data::Dumper;
use HTML::Microformats::DocumentContext;
use HTML::Microformats::Format::hCalendar;

my $context = HTML::Microformats::DocumentContext->new($dom, $uri);
my @cals    = HTML::Microformats::Format::hCalendar->extract_all(
                  $dom->documentElement, $context);
foreach my $cal (@cals)
{
  foreach my $todo ($cal->get_vtodo)
  {
    printf("%s: %s\n", $todo->get_due, $todo->get_summary);
  }
}

the way that we grab a $context from the $dom and $uri, pull out all the calendars with extract_all, then loop through every todo with get_vtodo and print the due date plus the summary? iconic. chef's kiss, ate, no crumbs πŸŽ€


πŸ¦‹ DESCRIPTION πŸ¦‹

so HTML::Microformats::Format::hTodo is a helper module for HTML::Microformats::Format::hCalendar. it's the class that represents todo components inside calendars. but like β€” generally speaking, you want to use HTML::Microformats::Format::hCalendar instead. this one's the supporting actor, not the lead. iykyk πŸ’€

HTML::Microformats::Format::hTodo inherits from HTML::Microformats::Format. see the base class definition for a description of property getter/setter methods, constructors, etc. β€” all that good good lives over there, go check it out πŸ‘‘


πŸŽ€ Additional Method πŸŽ€

  • to_icalendar β€” this method exports the data in iCalendar format. heads up bestie: it requires RDF::iCalendar to work, and it will throw an error at run-time if it's not available. so like, have it installed or suffer the consequences πŸ™ˆ

πŸ’€ BUGS πŸ’€

found a bug? please report any bugs to <http://rt.cpan.org/>. spill the tea to the right people, not to me, i'm just the messenger ✨


🌈 SEE ALSO 🌈

go read these too, they're all in the same friend group:

  • HTML::Microformats::Format::hCalendar
  • HTML::Microformats::Format
  • HTML::Microformats

πŸ‘‘ AUTHOR πŸ‘‘

Toby Inkster <tobyink@cpan.org>. β€” the legend themself, thank you for your service 🫢


Copyright 2008-2012 Toby Inkster

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

so basically: free, open, share the love πŸ’–


⭐ DISCLAIMER OF WARRANTIES ⭐

THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.

translating for the girlies: no promises, bestie. it is what it is, periodt πŸ’…


and that's the whole page!! perl v5.32.1, dated 2021-09-12, and that's HTML::...::hTodo(3pm) signing off 🧚✨ mwah, go extract some todos πŸ’œ

πŸ“¦ where this page comes from