App-SpreadRevolutionaryDate
    
    
  
  
  
view release on metacpan or search on metacpan
 - Fix Wikipedia link for Sylvie
 - Fix Telechat test, deleting extra comma in day names
 - Done Mastodon/Bluesky max_length variable
 - Fix config test by reinitializing command line options
 - Update Telechat test to split longer message
 - Define max_length for BlueSky and split longer messages
 - Define max_length for Mastodon and split longer messages
 - Update TODO
0.44 2025-03-08T13:22:15Z
 - Document Telechat calendars
 - Chose randomly between Telechat calendars
 - Add two other Telechat calendar
 - Update TODO with OpenAI::API
 - Add tmp dir to gitignore
0.43 2025-03-08T13:21:50Z
 - Document Telechat calendars
 - Chose randomly between Telechat calendars
 - Add two other Telechat calendar
 - Update TODO with OpenAI::API
 - Add tmp dir to gitignore
0.42 2025-03-07T16:02:59Z
 - Command line arguments for targets should override configuration
   parameters for targets
 - Remove encoding block raising errors ith UTF8 command line arguments
0.41 2025-03-07T13:47:56Z
 - Document options to PromptUser msgmaker to send image on local disk or
    (Republican) Calendar
VERSION
    version 0.51
DESCRIPTION
    spread-revolutionary-date is a Free Software
    <https://www.gnu.org/philosophy/free-sw.html> that spreads the current
    date, expressed in the French Revolutionary calendar
    <https://en.wikipedia.org/wiki/French_Republican_calendar>, to various
    social networks: Mastodon <https://mastodon.social/>, Bluesky
    <https://bsky.app/>, Twitter <https://twitter.com/>, the Liberachat
    <https://libera.chat/> and Freenode <https://freenode.net/> Internet
    Relay Chat networks.
    Moreover, you can easily extend these defaults targets with any desired
    one, see "EXTENDING TO NEW TARGETS", and even spread something else
    than the revolutionary date, see "msgmaker" option and "EXTENDING TO
    NEW MESSAGE MAKERS".
    The French Revolutionary calendar, also called Republican calendar, was
    introduced during the French Revolution
    <https://en.wikipedia.org/wiki/French_Revolution>, and used from late
    1793 to 1805, and also during the Paris Commune
    <https://en.wikipedia.org/wiki/Paris_Commune> in 1871. This was an
    attempt to get rid of religious and royalist references found in
    Gregorian calendar when naming measures of Time. Months were given new
    names based on nature, each day of the year, instead of being named
    after an associated saint, had a unique name associated with the rural
    economy: agricultural tools, common animals, grains, pastures, trees,
    roots, flowers, fruits, plants, and minerals. But this was also an
    attempt to give more rational in measuring Time, basing measures on
    decimal system. Instead of weeks, each month was divided into exactly 3
    décades, that is ten days; days were divided into ten hours; hours into
    100 minutes; and minutes into 100 seconds.
    You must have a registered account on each of the targets you want to
    And that's it! As of version 0.11 of spread-revolutionary-date, there
    is only about a dozen of strings to translate, mainly for PromptUser
    message maker. But with the possibility to extend to other message
    makers, you may need more and more strings to be translated.
    Translating days, months and feasts used in the RevolutionaryDate
    message maker do not use the gettext system. Mainly because it uses
    DateTime::Calendar::FrenchRevolutionary which proposes French and
    English translations in dedicated Perl modules.
    spread-revolutionary-date keeps the same way for translating
    expressions used in the French revolutionary calendar, but, thanks to
    Moose::Role
    App::SpreadRevolutionaryDate::MsgMaker::RevolutionaryDate::Locale,
    translatable nominal groups have been isolated from other Perl code.
    Their translations lie in a consuming class in the
    App::SpreadRevolutionaryDate::MsgMaker::RevolutionaryDate::Locale::
    namespace for each translated language. These classes are named after
    the two-letter (ISO 639-1 <https://en.wikipedia.org/wiki/ISO_639-1>) or
    three-letter (ISO 639-2 <https://en.wikipedia.org/wiki/ISO_639-2> and
    ISO 639-3 <https://en.wikipedia.org/wiki/ISO_639-3>) lowercase
    abbreviation of the corresponding language. For example, a German
bin/spread-revolutionary-date view on Meta::CPAN
=head1 NAME
spread-revolutionary-date - Spread date and time from Revolutionary (Republican) Calendar
=head1 VERSION
version 0.51
=head1 DESCRIPTION
C<spread-revolutionary-date> is a L<Free Software|https://www.gnu.org/philosophy/free-sw.html> that spreads the current date, expressed in the L<French Revolutionary calendar|https://en.wikipedia.org/wiki/French_Republican_calendar>, to various socia...
Moreover, you can easily extend these defaults targets with any desired one, see L</"EXTENDING TO NEW TARGETS">, and even spread something else than the revolutionary date, see L</msgmaker> option and L</"EXTENDING TO NEW MESSAGE MAKERS">.
The French Revolutionary calendar, also called Republican calendar, was introduced during the L<French Revolution|https://en.wikipedia.org/wiki/French_Revolution>, and used from late 1793 to 1805, and also during the L<Paris Commune|https://en.wikipe...
You B<must> have a registered account on each of the targets you want to spread the revolutionary date. And you must get credentials for C<spread-revolutionary-date> to post on C<Mastodon>, C<Bluesky> and C<Twitter>, and also for IA generated message...
The revolutionary date and time is computed thanks to the L<DateTime::Calendar::FrenchRevolutionary> Perl module, by Jean Forget.
=head1 USAGE
  # Just execute the script in your shell
  # to spread current date to configured accounts
  # to Bluesky, Twitter, Mastodon, Freenode and Liberachat:
bin/spread-revolutionary-date view on Meta::CPAN
 msgstr "Bitte geben Sie die Nachricht zu verbreiten ein"
When the string to be translated includes some words in curly braces, these words are actually named variables and should be left as is in the translation. E.g.:
  msgid "or {abort} to abort"
  msgstr "oder {abort}, um abzubrechen"
And that's it! As of version 0.11 of C<spread-revolutionary-date>, there is only about a dozen of strings to translate, mainly for C<PromptUser> message maker. But with the possibility to extend to other message makers, you may need more and more str...
Translating days, months and feasts used in the C<RevolutionaryDate> message maker do not use the C<gettext> system. Mainly because it uses L<DateTime::Calendar::FrenchRevolutionary> which proposes French and English translations in dedicated Perl mo...
Just copy the French class (from C<lib/App/SpreadRevolutionaryDate/MsgMaker/RevolutionaryDate/Locale/fr.pm> file) into the desired language, change the name of the class and replace every French string. E.g.: the names of the months should be replace...
  has '+months' => (
    default => sub {[
      'Vendémiaire', 'Brumaire',  'Frimaire',
      'Nivôse',      'Pluviôse',  'Ventôse',
      'Germinal',    'Floréal',   'Prairial',
      'Messidor',    'Thermidor', 'Fructidor',
      'jour complémentaire',
lib/App/SpreadRevolutionaryDate.pm view on Meta::CPAN
=head2 new
Constructor class method. Takes one optional argument: C<$filename> which should be the file path of, or an opened file handle on your configuration file, defaults to C<~/.config/spread-revolutionary-date/spread-revolutionary-date.conf> or C<~/.sprea...
=head2 BUILD
Initialises the internal C<App::SpreadRevolutionaryDate> object. This is where all targets objets are built, and authentication is attempted on each of them.
=head2 spread
Spreads calendar date to configured targets. Takes no argument.
=head1 SEE ALSO
=over
=item L<spread-revolutionary-date>
=item L<App::SpreadRevolutionaryDate::Config>
=item L<App::SpreadRevolutionaryDate::BlueskyLite>
lib/App/SpreadRevolutionaryDate/MsgMaker/RevolutionaryDate/Locale/fr.pm view on Meta::CPAN
=item [Annuaire]
"Annuaire du cultivateur, pour la troisième année de la République : présenté le 30 pluviôse de l'an II à la Convention nationale, qui en a décrété l'impression et l'envoi, pour servir aux écoles de la République", Gilbert Romme, Imprimer...
=item [Wikipedia]
L<https://fr.wikipedia.org/wiki/Calendrier_républicain>.
=back
Sources have slight differences between them. All of them obviously include some typos. [Décret] is chosen as the reference since it is the definitive legislative text that officially defines names of days in the French revolutionary calendar. This ...
=head1 SEE ALSO
=over
=item L<spread-revolutionary-date>
=item L<App::SpreadRevolutionaryDate>
=item L<App::SpreadRevolutionaryDate::Config>
lib/App/SpreadRevolutionaryDate/MsgMaker/Telechat.pm view on Meta::CPAN
  my ($orig, $class, %args) = @_;
  $args{locale} = 'fr';
  return $class->$orig(%args);
};
sub compute {
  my $self = shift;
  my %telechat_calendars = (
    '0tvtime' => {
      '0101' => ['flaque d\'eau', 'flaques d\'eau', 'f'],
      '0102' => ['cadre', 'cadres', 'm'],
      '0103' => ['compte-gouttes', 'compte-gouttes', 'm'],
      '0104' => ['laisse de chien', 'laisses de chien', 'f'],
      '0105' => ['bocal', 'bocaux', 'm'],
      '0106' => ['gibier', 'gibiers', 'm'],
      '0107' => ['pare-chocs', 'pare-chocs', 'f'],
      '0108' => ['tranche de jambon', 'tranches de jambon', 'f'],
      '0109' => ['patate', 'patates', 'f'],
lib/App/SpreadRevolutionaryDate/MsgMaker/Telechat.pm view on Meta::CPAN
      '1230' => ['vocifération sportive', 'vociférations sportives', 'f'],
      '1231' => ['connotation de proximité temporelle', 'connotations de proximité temporelle', 'f'],
    },
  );
  my @telechat_days = ('Lourdi', 'Pardi', 'Morquidi', 'Jourdi', 'Dendrevi', 'Sordi', 'Mitanche');
  my $today = DateTime->now(locale => $self->locale);
  my $day_name = $telechat_days[$today->day_of_week_0];
  my @calendars = sort keys %telechat_calendars;
  my $calendar_key = sprintf("%02d", $today->month).sprintf("%02d", $today->day);
  shift @calendars unless $telechat_calendars{'0tvtime'}->{$calendar_key};
  my $chosen_calendar = @calendars[rand @calendars];
  my $feast = $telechat_calendars{$chosen_calendar}->{$calendar_key};
  my $feast_gender = $feast->[2] eq 'm' ? 'Saint' : 'Sainte';
  my $feast_singular = $feast->[0];
  $feast_singular =~ s/\b(\w)/\U$1/g;
  my $feast_plural = $feast->[1];
  my $every_gender = $feast->[2] eq 'm' ? 'tous' : 'toutes';
  if ($self->special_birthday_day && $self->special_birthday_month && $self->special_birthday_name && $today->day == $self->special_birthday_day && $today->month == $self->special_birthday_month) {
      $feast_gender = $self->special_birthday_gender eq 'm' ? 'Saint' : 'Sainte';
      $feast_singular = $self->special_birthday_name;
      $feast_plural = $self->special_birthday_plural;
lib/App/SpreadRevolutionaryDate/MsgMaker/Telechat.pm view on Meta::CPAN
version 0.51
=head1 METHODS
=head2 compute
Computes date of the day similar to the Belgian-French TV show 'Téléchat" on the 1980's. Takes no argument. Returns message as string and hash with the path to an image file of Groucha, the presenter of Téléchat, and its alt text, with 'path' and...
This message maker is greatly based on I<SaintObjetBot> a bot spreading, in "Téléchat style", the date and the feast of the day, see L<https://github.com/tobozo/SaintObjetBot>.
There is no really offical Téléchat calendar (named calendar of holly objects, calendrier des objet saints in French), the principle is to use new inventions of objects instead of outdated objects.
We have found three sources for calendar names: what has actually been broadcasted on tv show, see L<https://www.tvtime.com/fr/show/257185>, and two versions computed by I<SaintObjetBot>, see L<https://github.com/tobozo/SaintObjetBot/blob/main/data/s...
=head1 SEE ALSO
=over
=item L<spread-revolutionary-date>
=item L<App::SpreadRevolutionaryDate>
=item L<App::SpreadRevolutionaryDate::Config>
( run in 0.812 second using v1.01-cache-2.11-cpan-5dc5da66d9d )