App-SpreadRevolutionaryDate

 view release on metacpan or  search on metacpan

bin/spread-revolutionary-date  view on Meta::CPAN

#!/usr/bin/perl
#
# This file is part of App-SpreadRevolutionaryDate
#
# This software is Copyright (c) 2019-2026 by Gérald Sédrati.
#
# This is free software, licensed under:
#
#   The GNU General Public License, Version 3, June 2007
#
use 5.014;
use utf8;

BEGIN {
    $ENV{OUTPUT_CHARSET} = 'UTF-8';
}

# PODNAME: spread-revolutionary-date
# ABSTRACT: Spread date and time from Revolutionary (Republican) Calendar
use App::SpreadRevolutionaryDate;
App::SpreadRevolutionaryDate->new->spread;

__END__

=pod

=encoding UTF-8

=head1 NAME

spread-revolutionary-date - Spread date and time from Revolutionary (Republican) Calendar

=head1 VERSION

version 0.54

=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:
  $ spread-revolutionary-date

  # Or, since this script does nothing but calling
  # the L<App::SpreadRevolutionaryDate> Perl module,
  # use this one-liner:
  $ perl -MApp::SpreadRevolutionaryDate \
      -e 'App::SpreadRevolutionaryDate->new->spread;'

  # Test spreading to Mastodon only:
  $ spread-revolutionary-date \
      --targets=Mastodon --test

  # Test spreading to Twitter only in English:
  $ spread-revolutionary-date \
      --targets=Twitter \
      --test \
      --locale en

  # Spread acab time to Twitter and Liberachat
  # explicit channels
  $ spread-revolutionary-date \
      --targets=Twitter \
      --targets=Liberachat \
      --liberachat_channels='#revolution' \
      --liberachat_channels='#acab' \
      --revolutionarydate_acab

  # Prompt user for a message to spread to Mastodon
  $ spread-revolutionary-date \
      --targets=Mastodon \
      --msgmaker=UserPrompt

  # Spread message as command line parameter to
  # Mastodon, Bluesky, Twitter, Liberachat and Freenode
  $ spread-revolutionary-date \
      --msgmaker=UserPrompt \
      --promptuser_default

  # Spread message and image as command line parameter to
  # Mastodon and Bluesky
  $ spread-revolutionary-date \
      --msgmaker=UserPrompt \
      --targets=Mastodon \
      --targets=Bluesky \
      --promptuser_default \
        'This is my message to the world'
      --promptuser_img_path= \
        /my/path/to/image.png
      --promptuser_img_alt= \
        'Alternative text for image'

  # Spread message and image form web as command line parameter to

