pal(1)
hey bestie ๐ welcome to pal(1) โ the calendar situation that's about to change your whole terminal life. she's a General Commands Manual girlie and she SERVES. let's get into it ๐ซถ
โจ NAME โจ
pal โ calendar with events. that's it. that's the whole vibe. a calendar, but she remembers stuff for you ๐
๐ธ SYNOPSIS ๐ธ
pal [options]
๐ฆ DESCRIPTION ๐ฆ
okay so pal is a command-line calendar utility. literally what that means: she displays a cal(1)-like calendar, and then โ this is the iconic part โ she also displays the events you wrote in your text files. calendar plus your actual life. main character energy fr fr ๐
๐ OPTIONS ๐
here's every single flag, no gatekeeping. the following options are provided by pal:
-ddate โ show events on the given date ๐๏ธ. the valid formats for date include:dd,mmdd,yyyymmdd,'yesterday','today','tomorrow','n days away','n days ago', first two letters of weekday,'next 'followed by first two letters of weekday,'last 'followed by first two letters of weekday,'1 Jan 2000','Jan 1 2000'.-rn โ display events occurring in the next n days (counting today) โจ. by default, n is0and no events are displayed. for example, using-r 1makespaldisplay events occurring today. and if-dis used too, the range is relative to date instead of the current date. noted ๐-rp-n โ display a list of events occurring in the past p days (not counting today) and the next n days (counting today) ๐. for example-r 1-1will show yesterday's and today's events. if-dis used too, the range is relative to date instead of the current date. same deal, just with a lil time travel in both directions ๐ฐ๏ธ-sregex โ search for any occurrences of an event matching the regular expression (regex) occurring in the range of dates specified with-r๐. this command searches both the event description and the type of event (specified at the top of a calendar file). this search is case insensitive. slay.-xn โ expunge events that are n or more days old if they do not occur again in the future ๐งน. important:palwill not expunge events from the calendars loaded from/usr/share/palโ even if you are root and you have added events to the calendars that are not recurring. when-xis used with-v, the events that are expunged will be displayed. so you can watch them go ๐-cn โ display a calendar with n lines (default:5) ๐.-ffile โ load file instead of~/.pal/pal.conf๐.-uusername โ load/home/username/.pal/pal.confinstead of~/.pal/pal.conf๐ .-ppalfile โ override the.palfiles loaded frompal.conf. this will only load palfile. for convenience, if palfile is a relative path,pallooks for the file relative from~/.pal/, if not found, it tries relative to/usr/share/pal/, if not found it tries relative to your current directory. (this behavior might change in the future.) using an absolute path will work as you expect it to. ๐งญ-mโ manage events interactively ๐๏ธ. events can be added, modified and deleted with this interface. very hands-on, very demure.--colorโ force use of colors, regardless of terminal type ๐.--nocolorโ do not use colors, regardless of terminal type ๐ซ๐จ.--mailโ generates output readable bysendmailby adding"From:"and"Subject:"fields and forcing--nocolor๐ง. for example, you could mail yourself a reminder of the upcoming events in the next week withpal --mail -r 7 | sendmail username. Note: for the calendar to appear correctly, make sure your email client is using a fixed width font. no cap, the fonts matter here.--htmlโ generates a HTML calendar suitable for display on a web page ๐. it does not generate a complete HTML document, so that you can add your website's header and footer around the calendar. the number of months shown on the calendar can be adjusted with-c. you will need to use Cascading Style Sheets (CSS) to change how the calendar appears; if you do not use a style sheet, the calendar will not have any borders. see/usr/share/doc/pal/examples/example.cssfor an example style.
๐จ SECURITY NOTE: if you set uppalso it is being executed server-side, it is recommended that you do not allow web page visitors to directly change the parameters sent topal. allowing users to pass strange parameters (such as extremely long ones) can be a security risk. bestie please lock that down ๐
--latexโ generates a LaTeX source for a calendar that can be used to generate a printer-friendly DVI (runpal --latex > file.tex; latex file.tex), PostScript or PDF (runpal --latex > file.tex; pdflatex file.tex) ๐โจ. the number of months shown on the calendar can be adjusted with-c. academic girlies stay winning ๐-vโ verbose output ๐ฃ๏ธ.--versionโ display version information โน๏ธ.-h,--helpโ display a help message ๐.
๐ EVENT DESCRIPTIONS ๐
๐ Years since year YYYY
pal will replace !YYYY! (where YYYY is a year) with the current year minus YYYY ๐งฎ. this feature is particularly useful for birthdays. for example, the event text for a birthday could be: John Doe was born on this day in 1990. He is !1990! years old. โ and yes she'll do the math for you, you're welcome ๐
โฐ Sort by time
if events have a time in the event description, pal will sort these events by time ๐. the time in the event description must be of the format h:mm or hh:mm (where hh is 0-23). if an event has more than one time in the event description, pal will sort the event by the first time. events that do not have times in them are shown before all the events that do have times. events without times are sorted in the order that they are loaded in pal.conf. chronological queen ๐
๐พ FILE FORMATS ๐พ
Okay so unless -f or -u is used, pal looks for (or tries to create if it doesn't exist) a configuration file named ~/.pal/pal.conf. That pal.conf holds settings for pal plus a list of other files that contain events to be displayed on the calendar. The file formats for pal.conf and the event files are described below. ๐ซถ
๐ pal.conf ๐
filefilename [(color)] โ Loads an event file named filename. If filename isn't found in~/.pal, pal will look for it in/usr/share/pal. The color parameter is optional, it will display the events in the file with the given color. Valid colors:black,red,green,yellow,blue,magenta,cyan,white.file_hidefilename [(color)] โ Loads an event file name filename. These events are not indicated in the calendar that is printed, but they are displayed when the-rargument is used. If filename isn't found in~/.pal, pal will look for it in/usr/share/pal. The color parameter is optional, it will display the events in the file with the given color. Valid colors:black,red,green,yellow,blue,magenta,cyan,white.event_colorcolor โ The default color used for events. Valid colors:black,red,green,yellow,blue,magenta,cyan,white.week_start_mondayโ If this keyword is defined, the calendar weeks start on Monday instead of Sunday.date_fmtstring โ Changes how dates are displayed when the-r,-d, or-sarguments are used. string can be a date format string that follows the format used bystrftime(3). Typeman strftimefor more information. string is set to%a %e %b %Yby default (example:Sun 8 Aug 2010).reverse_orderโ Display all event listings in descending order.hide_event_typeโ Hide the event type (shown in before a':') when listing events. The event type is defined at the top of the file that the event is found in.cal_on_bottomโ Display calendar at the end of the output.no_columnsโ Display calendar in one column instead of two.compact_listโ List events that are shown when using-rin a more compact form.compact_date_fmtโ Format for the date displayed whencompact_listis used. Seedate_fmtfor more information.default_rangerange โ If you get tired of always using-r, you can set the default value for-rhere. See the information on-rabove to see possible values for range. Note: Remember that this will affect what is displayed when-dand-sare used too.
๐ Event Files ๐
Event files are ASCII or UTF-8 text files (usually with a .pal ending) that define events for pal to show. Example event files can be found in /usr/share/pal. The first line in these files indicate settings that apply to all of the events in the file. The first line starts with two characters that should be used in the calendar that pal displays. A longer description of the kinds of events in the file follows the two characters. This description will be displayed when the -r argument is used. All other lines in the file are in the format date event. date defines when the event occurs and event is a string that describes the event. Below is a description of the different strings that can be used with date:
- Events that occur only once โ Use the format
yyyymmdd. - Daily events โ The format
DAILYcan be used for an event that happens every day. - Weekly events โ The format
MON,TUE,WED,THU,FRI,SATandSUNcan be used for an event that happens every week. - Monthly events โ Use the format
000000dd. - Annual events โ Use the format
0000mmdd. - Annual: Events that occur on the Nth day of a month. โ Use the format
*mmnd. Wheredis the day (1= Sunday,7= Saturday). Example:*1023(10=Oct;2="second";3=Tuesday==> Second Tuesday in October, every year). - Monthly: Events that occur on the Nth day of a month. โ Use the format
*00nd. Wheredis the day (1= Sunday,7= Saturday). Example:*0023(2="second";3=Tuesday==> Second Tuesday of every month). - Annual: Events that occur on a certain last day of a month โ Use the format
*mmLd. Example:*10L3(10=Oct;L=Last;3=Tuesday==> Last Tuesday in October). This is useful for some holidays. - Monthly: Events that occur on a certain last day of a month โ Use the format
*00Ld. Example:*00L3(3=Tuesday==> Last Tuesday of every month). - Todo events โ The format
TODOcan be used for an event that always happens on the day that you run pal. This enables you to use pal to keep track of items in your todo list(s). - Easter related events โ Use the format
Easterfor Easter Sunday. Use the formatEaster+nnnfor events that occurnnndays after Easter. Use the formatEasterโnnnfor events that occurnnndays before easter. - Recurring events with start and end dates โ If a recurring event has a starting date and an ending date, you can use the date format
DATE:START:ENDwhereDATEis a recurring date format above.STARTandENDare dates in theyyyymmddformat that specify the starting and ending date of the recurring event.STARTandENDdates are inclusive. For example, if an event happens every Wednesday in October 2010, you could use this format:WED:20101001:20101031 - Bi-weekly, Bi-annual, etc. events โ If a recurring event does only occurs every Nth occurence, you can add a
/Nto the event of the date string for that event. A start date must be specified. For example, a bi-monthly event that occurs on the first of the month can be specified as00000001/2:20000101.
๐ INTERNATIONALIZATION AND LOCALIZATION ๐
The calendar files that pal uses must be ASCII encoded or UTF-8 encoded text files (ASCII is a subset of UTF-8). UTF-8 enables the calendar files to work on any system regardless of the default encoding scheme. When pal prints text, it converts the UTF-8 characters into the local encoding for your system. If pal does not display international characters and you are using a UTF-8 calendar file, check to make sure that your locale is set correctly. You can see your locale settings by running locale. You can see the character set that pal is using for output by running pal with -v. If pal does not have a translation for your language and you are interested in creating a translation, see the po/README file that is distributed with the source code for pal.
๐ FILES ๐
~/.pal/pal.conf: Contains configuration information for pal and a list of.paltext files that contain events./etc/pal.conf: Thispal.conffile is copied to~/.pal/pal.confwhen a user runs pal for the first time./usr/share/pal: Contains several calendar files for pal.
๐ BUGS ๐
Bugs may be reported via http://palcal.sourceforge.net/.
๐ SEE ALSO ๐
๐ SIMILAR PROGRAMS ๐
pal is similar to BSD's calendar program and GNU's more complex gcal program.
๐ AUTHORS ๐
Scott Kuhl
And thatโs the whole pal(1) page, bestie! The footerโs source/version/date stamp is just pal(1) โ so Iโm not copy-pasting that line, Iโm blowing it a kiss. ๐โจ
๐ฆ where this page comes from
- debian bookworm: pal 0.4.3-8.1+b5
- debian trixie: pal 0.4.3-11 ยท GPL-2.0-or-later
- ubuntu jammy: pal 0.4.3-8.1build4
- ubuntu noble: pal 0.4.3-9build2 ยท GPL-2.0-or-later
- ubuntu questing: pal 0.4.3-11
- ubuntu resolute: pal 0.4.3-12 ยท GPL-2.0-or-later
- ubuntu stonking: pal 0.4.3-12 ยท GPL-2.0-or-later
- Copyright (c) 2004--2006, Scott Kuhl
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms