A new feature has been added, this one is especially useful for recurring post - it allows you to add the date and/or time of the post to the title.

As an example you can use this exact post which should contain a date that looks something like 2023-10-03 23:15:00+0200 (note that the second will most likely be different, because the scheduler is not exact to the second).

This is how I’ve written the title in Lemmy Schedule: New version - add date to the post title (example: #[InjectDate(‘Y-m-d H:i:sO’)]#).

You may notice the #[InjectDate('Y-m-d H:i:sO')]# - this is an expression that will be evaluated at the time of posting. Currently only the InjectDate expression is supported and it takes exactly one parameter. If you’re a programmer, you probably recognize it, it’s a format for the date. Just beware that it uses the PHP date format which might differ slightly from your favorite language.

If you’re not a programmer, the documentation is not that hard - you see a letter (like F) and its description (A full textual representation of a month, such as January or March). When you include F in the parameter, it means it will be replaced with current month name (October). If this is too hard for you and you want it for one or few posts, tell what you want the title to look like and I’ll write it for you.

Note that there’s a preview of what the title looks like:

Preview of the Lemmy Schedule dynamic  title

You’ll also know if you’ve provided something that looks like it should be an expression but is not recognized:

Preview of the Lemmy Schedule dynamic title with invalid expression

Here are some examples:

  • Weekly discussion - week ##[InjectDate('W')]# - Weekly discussion - week #40
  • Monthly discussion - #[InjectDate('F')]# #[InjectDate('Y')]# - Monthly discussion - October 2023
  • Monthly discussion - #[InjectDate('F Y')]# - equivalent to the above, just wanted to show that you can use it multiple times
  • Daily thread - #[InjectDate('d.m.Y')]# - Daily thread - 03.10.2023

Let me know what you think!

  • Snoopy
    link
    fedilink
    English
    17 months ago

    Thank for the tutorial, i’m saving it as it wasn’t in documentation. :)

    Reminder : @snoopy@jlai.lu