bin/spread-revolutionary-date  view on Meta::CPAN


  # Spread Téléchat date of the day on Mastodon and BlueSky
  $ spread-revolutionary-date \
      --msgmaker=Telechat \
      --targets=Mastodon \
      --targets=Bluesky

  # Spread Gemini generating an illustrated joke on Mastodon
  # NB: usually prompts are defined in configuration file along
  # with api_key, while --gemini-process is passed on command line
  # to choose which prompt to process
  $ spread-revolutionary-date \
      --targets=Mastodon \
      --msgmaker=Gemini \
      --gemini_api_key=ApiKey \
      --gemini_process=MacronJokeColuche \
      --gemini_prompt 'MacronJokeColuche=Invente-moi une blague \
        dans le style de Coluche sur Emmanuel Macron. Pas besoin \
        de dire "D\'accord, voici une blague" ou "Bien sûr, \
        voici une blague dans le style de Coluche sur Emmanuel \
        Macron" avant la blague.' \
      --gemini_img_path "MacronJokeColuche='/my/path/to/image.png'" \
      --gemini_img_alt "MacronJokeColuche='Caricature de Coluche \
        disant : « C’est l’histoire d’un mec… » avec une caricature \
        de macron'" \

  # Spread Gemini searching for real time weather on Mastodon
  # NB: usually prompts are defined in configuration file along
  # with api_key, while --gemini-process is passed on command line
  # to choose which prompt to process
  $ spread-revolutionary-date \
      --targets=Mastodon \
      --msgmaker=Gemini \
      --gemini_api_key=ApiKey \
      --gemini_process=MeteoParis \
      --gemini_prompt 'MeteoParis=Quelle est la météo aujourd\'hui \
        à Paris, avec la température, selon meteo-paris.com, ne devine \
        pas, va chercher l\'information.' \
      --gemini_search "MeteoParis=1"

  # Spread Gemini generating a list of celebrities with an url
  # prepended by an introdution on Mastodon
  # NB: usually prompts are defined in configuration file along
  # with api_key, while --gemini-process is passed on command line
  # to choose which prompt to process
  $ spread-revolutionary-date \
      --targets=Mastodon \
      --msgmaker=Gemini \
      --gemini_api_key=ApiKey \
      --gemini_process=FamousBirthday \
      --gemini_prompt 'FamousBirthday=Which famous people \
        have their birthday on $month_name $day? Give a list of up \
        to 6 people, then after the list give the unformatted URL of \
        the Wikipedia page of only one of them, no comments and no need \
        for an introduction like "Here are some famous people".' \
      --gemini_intro 'FamousBirthday=Famous people born on $month_name \
        $day for better or for worse:'

=head1 CONFIGURATION

Once again: you B<have to> configure C<spread-revolutionary-date> with credentials for registered account on each of the desired targets and also for I<Gemini> message maker, so it can spread the revolutionary date or an IA generated message on behal...

Configuration options may also be specified as command line parameters, see L</"COMMAND LINE PARAMETERS"> below, which take precedence on options of the configuration file.

The configuration file should lie on C<~/.config/spread-revolutionary-date/spread-revolutionary-date.conf> or C<~/.spread-revolutionary-date.conf>. In case a file is found on both paths, the second one is ignored. The configuration file should use th...

=head2 General options

These options should appear outside of any section of the configuration file.

=head3 targets

This option can be specified multiple times, with values as strings. It explicitly defines targets where the revolutionary date should be spread to. Any value set for this option should be a valid target: any of the five default targets (C<Mastodon>,...

=head3 msgmaker

This option can only be specified once, with a value as string. Spreads a message computed by the class defined by the value of this option, defaults to C<RevolutionaryDate>. The C<Value> (case sensitive) of this option should correspond to an existi...

=head3 locale

This option can only be specified once, with a value as string. Spreads with chosen language. As of L<App::SpreadRevolutionaryDate> 0.11 locale is limited to C<'fr'>, C<'en'>, C<'it'> or C<'es'> for C<RevolutionaryDate> and C<'fr'>, C<'en'>, C<'it'>,...

=head3 test

This boolean option takes no value, either it is defined or not. If defined, do not actually spread the revolutionary date, just print it on standard output for C<Mastodon>, C<Bluesky> and C<Twitter>, and send it on configured test channels for C<Lib...

=head2 Mastodon options

These options are credentials for C<spread-revolutionary-date> to spread on a Mastodon account. You have to get them from your L<Mastodon instance API account|https://mstdn.fr/settings/applications> with C<write> scope. Note that Mastodon is a decent...

=head3 instance

This option can only be specified once, with a value as string: the domain name of your instance, eg: C<mastodon.social>, C<mstdn.fr>, etc.

=head3 client_id

This option can only be specified once, with a value as string: your Mastodon Client key for this application.

=head3 client_secret

This option can only be specified once, with a value as string: your Mastodon Client secret for this application.

=head3 access_token

This option can only be specified once, with a value as string: your Mastodon Access token for this application.

=head2 Bluesky options

These options are credentials for C<spread-revolutionary-date> to spread on a Bluesky account. You have to get them from your L<Bluesky account|https://bsky.app/>. They should be defined in the C<[bluesky]> section of the configuration file.

=head3 identifier

This option can only be specified once, with a value as string: your Bluesky identifier (ending with C<.bsky.social> by default).

=head3 password

This option can only be specified once, with a value as string: your Bluesky password. You can define a special password for this application, in order to not use your main Bluesky password in your L<Bluesky account settings|https://bsky.app/settings...

=head2 Twitter options

These options are credentials for C<spread-revolutionary-date> to spread on a Twitter account. You have to get them from your L<Twitter API account|https://apps.twitter.com/> with C<write> access level. They should be defined in the C<[twitter]> sect...

=head3 consumer_key

This option can only be specified once, with a value as string: your Twitter Consumer API key for this application.

=head3 consumer_secret

This option can only be specified once, with a value as string: your Twitter Consumer API secret key for this application.

=head3 access_token

This option can only be specified once, with a value as string: your Twitter Access token for this application.

=head3 access_token_secret

This option can only be specified once, with a value as string: your Twitter Access token secret for this application.

=head2 Liberachat options

The first two options are credentials for C<spread-revolutionary-date> to spread on a Liberachat account. See L<https://libera.chat/guides/registration> to find out how to register an account on Liberachat. They should be defined in the C<[liberachat...

=head3 nickname

This option can only be specified once, with a value as string: your Liberachat nickname.

=head3 password

This option can only be specified once, with a value as string: your Liberachat password.

=head3 channels

This option can be specified multiple times, with values as strings. C<spread-revolutionary-date> will spread on every channel specified with this option. This option should be specified at least one time if L</test> option is not set. It is ignored ...

=head3 test_channels

This option can be specified multiple times, with values as strings. C<spread-revolutionary-date> will spread on every channel specified with this option. This option should be specified at least one time if L</test> option is set. It is ignored if L...

=head2 Freenode options

The first two options are credentials for C<spread-revolutionary-date> to spread on a Freenode account. See L<https://freenode.net/kb/answer/registration> to find out how to register an account on Freenode. They should be defined in the C<[freenode]>...

=head3 nickname

This option can only be specified once, with a value as string: your Freenode nickname.

=head3 password

This option can only be specified once, with a value as string: your Freenode password.

=head3 channels

This option can be specified multiple times, with values as strings. C<spread-revolutionary-date> will spread on every channel specified with this option. This option should be specified at least one time if L</test> option is not set. It is ignored ...

=head3 test_channels

This option can be specified multiple times, with values as strings. C<spread-revolutionary-date> will spread on every channel specified with this option. This option should be specified at least one time if L</test> option is set. It is ignored if L...

=head2 RevolutionaryDate options

These options change the way revolutionary date is computed when  L</msgmaker> option is C<RevolutionaryDate>. They should be defined in the C<[revolutionarydate]> section of the configuration file.

=head3 acab

This boolean option takes no value, either it is defined or not, defaults to C<false>. If defined, instead of spreading the current date and time, pretend that decimal time is 1:31:20 (which corresponds to 03:08:56 UTC, 04:08:56 Paris winter time, or...

=head3 wikipedia_link

This boolean option takes no value, either it is defined or not, defaults to C<true>. If defined, a link to the wikipedia page, in language defined by the L<locale> option, corresponding to the feast of the day, is added to the date to be spread.

=head2 PromptUser options

If L</msgmaker> option is C<PromptUser>, instead of spreading the revolutionary date, prompts the user (with confirmation) for the message to be spread, with a default value (if user enters nothing when prompted).

=head3 default

This option can only be specified once, with a value as string. If C<default> option is set, the user is not prompted and this default message is spread. If C<default> option is not defined, the default message is C<'Goodbye old world, hello revoluti...

=head3 img_path (for PromptUser)

This option can only be specified once, with a value as string valued by a path to an image file on local disk. The C<img_path> option should be defined in the C<[PromptUser]> section of the configuration file. It is only used if L</msgmaker> option ...

=head3 img_alt (for PromptUser)

This option can only be specified once, with a value as string valued by an alternative text to an image file specified by C<img_path> or C<img_url> options. The C<img_alt> option should be defined in the C<[PromptUser]> section of the configuration ...

=head3 img_url (for PromptUser)

This option can only be specified once, with a value as string valued by an external url to a remote image. The C<img_url> option should be defined in the C<[PromptUser]> section of the configuration file. It is only used if L</msgmaker> option is C<...

=head2 Gemini options

If L</msgmaker> option is C<Gemini>, instead of spreading the revolutionary date, requests I<Gemini> AI to generate a text from a prompt.

=head3 api_key

This option can only be specified once, with a value as string: your I<Gemini> API key. You have to get it following instructions on L<https://ai.google.dev/gemini-api/docs/api-key>. The C<api_key> option should be defined in the C<[Gemini]> section ...

=head3 process

This option can only be specified once, with a value as string, telling which L</prompt> and other options below should be send to I<Gemini> AI. The C<process> option should be defined in the C<[Gemini]> section of the configuration file. It is only ...

bin/spread-revolutionary-date  view on Meta::CPAN

This option can be specified for several prompts, each one with a key as a string, valued by the string configured for L</process> options above, and a value as string valued by the prompt to send to I<Gemini> AI. The C<prompt> option should be defin...

=head3 intro

This option can be specified for several prompts, each one with a key as a string, valued by the string configured for L</process> options above, and a value as string to prepend to I<Gemini> answer. The C<intro> option should be defined in the C<[Ge...

=head3 search

This option can be specified for several prompts, each one with a key as a string, valued by the string configured for L</process> options above, and a true value, telling I<Gemini> AI to use grounded sources (inline supporting links) and I<Google Se...

=head3 img_path (for Gemini)

This option can be specified for several prompts, each one with a key as a string, valued by the string configured for L</process> options above, and a value as string valued by a path to an image file on local disk. The C<img_path> option should be ...

=head3 img_alt (for Gemini)

This option can be specified for several prompts, each one with a key as a string, valued by the string configured for L</process> options above, and a value as string valued by an alternative text to an image file specified by C<img_path> or C<img_u...

=head3 img_url (for Gemini)

This option can be specified for several prompts, each one with a key as a string, valued by the string configured for L</process> options above, and a value as string valued by an external url to a remote image. The C<img_url> option should be defin...

=head1 COMMAND LINE PARAMETERS

Any command line parameter, other than the first three ones below, takes precedence on the corresponding option specified on the confiuration file, see L</CONFIGURATION> above.

=head2 Command line only parameters

=head3 --conf=<file> | -c <file>

Use C<E<lt>fileE<gt>> path as configuration file, instead of the default ones, see L</CONFIGURATION> above.

=head3 --version | -v

Prints out the version of C<spread-revolutionary-date>.

=head3 --help | -h | -?

Prints out help with command line parameters.

=head2 General parameters

=head3 --targets=<target> | -tg <target>

Same as L</targets> configuration option above.

=head3 --msgmaker=<MsgMakerClass> | -mm <MsgMakerClass>

Same as L</msgmaker> configuration option above.

=head3 --locale=<fr|en|it|es> | -l <fr|en|it|es>

Same as L</locale> configuration option above.

=head3 --test | --no | -n

Same as L</test> configuration option above.

=head2 Mastodon parameters

These parameters specify credentials for C<spread-revolutionary-date> to spread on a Mastodon account. You have to get them from your L<Mastodon instance API account|https://mstdn.fr/settings/applications> with C<write> scope. Note that Mastodon is a...

=head3 --mastodon_instance=<instance> | -mi <instance>

Same as L</instance> configuration option above.

=head3 --mastodon_client_id=<id> | -mci <id>

Same as L</client_id> configuration option above.

=head3 --mastodon_client_secret)<secret> | -mcs <secret>

Same as L</client_secret> configuration option above.

=head3 --mastodon_access_token=<token> | -mat <token>

Same as L</access_token> configuration option above.

=head2 Bluesky parameters

These parameters specify credentials for C<spread-revolutionary-date> to spread on a Bluesky account. You have to get them from your L<Bluesky account|https://bsky.app/>.

=head3 --bluesky_identifier=<identifier> | -bi <identifier>

Same as L</identifier> configuration option above.

=head3 --bluesky_password=<password> | -bp <password>

Same as L</password> configuration option above.

=head2 Twitter parameters

These parameters specify credentials for C<spread-revolutionary-date> to spread on a Twitter account. You have to get them from your L<Twitter API account|https://apps.twitter.com/> with C<write> access level.

=head3 --twitter_consumer_key=<key> | -tck <key>

Same as L</consumer_key> configuration option above.

=head3 --twitter_consumer_secret=<secret> | -tcs <secret>

Same as L</consumer_secret> configuration option above.

=head3 --twitter_access_token=<token> | -tat <token>

Same as L</access_token> configuration option above.

=head3 --twitter_access_token_secret=<token secret> | -tats <token secret>

Same as L</access_token_secret> configuration option above.

=head2 Liberachat parameters

The first two parameters are credentials for C<spread-revolutionary-date> to spread on a Liberachat account. See L<https://libera.chat/guides/registration> to find out how to register an account on Liberachat.

=head3 --liberachat_nickname=<nick> | -ln <nick>

Same as L</nickname> configuration option above.

=head3 --liberachat_password=<passwd> | -lp <passwd>

Same as L</password> configuration option above.

=head3 --liberachat_channels=<channel> | -lc <channel>

Same as L</channels> configuration option above.

=head3 --liberachat_test_channels=<channel> | -ltc <channel>

Same as L</test_channels> configuration option above.

=head2 Freenode parameters

The first two parameters are credentials for C<spread-revolutionary-date> to spread on a Freenode account. See L<https://freenode.net/kb/answer/registration> to find out how to register an account on Freenode.

=head3 --freenode_nickname=<nick> | -fn <nick>

Same as L</nickname> configuration option above.

=head3 --freenode_password=<passwd> | -fp <passwd>

Same as L</password> configuration option above.

=head3 --freenode_channels=<channel> | -fc <channel>

Same as L</channels> configuration option above.

=head3 --freenode_test_channels=<channel> | -ftc <channel>

Same as L</test_channels> configuration option above.

=head2 RevolutionaryDate parameters

=head3 --revolutionarydate_acab | -ra

Same as L</acab> configuration option above.

=head3 --revolutionarydate_wikipedia_link

Same as L</wikipedia_link> configuration option above.

=head2 PromptUser parameters

=head3 --promptuser_default <msg> | -pud <msg>

Same as L</default> configuration option above.

=head3 --promptuser_img_path <path/to/image/file> | -pui </path/to/image/file>

Same as L</img_path (for PromptUser)> configuration option above.

=head3 --promptuser_img_alt <alternative text> | -pua <alternative text>

Same as L</img_alt (for PromptUser)> configuration option above.

=head3 --promptuser_img_url <img_url> | -puu <img_url>

Same as L</img_url> (for PromptUser) configuration option above.

=head2 Gemini parameters

=head3 --gemini_api_key <api key> | -ga <api key>

Same as L</api_key> configuration option above.

=head3 --gemini_process <SomePrompt> | -g <SomePrompt>

Same as L</process> configuration option above.

=head3 --gemini_prompt "<SomePrompt>=<my prompt string>" | -gp "<SomePrompt>=<my prompt string>"

Same as L</process> configuration option above.

=head3 --gemini_intro "<SomePrompt>=<intro msg>" | -gi "<SomePrompt>=<intro msg>"

bin/spread-revolutionary-date  view on Meta::CPAN

Then, you have to add a hook, being called before C<Moose> constructor, so to pass as an additional argument to C<Moose> constructor, an instance of your C<worker> class as C<obj> attribute of your new target class. You may need some configuration pa...

  around BUILDARGS => sub {
    my ($orig, $class) = @_;
    my $args = $class->$orig(@_);
    my $args->{obj} = My::Worker::Class->new(worker_param => $args->{worker_param});
    return $args;
  }

Starting from version 0.39, you may have noticed that C<Mastodon> and C<Bluesky> targets can now spread not only a text message, but also an image, with an alternative text for accessibily purpose. If the alternative text is not provided, it is set w...

This feature is not available now for I<IRC> targets, C<Liberachat> and C<Freenode>, since theses targets are mostly for text messages.

Also, we do not plan to extend this feature to C<Twitter> target, since we recommand to not use this social network for political reasons.

Starting from version 0.45, C<Mastodon> and C<Bluesky> classes have a C<max_lenght> attribute (set to 300 for C<Mastodon> and set to 250 for C<Bluesky>), which is used to split a longer message into a thread of multiple posts. Again, we do not plan t...

=head1 EXTENDING TO NEW MESSAGE MAKERS

It is even easier to spread whatever you want instead of the revolutionary date. You should write a new class in the C<App::SpreadRevolutionaryDate::MsgMaker::> namespace (that is: the class should be C<App::SpreadRevolutionaryDate::MsgMaker::MyMsgMa...

The name of the message maker should be set as a value of the L</msgmaker> option.

Such a message maker class is actually just a wrapper. Usually a message maker has to use an existing specific module (which can be a C<Moose> class or not) to craft the message. L<App::SpreadRevolutionaryDate::MsgMaker::RevolutionaryDate> uses L<Dat...

If your new message maker class needs specific parameters (other than C<locale>, which comes with  L<App::SpreadRevolutionaryDate::MsgMaker> role), they should be defined as attributes of this class. Values for such attributes should be set in the L<...

Have a look to L<App::SpreadRevolutionaryDate::MsgMaker::PromptUser> or L<App::SpreadRevolutionaryDate::MsgMaker::Telechat> classes, they show simple examples on how to extend C<spread-revolutionary-date> to a new message maker.

=head2 Gemini message maker

From version 0.45, a new message maker is included which requests I<Gemini> AI. This allows to extend C<spread-revolutionary-date> just by configuring a few options. The most practical way to configure these options is to prepare everything by settin...

This way, you can setup different prompts in your configuration file. Here is an example with 4 different prompts configured:

  [Gemini]
  # See https://ai.google.dev/gemini-api/docs/api-key
  api_key                      = 'GEMINI_API_KEY'
  prompt   FamousBirthday      = 'Which famous people have their birthday on $month_name $day? Give a list of up to 6 people, then after the list give the unformatted URL of the Wikipedia page of only one of them, no comments and no need for an intro...
  intro    FamousBirthday      = 'FamousBirthday=Famous people born on $month_name $day for better or for worse:'

  prompt   MacronJokeColuche   = 'Invente-moi une blague dans le style de Coluche sur Emmanuel Macron. Pas besoin de dire "D\'accord, voici une blague" ou "Bien sûr, voici une blague dans le style de Coluche sur Emmanuel Macron" avant la blague.'
  img_path MacronJokeColuche   = '/usr/local/share/perl/5.32.1/auto/share/dist/App-SpreadRevolutionaryDate/images/coluche_macron.png'
  img_alt  MacronJokeColuche   = 'Caricature de Coluche disant : « C’est l’histoire d’un mec… » avec une caricature de macron'

  prompt   BlanquiRevival      = 'Invente-moi un dicton révolutionnaire dans le style d\'Auguste Blanqui. Ne fais pas d\'introduction.'
  img_url  BlanquiRevival      = 'https://example.com/imgs/my_image.jgp'

  prompt   MeteoParis          = 'Quelle est la météo aujourd\'hui à Paris, avec la température, selon meteo-paris.com, ne devine pas, va chercher l\'information.'
  search   MeteoParis          =  1

and, then choose the prompt to use at execution time, like:

  $ spread-revolutionary-date --msgmaker=Gemini --gemini_process=FamousBirthday --locale=en
  $ spread-revolutionary-date --msgmaker=Gemini --gemini_process=MacronJokeColuche
  $ spread-revolutionary-date --msgmaker=Gemini --gemini_process=BlanquiRevival
  $ spread-revolutionary-date --msgmaker=Gemini --gemini_process=MeteoParis

These examples show how you can tweak your message to be spread. Let's review all these options:

First, you have to define credentials to use the I<Gemini API>, by defining the L</api_key> option. For this you need to get a I<Gemini API key>, by following instructions on L<https://ai.google.dev/gemini-api/docs/api-key>.

Then for each prompt, you have to choose an identifier, which is one word in camel case, like C<FamousBirthday>, C<MacronJokeColuche>, C<BlanquiRevival> or C<MeteoParis>. This prompt identifier should be the value of the C<< --gemini_process <ThisPro...

All other options are relative to one particular prompt, and therefore prefixed with the corresponding identifier. Under the hood, these options are hashes keyed with prompt identifiers:

=over

=item L</prompt>

This is the option where you can define your prompt. It is advised to test this prompt to have I<Gemini> answer as you wish. For instance, I<Gemini> often start its answers to your prompt by: “Sure, here is ‘what you've asked for’, and you woul...

You can test your prompt with interactive form to I<Gemini> at L<https://gemini.google.com/app> or with C<spread-revolutionary-date> with options C<--test> and C<--targets=Mastodon> for example.

The spread message will be I<Gemini> answer, optionally prepended with a configured introduction (see bellow), and ending with hashtags C<#IAGenerated> C<#PromptIdentifier>.

Prompts often need to mention informations relative to today, such as the C<FamousBirthday> example below, or it could be that you wanna ask I<Gemni> for today's weather, or traffic jams occuring the same day of the week as today, etc. As a syntactic...

  'Which famous people have their birthday on June 21? Give a list of up to 6 people, then after the list give the unformatted URL of the Wikipedia page of only one of them, no comments and no need for an introduction like "Here are some famous peopl...

You should be careful that such variables are not interpreted by the C<Shell> before calling C<spread-revolutionary-date>, specially if specified as command line parameters. You can prevent such intepretation by the C<Shell> by enclosing the option i...

=item L</intro>

You may want that the spread message to start with your own introducing words before displaying I<Gemini> answer. You can specify this with the L</intro> option.

Likewise, this option use the same syntactic sugar relative to methods of L<DateTime> module. For example, the message spread on June 21st by the C<FamousBirthday> example bellow, would be something like

  Famous people born on June 21 for better or for worse:
  First Name
  Second Name
  Third Name
  Fourth Name
  Fifth Name
  Sixth Name

  https://en.wikipedia.org/wiki/Third_Name
  #IAGenerated #FamousBirthday

=item L</search>

I<Gemini> answer is based on data that have been used to train the AI. But sometimes you want accurate answers grounded on some real time searches. In this case, you should specify the L</search> option with a true value, and I<Gemini> answers will b...

This is used in the C<MeteoParis> example bellow, to have I<Gemini> search for today's weather in Paris from C<meteo-paris.com> website.

=item L</img_path>

This option allows to add a local image on the spread message.

=item L</img_alt>

This option specifies an alternative text to an image added on the spread message. If unset, the alternative text will be the name of the file specified in L</img_path> or L</img_url> options.

=item L</img_url>

This option allows to add a remote image on the spread message.

=back

Finally, one word of localization: you don't need it, since I<Gemini> will answer in the language you've used in your prompt. Or you can ask in your prompt to be answered in another language, like:



( run in 1.409 second using v1.01-cache-2.11-cpan-8f98c5d2c55 )