aboutsummaryrefslogtreecommitdiffstats
path: root/doc/manual.txt
blob: 6c75f530183cc4d2225e8556000e2497714559d0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
////
/*
 * Copyright (c) 2004-2017 calcurse Development Team <misc@calcurse.org>
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 *
 *      - Redistributions of source code must retain the above
 *        copyright notice, this list of conditions and the
 *        following disclaimer.
 *
 *      - Redistributions in binary form must reproduce the above
 *        copyright notice, this list of conditions and the
 *        following disclaimer in the documentation and/or other
 *        materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
////

CALCURSE - text-based organizer
===============================

Abstract
--------

This manual describes `calcurse` functionalities, and how to use them. The
installation from source is first described, together with the available
command line arguments. The user interface is then presented, with all of the
customizable options that change `calcurse` behavior. Last, bug reporting
procedure is explained, as well as the way one can contribute to `calcurse`
development.

Introduction
------------

`calcurse` is a text-based calendar and scheduling application. It helps
keeping track of events, appointments and everyday tasks.  A configurable
notification system reminds user of upcoming deadlines, and the curses based
interface can be customized to suit user needs.  All of the commands are
documented within an online help system.

Overview
--------

Creation history
~~~~~~~~~~~~~~~~

Frederic started thinking about this project when he was finishing his Ph.D. in
Astrophysics as it started to be a little hard to organize himself and he
really needed a good tool for managing his appointments and todo list.
Unfortunately, he finished his Ph.D. before finishing `calcurse` but he
continued working on it, hoping it would be helpful to other people.

In mid-2010, Lukas took over development of `calcurse` and is now the main
contributor and reviewer of patches.

But why `calcurse` anyway?  Well, it is simply the concatenation of *cal*endar
and *curse*s, the name of the library used to build the user interface.

Important features
~~~~~~~~~~~~~~~~~~

`Calcurse` is multi-platform and intended to be lightweight, fast and reliable.
It is to be used inside a console or terminal, locally or on a distant machine
within an ssh (or similar) connection.

`Calcurse` can be run in two different modes : interactive or non-interactive
mode. The first mode allows oneself to view its own personal organizer almost
everywhere, thanks to the text-based interface.  The second mode permits to
easily build reminders just by adding `calcurse` with appropriate command line
arguments inside a cron tab or within a shell init script.

Moreover, `calcurse` was created with the end-user in mind, and tends to be as
friendly as possible. This means a complete on-line help system, together with
having all of the possible actions displayed at any time inside a status bar.
The user interface is configurable, and one can choose between several color
and layout combinations.  Key bindings are also configurable, to fit everyone's
needs.  Last, a configurable notification system reminds user of upcoming
appointments. The reminders are sent even if the user's interface is not
running, as calcurse is able to run in background.

Installation
------------

Requirements
~~~~~~~~~~~~

ncurses library
^^^^^^^^^^^^^^^

`Calcurse` requires only a `C` compiler, such as `cc` or `gcc`, and the
`ncurses` library.  It would be very surprising not to have a valid `ncurses`
library already installed on your computer, but if not, you can find it at the
following url: http://ftp.gnu.org/pub/gnu/ncurses/

NOTE: It is also possible to link `calcurse` against the `ncursesw` library
      (ncurses with support for unicode).

[[install_requirements_gettext]]
gettext library
^^^^^^^^^^^^^^^

`calcurse` supports internationalization (*i18n* hereafter) through the
`gettext` utilities. This means `calcurse` can produce multi-lingual messages
if compiled with native language support (i.e. *NLS*).

However, *NLS* is optionnal and if you do not want to have support for
multi-lingual messages, you can disable this feature.  This is done by giving
the `--disable-nls` option to `configure` (see section
<<install_process,Install process>>).  To check if the `gettext` utilities are
installed on your system, you can search for the `libintl.h` header file for
instance:

----
$ locate libintl.h
----

If this header file is not found, then you can obtain the `gettext` sources at
the following url : http://ftp.gnu.org/pub/gnu/gettext/

NOTE: Even if `libintl.h` is found on your system, it can be wise to specify
      its location during the <<install_process,install process>>, by using the
      `--with-libintl-prefix` option with `configure`. Indeed, the `configure`
      could fail to locate this library if installed in an uncommon place.

[[install_process]]
Install process
~~~~~~~~~~~~~~~

First you need to gunzip and untar the source archive:

----
$ tar zxvf calcurse-4.5.0.tar.gz
----

Once you meet the requirements and have extracted the archive, the install
process is quite simple, and follows the standard three steps process:

----
$ ./configure
$ make
$ make install    # (may require root privilege)
----

Use `./configure --help` to obtain a list of possible options.

calcurse basics
---------------

Invocation
~~~~~~~~~~

[[basics_invocation_commandline]]
Command line arguments
^^^^^^^^^^^^^^^^^^^^^^

`calcurse` takes the following options from the command line (both short and
long options are supported):

`-a, --appointment`::
  Print the appointments and events for the current day and exit. Equivalent to
  `-Q --filter-type cal`. The calendar from which to read the  appointments can
  be specified using the `-c` flag.

`-c <file>, --calendar <file>`::
  Specify the calendar file to use. The default calendar is `~/.calcurse/apts`
  (see section <<basics_files,calcurse files>>). This option has precedence
  over `-D`.

`-d <date|num>, --day <date|num>`::
  Print the appointments for the given date  or  for  the given  number  of
  upcoming days, depending on the argument format. Two possible formats are
  supported:
+
--
  * a date (possible formats described below).
  * a number `n`.
--
+
In the first  case,  the  appointment  list  for  the specified  date will be
returned, while in the second case the appointment list for the `n`  upcoming
days will be returned.  As an example, typing `calcurse -d  3`  will  display
your  appointments  for  today, tomorrow, and the day after tomorrow.
The first form is equivalent to `-Q --filter-type cal --from <date>`, the
second form is equivalent to `-Q --filter-type cal --days <num>`.
+
Note: as for the `-a` flag, the calendar  from which to  read  the appointments
can be specified using the `-c` flag.

`--daemon`::
  Start calcurse in background mode. Restart if the daemon was already running.
  See <<basics_daemon,Background mode>> for details.

`--days <num>`::
  Specify the length of the range (in days) when used with `-Q`. Cannot be
  combined with `--to`.

`-D <dir>, --directory <dir>`::
  Specify the data directory to use. If not specified, the default directory is
  `~/.calcurse/`.

`--filter-type <type>`::
  Ignore any items that do not match the type mask. See
  <<basics_filters,Filters>> for details.

`--filter-pattern <pattern>`::
  Ignore any items with a description that does not match the pattern. See
  <<basics_filters,Filters>> for details.

`--filter-start-from <date>`::
  Ignore any items that start before a given date. See
  <<basics_filters,Filters>> for details.

`--filter-start-to <date>`::
  Ignore any items that start after a given date. See
  <<basics_filters,Filters>> for details.

`--filter-start-after <date>`::
  Only include items that start after a given date. See
  <<basics_filters,Filters>> for details.

`--filter-start-before <date>`::
  Only include items that start before a given date. See
  <<basics_filters,Filters>> for details.

`--filter-start-range <range>`::
  Only include items within a given range. See <<basics_filters,Filters>> for
  details.

`--filter-end-from <date>`::
  Ignore any items that end before a given date. See <<basics_filters,Filters>>
  for details.

`--filter-end-to <date>`::
  Ignore any items that end after a given date. See <<basics_filters,Filters>>
  for details.

`--filter-end-after <date>`::
  Only include items that end after a given date. See
  <<basics_filters,Filters>> for details.

`--filter-end-before <date>`::
  Only include items that end before a given date. See
  <<basics_filters,Filters>> for details.

`--filter-end-range <range>`::
  Only include items within a given range. See <<basics_filters,Filters>> for
  details.

`--filter-priority <priority>`::
  Only include items with a given priority. See <<basics_filters,Filters>> for
  details.

`--filter-completed`::
  Only include completed TODO items. See <<basics_filters,Filters>> for
  details.

`--filter-uncompleted`::
  Only include uncompleted TODO items. See <<basics_filters,Filters>> for
  details.

`--format-apt <format>`::
  Specify a format to control the output of appointments in non-interactive
  mode. See the <<basics_format_strings,Format strings>> section for detailed
  information on format strings.

`--format-recur-apt <format>`::
  Specify a format to control the output of recurrent appointments in
  non-interactive mode. See the <<basics_format_strings,Format strings>>
  section for detailed information on format strings.

`--format-event <format>`::
  Specify a format to control the output of events in non-interactive mode. See
  the <<basics_format_strings,Format strings>> section for detailed information
  on format strings.

`--format-recur-event <format>`::
  Specify a format to control the output of recurrent events in non-interactive
  mode. See the <<basics_format_strings,Format strings>> section for detailed
  information on format strings.

`--format-todo <format>`::
  Specify a format to control the output of todo items in non-interactive mode.
  See the <<basics_format_strings,Format strings>> section for detailed
  information on format strings.

`--export-uid`::
  When exporting items, add the hash of each item to the exported object as an
  UID property.

`-F`, `--filter`::
  Read items from the data files and write them back. The filter interface can
  be used to drop specific items. Be careful with this option, specifying a
  wrong filter might result it data loss! It is highly recommended to test the
  effect of filters with -G first. See also: <<basics_filters,Filters>>.

`--from <date>`::
  Specify the start date of the range when used with `-Q`.

`-g, --gc`::
  Run the garbage collector for note files and exit.

`-G, --grep`::
  Print appointments and TODO items using the calcurse data file format. The
  filter interface can be used to further restrict the output. See also:
  <<basics_filters,Filters>>.

`-h, --help`::
  Print  a  short  help  text  describing  the  supported command-line options,
  and exit.

`-i <file>, --import <file>`::
  Import the icalendar data contained in `file`.

`-l <num>, --limit <num>`::
  Limit the number of results printed to 'num'.

`--dump-imported`::
  When importing items, print each newly created object to stdout. Format
  strings can be used to specify which details are printed. See also:
  <<basics_format_strings,Format strings>>.

`-n, --next`::
  Print the next appointment within upcoming 24 hours and exit.  The indicated
  time is the number of hours and minutes left before this appointment.
+
Note: the calendar from which to read the appointments can be specified using
the `-c` flag.

`-q`, `--quiet`::
  Be quiet. Do not show system dialogs.

`-Q, --query`::
  Print all appointments inside a given query range, followed by all TODO
  items. The query range defaults to the current day and can be changed by
  using the `--from` and `--to` (or `--days`) parameters. The filter interface
  can be used to further restrict the output. See also:
  <<basics_filters,Filters>>.

`-r[num], --range[=num]`::
  Print events and appointments for the num number of days and exit. If no num
  is given, a range of 1 day is considered. Equivalent to `-Q --filter-type cal
  --days <num>`.

`--read-only`::
  Don't save configuration nor appointments/todos.
+
WARNING: Use this this with care! If you run an interactive calcurse instance
in read-only mode, all changes from this session will be lost without warning!

`-s[date], --startday[=date]`::
  Print  events  and appointments from date and exit.  If no date is given, the
  current day is considered. Equivalent to `-Q --filter-type cal --from
  <date>`.

`-S<regex>, --search=<regex>`::
  When used with the `-a`, `-d`, `-r`, `-s`, or `-t` flag, print only the items
  having a description that matches the given regular expression. Equivalent to
  `-Q --filter-pattern <regex>`.

`--status`::
  Display  the  status of running instances of calcurse. If calcurse is
  running, this will tell  if  the  interactive mode  was  launched  or  if
  calcurse is running in background.  The process pid will also be indicated.

`-t[num], --todo[=num]`::
  Print the `todo` list and exit. If the optional number `num` is given, then
  only uncompleted todos having a priority equal to `num` will be returned. The
  priority number must be between 1 (highest) and 9 (lowest). It is also
  possible to specify `0` for the priority, in which case only completed tasks
  will be shown. Equivalent to `-Q --filter-type todo`, combined with
  `--filter-priority` and `--filter-completed` or `--filter-uncompleted`.

`--to <date>`::
  Specify the end date of the range when used with `-Q`. Cannot be combined
  with `--days`.

`-v, --version`::
  Display `calcurse` version and exit.

`-x[format], --export[=format]`::
  Export user data to specified format. Events, appointments and todos are
  converted and echoed to stdout.  Two possible formats are available: ical and
  pcal (see section <<links_others,Links>> below).  If the optional
  argument `format` is not given, ical format is selected by default.
+
Note: redirect standard output to export data to a file, by issuing a command
such as:
+
----
$ calcurse --export > my_data.dat
----

NOTE: The `-N` option has been removed in calcurse 3.0.0. See the
<<basics_format_strings,Format strings>> section on how to print note along
with appointments and events.

[[basics_filters]]
Filters
^^^^^^^

Filters can be used to restrict the set of items which are loaded from the
appointments file when using calcurse in non-interactive mode. The following
filters are currently supported:

`--filter-hash <pattern>`::
  Only include items with a hash starting with the specified pattern. The
  pattern can be inverted by prepending an exclamation mark (`!`).

`--filter-type <type>`::
  Ignore any items that do not match the type mask. The type mask is a
  comma-separated list of valid type descriptions which include `event`, `apt`,
  `recur-event`, `recur-apt` and `todo`. You can also use `recur` as a
  shorthand for `recur-event,recur-apt` and `cal` as a shorthand for
  `event,apt,recur`.

`--filter-pattern <pattern>`::
  Ignore any items with a description that does not match the pattern. The
  pattern is interpreted as extended regular expression.

`--filter-start-from <date>`::
  Ignore any items that start before a given date.

`--filter-start-to <date>`::
  Ignore any items that start after a given date.

`--filter-start-after <date>`::
  Only include items that start after a given date.

`--filter-start-before <date>`::
  Only include items that start before a given date.

`--filter-start-range <range>`::
  Only include items with a start date that falls within a given range. A range
  consists of a start date and an end date, separated by a comma.

`--filter-end-from <date>`::
  Ignore any items that end before a given date.

`--filter-end-to <date>`::
  Ignore any items that end after a given date.

`--filter-end-after <date>`::
  Only include items that end after a given date.

`--filter-end-before <date>`::
  Only include items that end before a given date.

`--filter-end-range <range>`::
  Only include items with an end date that falls within a given range. A range
  consists of a start date and an end date, separated by a comma.

`--filter-priority <priority>`::
  Only include items with a given priority.

`--filter-completed`::
  Only include completed TODO items.

`--filter-uncompleted`::
  Only include uncompleted TODO items.

[[basics_format_strings]]
Format strings
^^^^^^^^^^^^^^

Format strings are composed of printf()-style format specifiers -- ordinary
characters are copied to stdout without modification. Each specifier is
introduced by a `%` and is followed by a character which specifies the field to
print. The set of available fields depends on the item type.

Format specifiers for appointments
++++++++++++++++++++++++++++++++++

`s`::
  Print the start time of the appointment as UNIX time stamp
`S`::
  Print the start time of the appointment using the `hh:mm` format
`d`::
  Print the duration of the appointment in seconds
`e`::
  Print the end time of the appointment as UNIX time stamp
`E`::
  Print the end time of the appointment using the `hh:mm` format
`m`::
  Print the description of the item
`n`::
  Print the name of the note file belonging to the item
`N`::
  Print the note belonging to the item

Format specifiers for events
++++++++++++++++++++++++++++

`m`::
  Print the description of the item
`n`::
  Print the name of the note file belonging to the item
`N`::
  Print the note belonging to the item

Format specifiers for todo items
++++++++++++++++++++++++++++++++

`p`::
  Print the priority of the item
`m`::
  Print the description of the item
`n`::
  Print the name of the note file belonging to the item
`N`::
  Print the note belonging to the item

Examples
++++++++

`calcurse -r7 --format-apt='- %S -> %E\n\t%m\n%N'`::
  Print appointments and events for the next seven days. Also, print the notes
  attached to each regular appointment (simulates `-N` for appointments).

`calcurse -r7 --format-apt=' - %m (%S to %E)\n' --format-recur-apt=' - %m (%S to %E)\n'`::
  Print appointments and events for the next seven days and use a custom format
  for (recurrent) appointments: ` - Some appointment (18:30 to 21:30)`.

`calcurse -t --format-todo '(%p) %m\n'`::
  List all todo items and put parentheses around the priority specifiers.

Extended format specifiers
++++++++++++++++++++++++++

Extended format specifiers can be used if you want to specify advanced
formatting options. Extended specifiers are introduced by `%(` and are
terminated by a closing parenthesis (`)`). The following list includes all
short specifiers and corresponding long options:

* `s`: `(start)`
* `S`: `(start:epoch)`
* `e`: `(end)`
* `E`: `(end:epoch)`
* `d`: `(duration)`
* `r`: `(remaining)`
* `m`: `(message)`
* `n`: `(noteid)`
* `N`: `(note)`
* `p`: `(priority)`

The `(start)` and `(end)` specifiers support strftime()-style extended
formatting options that can be used for fine-grained formatting. Additionally,
the special formats `epoch` (which is equivalent to `(start:%s)` or `(end:%s)`)
and `default` (which is mostly equivalent to `(start:%H:%M)` or `(end:%H:%M)`
but displays `..:..` if the item doesn't start/end at the current day) are
supported.

The `(remaining)` and `(duration)` specifiers support a subset of the
strftime()-style formatting options, along with two extra qualifiers.
The supported options are `%d`, `%H`, `%M` and `%S`, and by default each
of these is zero-padded to two decimal places. To avoid the
zero-padding, add `-` before the formatting option (for example, `%-d`).
Additionally, the `E` option will display the total number of time units
until the appointment, rather than showing the remaining number of time
units modulo the next larger time unit. For example, an appointment in
50 hours will show as 02:00 with the formatting string `%H:%M`, but will
show 50:00 with the formatting string `%EH:%M`. Note that if you are
combining the `-` and `E` options, the `-` must come first. The default
format for the `(remaining)` specifier is `%EH:%M`.

There are two additional long format specifiers that do not have any
corresponding short options. They can be used to print an item's hash or its
internal representation and were designed to be used for scripting:

* `(hash)`
* `(raw)`

[[basics_invocation_variable]]
Environment variable for i18n
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

`calcurse` can be compiled with native language support (see
<<install_requirements_gettext,gettext library>>). Thus, if you wish to have
messages displayed into your native language, first make sure it is available
by looking at the `po/LINGUAS` file.  This file indicates the set of available
languages by showing the two-letters corresponding code (for exemple, *fr*
stands for french).  If you do not find your language, it would be greatly
appreciated if you could help translating `calcurse` (see the <<contribute,How
to contribute?>> section).

If your language is available, run `calcurse` with the following command:

----
$ LC_ALL=fr_FR calcurse
----

... where *fr_FR* is the locale name in this exemple, but should be replaced by
the locale corresponding to the desired language.

You should also specify the charset to be used, because in some cases the
accents and such are not displayed correctly.  This charset is indicated at the
beginning of the po file corresponding to the desired language. For instance,
you can see in the fr.po file that it uses the iso-8859-1 charset, so you could
run `calcurse` using the following command:

----
$ LC_ALL=fr_FR.ISO8859-1 calcurse
----

Other environment variables
^^^^^^^^^^^^^^^^^^^^^^^^^^^

The following environment variables affect the way `calcurse` operates:

`VISUAL`::
  Specifies the external editor to use for writing notes.

`EDITOR`::
  If the `VISUAL` environment variable is not set, then `EDITOR` will be used
  as the default external editor. If none of those variables are set, then
  `/usr/bin/vi` is used instead.

`PAGER`::
  Specifies the default viewer to be used for reading notes.  If this variable
  is not set, then `/usr/bin/less` is used.

Hooks
~~~~~

You can place scripts in `$HOME/.calcurse/hooks/` to trigger actions at certain
events. To enable a hook, add a script with one of the following names to this
directory. Also make sure the scripts are executable.

*pre-load*::
  Executed before the data files are loaded.
*post-load*::
  Executed after the data files are saved.
*pre-save*::
  Executed before the data files are loaded.
*post-save*::
  Executed after the data files are saved.

Some examples can be found in the `contrib/hooks/` directory of the calcurse
source tree.

User interface
~~~~~~~~~~~~~~

Non-interactive mode
^^^^^^^^^^^^^^^^^^^^

When called with at least one of the following arguments: `-a`, `-d`, `-h`,
`-n`, `-t`, `-v`, `-x`, `calcurse` is started in non-interactive mode.  This
means the desired information will be displayed, and after that, `calcurse`
simply quits and you are driven back to the shell prompt.

That way, one can add a line such as `calcurse --todo --appointment` in its
init config file to display at logon the list of tasks and appointments
scheduled for the current day.

[[basics_interface_interactive]]
Interactive mode
^^^^^^^^^^^^^^^^

NOTE: Key bindings that are indicated in this manual correspond to the default
      ones, defined when `calcurse` is launched for the first time. If those
      key bindings do not suit user's needs, it is possible to change them
      within the keys configuration menu (see <<options_keys,key bindings>>).

When called without any argument or only with the `-c` option, `calcurse` is
started in interactive mode. In this mode, you are shown an interface
containing three different panels which you can browse using the `TAB` key,
plus a notification bar and a status bar (see figure below).

----
 appointment panel---.                                   .---calendar panel
                     |                                   |
                     v                                   v
 +------------------------------------++----------------------------+
 |          Appointments              ||          Calendar          |
 |------------------------------------||----------------------------|
 |                 (|)  April 6, 2006 ||         April 2006         |
 |                                    ||Mon Tue Wed Thu Fri Sat Sun |
 |                                    ||                      1   2 |
 |                                    ||  3   4   5   6   7   8   9 |
 |                                    || 10  11  12  13  14  15  16 |
 |                                    || 17  18  19  20  21  22  23 |
 |                                    || 24  25  26  27  28  29  30 |
 |                                    ||                            |
 |                                    |+----------------------------+
 |                                    |+----------------------------+
 |                                    ||            ToDo            | todo
 |                                    ||----------------------------| panel
 |                                    ||                            |   |
 |                                    ||                            |   |
 |                                    ||                            |<--.
 |                                    ||                            |
 +------------------------------------++----------------------------+
 |---[ Mon 2006-11-22 | 10:11:43 ]---(apts)----> 01:20 :: lunch <---|<--.
 +------------------------------------------------------------------+ notify-bar
 | ? Help     R Redraw    H/L -/+1 Day      G GoTo       C Config   |
 | Q Quit     S Save      J/K -/+1 Week   Tab Chg View              |<-.
 +------------------------------------------------------------------+  |
                                                                       |
                                                                 status bar
----

The first panel represents a calendar which allows to highlight a particular
day, the second one contains the list of the events and appointments on that
day, and the last one contains a list of tasks to do but which are not assigned
to any specific day.

Depending on the selected view, the calendar could either display a monthly
(default as shown in previous figure) or weekly view.  The weekly view would
look like the following:

----
+------------------------------------+
|              Calendar              |
|----------------------------(# 13)--|
|    Mon Tue Wed Thu Fri Sat Sun     |
|     29  30  31  01  02  03  04     |
|                               <----+--  slice 1: 00:00 to 04:00 AM
|       --  --  --  --  --  --       |
|                               <----+--  slice 2: 04:00 to 08:00 AM
|       --  --  --  --  --  --       |
|                               <----+--  slice 3: 08:00 to 12:00 AM
|    -  --  --  --  --  --  --  -  <-+--  midday
|                               <----+--  slice 4: 12:00 to 04:00 PM
|       --  --  --  --  --  --       |
|                               <----+--  slice 5: 04:00 to 08:00 PM
|       --  --  --  --  --  --       |
|                               <----+--  slice 6: 08:00 to 12:00 PM
+------------------------------------+
----

The current week number is displayed on the top-right side of the panel (*# 13*
meaning it is the 13th week of the year in the above example). The seven days
of the current week are displayed in column. Each day is divided into slices of
4 hours each (6 slices in total, see figure above). A slice will appear in a
different color if an appointment falls into the corresponding time-slot.

In the appointment panel, one can notice the *`(|)`* sign just in front of the
date.  This indicates the current phase of the moon.  Depending on which is the
current phase, the following signs can be seen:

`  |) `::
  first quarter

` (|) `::
  full moon

`  (| `::
  last quarter

`  |  `::
  new moon

no sign::
  Phase of the moon does not correspond to any of the above ones.

At the very bottom of the screen there is a status bar, which indicates the
possible actions and the corresponding keystrokes.

Just above this status bar is the notify-bar, which indicates from left to
right : the current date, the current time, the calendar file currently in use
(apts on the above example, which is the default calendar file, see the
following section), and the next appointment within the upcoming 24 hours. Here
it says that it will be lunch time in one hour and twenty minutes.

NOTE: Some actions, such as editing or adding an item, require to type in some
      text. This is done with the help of the built-in input line editor.

Within this editor, if a line is longer than the screen width, a `>`, `*`, or
`<` character is displayed in the last column indicating that there are more
character after, before and after, or before the current position,
respectively. The line is scrolled horizontally as necessary.

Moreover, some editing commands are bound to particular control characters.
Hereafter are indicated the available editing commands (`^` stands for the
control key):

`^a`::
  moves the cursor to the beginning of the input line

`^b`::
  moves the cursor backward

`^d`::
  deletes one character forward

`^e`::
  moves the cursor to the end of the input line

`^f`::
  moves the cursor forward

`^h`::
  deletes one character backward

`^k`::
  deletes the input from the cursor to the end of the line

`^w`::
  deletes backward to the beginning of the current word

`ESCAPE`::
    cancels the editing

[[basics_daemon]]
Background mode
~~~~~~~~~~~~~~~

When the daemon mode is enabled in the notification configuration menu (see
<<options_notify,Notify-bar settings>>), `calcurse` will stay in background
when the user interface is not running. In background mode, `calcurse` checks
for upcoming appointments and runs the user-defined notification command when
  necessary. When the user interface is started again, the daemon automatically
  stops.

`calcurse` background activity can be logged (set the `daemon.log` variable in
the notification configuration <<options_notify,menu>>), and in that case,
information about the daemon start and stop time, reminders' command launch
time, signals received... will be written in the `daemon.log` file (see section
<<basics_files,files>>).

Using the `--status` command line option (see section
<<basics_invocation_commandline,Command line arguments>>), one can know if
`calcurse` is currently running in background or not.  If the daemon is
running, a message like the following one will be displayed (the pid of the
daemon process will be shown):

----
calcurse is running in background (pid 14536)
----

NOTE: To stop the daemon, just send the `TERM` signal to it, using a command
      such as: `kill daemon_pid`, where *daemon_pid* is the process id of the
      daemon (14536 in the above example).

[[basics_files]]
calcurse files
~~~~~~~~~~~~~~

The following structure is created in your `$HOME`  directory (or in the
directory you specified with  the  -D  option) the first time `calcurse` is run
:

----
$HOME/.calcurse/
           |___notes/
           |___conf
           |___keys
           |___apts
           |___todo
----
`notes/`::
  this subdirectory contains descriptions of the notes which are attached to
  appointments, events or todos. Since the file name of each note file is a
  SHA1 hash of the note itself, multiple items can share the same note file.
  calcurse provides a garbage collector (see the `-g` command line parameter)
  that can be used to remove note files which are no longer linked to any item.
`conf`::
  this file contains the user configuration
`keys`::
  this file contains the user-defined key bindings
`apts`::
  this file contains  all  of the events and user's appointments
`todo`::
  this file contains the todo list

NOTE: If the logging of calcurse daemon activity was set in the notification
      configuration menu, the extra file `daemon.log` will appear in calcurse
      data directory. This file contains logs about calcurse activity when
      running in background.

Import/Export capabilities
~~~~~~~~~~~~~~~~~~~~~~~~~~

The import and export capabilities offered by `calcurse` are described below.

Import
^^^^^^

Data in icalendar format as described in the rfc2445 specification (see
<<links_others,links>> section below) can be imported into calcurse.  Calcurse
ical parser is based on version 2.0 of this specification, but for now on, only
a subset of it is supported.

The following icalendar properties are handled by calcurse:

* `VTODO` items: "PRIORITY", "VALARM", "SUMMARY", "DESCRIPTION"

* `VEVENT` items: "DTSTART", "DTEND", "DURATION", "RRULE", "EXDATE", "VALARM",
  "SUMMARY", "DESCRIPTION"

The icalendar `DESCRIPTION` property will be converted into calcurse format by
adding a note to the item. If a "VALARM" property is found, the item will be
flagged as important and the user will get a notification (this is only
applicable to appointments).

Here are the properties that are not implemented:

* negative time durations are not taken into account (item is skipped)

* some recurence frequences are not recognize: "SECONDLY" / "MINUTELY" /
  "HOURLY"

* some recurrence keywords are not recognized (all those starting with `BY`):
  "BYSECOND" / "BYMINUTE" / "BYHOUR" / "BYDAY" / "BYMONTHDAY" / "BYYEARDAY" /
  "BYWEEKNO" / "BYMONTH" / "BYSETPOS" plus "WKST"

* the recurrence exception keyword "EXRULE" is not recognized

* timezones are not taken into account

Export
^^^^^^

Two possible export formats are available: `ical` and `pcal` (see section
<<links_others,Links>> below to find out about those formats).

Online help
~~~~~~~~~~~

At any time, the built-in help system can be invoked by pressing the `?` key.
By default, it shows an introduction to the help system in an external pager.
You need to exit the pager in order to get back to calcurse (pressing `q`
should almost always work). The default pager can be changed by setting the
PAGER environment variable.

If you want to display help on a specific feature or key binding, type `:help
<feature>` (e.g. `:help add`) or `:help <key>` (e.g. `:help ^A`) on the main
screen.

Options
-------

All of the `calcurse` parameters are configurable from the Configuration menu
available when pressing `C`. You are then driven to a submenu with five
possible choices : pressing `C` again will lead you to the Color scheme
configuration, pressing `L` allows you to choose the layout of the main
`calcurse` screen (in other words, where to put the three different panels on
screen), pressing `G` permits you to choose between different general options,
pressing `K` opens the key bindings configuration menu, and last you can modify
the notify-bar settings by pressing `N`.

[[options_general]]
General options
~~~~~~~~~~~~~~~

These options control `calcurse` general behavior, as described below:

`appearance.compactpanels` (default: *no*)::
  In compact panels mode, all captions are removed from panels.

`appearance.defaultpanel` (default: *calendar*)::
  This can be used to specify the panel to be selected on startup.

`general.autosave` (default: *yes*)::
  This option allows to automatically save the user's data (if set to *yes*)
  when quitting.  <p class="rq"><span class="valorise">warning:</span> No data
  will be automatically saved if `general.autosave` is set to *no*.  This means
  the user must press `S` (for saving) in order to retrieve its modifications.

`general.autogc` (default: *no*)::
  Automatically run the garbage collector for note files when quitting.

`general.periodicsave` (default: *0*)::
  If different from `0`, user's data will be automatically saved every
  *general.periodicsave* minutes.  When an automatic save is performed, two
  asterisks (i.e. `**`) will appear on the top right-hand side of the screen).

`general.confirmquit` (default: *yes*)::
  If set to *yes*, confirmation is required before quitting, otherwise pressing
  `Q` will cause `calcurse` to quit without prompting for user confirmation.

`general.confirmdelete` (default: *yes*)::
  If this option is set to *yes*, pressing `D` for deleting an item (either a
  *todo*, *appointment*, or *event*), will lead to a prompt asking for user
  confirmation before removing the selected item from the list.  Otherwise, no
  confirmation will be needed before deleting the item.

`general.systemdialogs` (default: *yes*)::
  Setting this option to *no* will result in skipping the system dialogs
  related to the saving and loading of data.  This can be useful to speed up
  the input/output processes.

`general.progressbar` (default: *yes*)::
  If set to *no*, this will cause the disappearing of the progress bar which is
  usually shown when saving data to file.  If set to *yes*, this bar will be
  displayed, together with the name of the file being saved (see section
  <<basics_files,calcurse files>>).

`appearance.calendarview` (default: *0*)::
  If set to `0`, the monthly calendar view will be displayed by default
  otherwise it is the weekly view that will be displayed.

`general.firstdayofweek` (default: *monday*)::
  One can choose between Monday and Sunday as the first day of the week. If
  `general.firstdayofweek` is set to *monday*, Monday will be first in the
  calendar view. Otherwise, Sunday will be the first day of the week.

`format.outputdate` (default: *%D*)::
  This option indicates the format to be used when displaying dates in
  non-interactive mode. Using the default values, dates are displayed the
  following way: *mm/dd/aa*.  You can see all of the possible formats by typing
  `man 3 strftime` inside a terminal.

`format.inputdate` (default: *1*)::
  This option indicates the format that will be used to enter dates in
  interactive mode. Four choices are available:
+
1. mm/dd/yyyy
2. dd/mm/yyyy
3. yyyy/mm/dd
4. yyyy-mm-dd

[[options_keys]]
Key bindings
~~~~~~~~~~~~

One can define ones own key bindings within the `Keys` configuration menu. The
default keys look like the one used by the `vim` editor, especially the
displacement keys. Anyway, within this configuration menu, users can redefine
all of the keys available from within calcurse's user interface.

To define new key bindings, first highlight the action to which it will apply.
Then, delete the actual key binding if necessary, and add a new one. You will
then be asked to press the key corresponding to the new binding. It is possible
to define more than one key binding for a single action.

An automatic check is performed to see if the new key binding is not already
set for another action. In that case, you will be asked to choose a different
one. Another check is done when exiting from this menu, to make sure all
possible actions have a key associated with it.

The following keys can be used to define bindings:

* lower-case, upper-case letters and numbers, such as `a`, `Z`, `0`

* CONTROL-key followed by one of the above letters

* escape, horizontal tab, and space keys

* arrow keys (up, down, left, and right)

* `HOME` and `END` keys

While inside the key configuration menu, an online help is available for each
one of the available actions. This help briefly describes what the highlighted
action is used for.

NOTE: As of calcurse 3.0.0, displacement commands can be preceded by an
      optional number to repeat the command. For example, `10k` will move the
      cursor ten weeks forwards if you use default key bindings.

Color themes
~~~~~~~~~~~~

`calcurse` color theme can be customized to suit user's needs. To change the
default theme, the configuration page displays possible choices for foreground
and background colors.  Using arrows or calcurse displacement keys to move, and
`X` or space to select a color, user can preview the theme which will be
applied.  It is possible to keep the terminal's default colors by selecting the
corresponding choice in the list.

The chosen color theme will then be applied to the panel borders, to the
titles, to the keystrokes, and to general informations displayed inside status
bar. A black and white theme is also available, in order to support non-color
terminals.

NOTE: Depending on your terminal type and on the value of the `$TERM`
      environment variable, color could or could not be supported. An error
      message will appear if you try to change colors whereas your terminal
      does not support this feature.  If you do know your terminal supports
      colors but could not get `calcurse` to display them, try to set your
      `$TERM` variable to another value (such as *xterm-xfree86* for instance).

Layout configuration
~~~~~~~~~~~~~~~~~~~~

The layout corresponds to the position of the panels inside `calcurse` screen.
The default layout makes the calendar panel to be displayed on the top-right
corner of the terminal, the todo panel on the bottom-right corner, while the
appointment panel is displayed on the left hand-side of the screen (see the
figure in section <<basics_interface_interactive,Interactive mode>> for an
example of the default layout).  By choosing another layout in the
configuration screen, user can customize `calcurse` appearance to best suit his
needs by placing the different panels where needed.

The following option is used to modify the layout configuration:

`appearance.layout` (default: *0*)::
  Eight different layouts are to be chosen from (see layout configuration
  screen for the description of the available layouts).

Sidebar configuration
~~~~~~~~~~~~~~~~~~~~~

The sidebar is the part of the screen which contains two panels: the calendar
and, depending on the chosen layout, either the todo list or the appointment
list.

The following option is used to change the width of the sidebar:

`appearance.sidebarwidth` (default: *0*)::
  Width (in percentage, 0 being the minimum width) of the side bar.

[[options_notify]]
Notify-bar settings
~~~~~~~~~~~~~~~~~~~

The following options are used to modify the notify-bar behavior:

`appearance.notifybar` (default: *yes*)::
  This option indicates if you want the notify-bar to be displayed or not.

`format.notifydate` (default: *%a %F*)::
  With this option, you can specify the format to be used to display the
  current date inside the notification bar. You can see all of the possible
  formats by typing `man 3 strftime` inside a terminal.

`format.notifytime` (default: *%T*)::
  With this option, you can specify the format to be used to display the
  current time inside the notification bar. You can see all of the possible
  formats by typing `man 3 strftime` inside a terminal.

`notification.warning` (default: *300*)::
  When there is an appointment which is flagged as `important` within the next
  `notification.warning` seconds, the display of that appointment inside the
  notify-bar starts to blink. Moreover, the command defined by the
  `notification.command` option will be launched.  That way, the user is warned
  and knows there will be soon an upcoming appointment.

`notification.command` (default: *printf '\a'*)::
  This option indicates which command is to be launched when there is an
  upcoming appointment flagged as `important`. This command will be passed to
  the user's shell which will interpret it. To know what shell must be used,
  the content of the `$SHELL` environment variable is used. If this variable is
  not set, `/bin/sh` is used instead.
+
====
Say the `mail` command is available on the user's system, one can use the
following command to get notified by mail of an upcoming appointment (the
appointment description will also be mentioned in the mail body):

----
$ calcurse --next | mail -s "[calcurse] upcoming appointment!" user@host.com
----
====

`notification.notifyall` (default: *flagged-only*)::
  If set to flagged-only, you are only notified of flagged items. If set to
  unflagged-only, you are only notified of unflagged items. If set to all,
  notifications are always sent, independent of whether an item is flagged or
  not. For historical reasons, this option also accepts boolean values where
  yes equals flagged-only and no equals unflagged-only.

`daemon.enable` (default: *no*)::
  If set to yes, daemon mode will be enabled, meaning `calcurse` will run into
  background when the user's interface is exited. This will allow the
  notifications to be launched even when the interface is not running. More
  details can be found in section <<basics_daemon,Background mode>>.

`daemon.log` (default: *no*)::
  If set to yes, `calcurse` daemon activity will be logged (see section
  <<basics_files,files>>).

Known bugs
----------

Incorrect highlighting of items appear when using calcurse black and white
theme together with a `$TERM` variable set to *xterm-color*.  To fix this bug,
and as advised by Thomas E. Dickey (`xterm` maintainer), *xterm-xfree86* should
be used instead of *xterm-color* to set the `$TERM` variable:

____
"The xterm-color value for $TERM is a bad choice for XFree86 xterm because it
is commonly used for a `terminfo` entry which happens to not support bce. Use
the xterm-xfree86 entry which is distributed with XFree86 xterm (or the similar
one distributed with ncurses)."
____

[[bugs]]
Reporting bugs and feedback
---------------------------

Please send bug reports and feedback to: `misc .at. calcurse .dot. org`.

[[contribute]]
How to contribute?
------------------

If you would like to contribute to the project, you can first send your
feedback on what you like or dislike, and if there are features you miss in
`calcurse`.  For now on, possible contributions concern the translation of
`calcurse` messages and documentation.

Translating documentation
~~~~~~~~~~~~~~~~~~~~~~~~~

NOTE: We recently dropped all translations of the manual files from the
      distribution tarball. There are plan to reintroduce them in form of a
      Wiki on the calcurse website. Please follow the mailing lists for
      up-to-date information.

The *doc/* directory of the source package already contains translated version
of `calcurse` manual. However, if the manual is not yet available into your
native language, it would be appreciated if you could help translating it.

To do so, just copy one of the existing manual file to `manual_XX.html`, where
*XX* identifies your language. Then translate this newly created file and send
it to the author (see <<bugs,Reporting bugs and feeback>>), so that it can be
included in the next `calcurse` release.

calcurse i18n
~~~~~~~~~~~~~

As already mentioned, `gettext` utilities are used by `calcurse` to produce
multi-lingual messages. We are currently using
http://www.transifex.net/[Transifex] to manage those translations.

This section provides informations about how to translate those messages into
your native language. However, this howto is deliberately incomplete, focusing
on working with `gettext` for `calcurse` specifically.  For more comprehensive
informations or to grasp the Big Picture of Native Language Support, you should
refer to the `GNU gettext` manual at:
http://www.gnu.org/software/gettext/manual/

IMPORTANT: Since we switched to Transifex, editing *po* files is not necessary
           anymore as Transifex provides a user-friendly, intuitive web
           interface for translators. Knowledge of `gettext` and the *po*
           format is still useful for those of you who prefer the command line
           and local editing. If you want to use the web UI to edit the
           translation strings, you can skip over to <<transifex_webui,Using
           the Transifex web UI>> tough.

Basically, three different people get involved in the translation chain:
coders, language coordinator, and translators. After a quick overview of how
things work, the translator tasks will be described hereafter.

Overview
^^^^^^^^

To be able to display texts in the native language of the user, two steps are
required: *internationalization* (i18n) and *localization* (l10n).

i18n is about making `calcurse` support multiple languages. It is performed by
coders, who will mark translatable texts and provide a way to display them
translated at runtime.

l10n is about making the i18n'ed `calcurse` adapt to the specific language of
the user, ie translating the strings previously marked by the developers, and
setting the environment correctly for `calcurse` to use the result of this
translation.

So, translatable strings are first marked by the coders within the `C` source
files, then gathered in a template file (*calcurse.pot* - the *pot* extension
meaning *portable object template*). The content of this template file is then
merged with the translation files for each language (*fr.po* for French, for
instance - with *po* standing for *portable object*, ie meant to be read and
edited by humans). A given translation team will take this file, translate its
strings, and send it back to the developers. At compilation time, a binary
version of this file (for efficiency reasons) will be produced (*fr.mo* - *mo*
stands for *machine object*, i.e. meant to be read by programs), and then
installed.  Then `calcurse` will use this file at runtime, translating the
strings according to the locale settings of the user.

Translator tasks
^^^^^^^^^^^^^^^^

Suppose someone wants to initiate the translation of a new language. Here are
the steps to follow:

* First, find out what the locale name is. For instance, for french, it is
  `fr_FR`, or simply `fr`. This is the value the user will have to put in his
  `LC_ALL` environment variable for software to be translated (see
  <<basics_invocation_variable,Environment variable for i18n>>).

* Then, go into the *po/* directory, and create a new po-file
  from the template file using the following command: `msginit -i calcurse.pot
  -o fr.po -l fr --no-translator` If you do not have `msginit` installed on
  your system, simply copy the *calcurse.pot* file to *fr.po* and edit the
  header by hand.

Now, having this *fr.po* file, the translator is ready to begin.

po-files
^^^^^^^^

The format of the po-files is quite simple. Indeed, po-files are made of four
things:

1. *location lines:* tells you where the strings can be seen (name of file and
   line number), in case you need to see a bit of context.

2. *msgid lines:* the strings to translate.

3. *msgstr lines:* the translated strings.

4. *lines prefixed with `#`:* comments (some with a special meaning, as we will
   see below).

Basically, all you have to do is fill the *msgstr* lines with the translation
of the above *msgid* line.

A few notes:

*Fuzzy strings*::
  You will meet strings marked with a `"#, fuzzy"` comment. `calcurse` won't
  use the translations of such strings until you do something about them.  A
  string being fuzzy means either that the string has already been translated
  but has since been changed in the sources of the program, or that this is a
  new string for which `gettext` made a 'wild guess' for the translation, based
  on other strings in the file.  It means you have to review the translation.
  Sometimes, the original string has changed just because a typo has been
  fixed. In this case, you won't have to change anything. But sometimes, the
  translation will no longer be accurate and needs to be changed.  Once you are
  done and happy with the translation, just remove the `"#, fuzzy"` line, and
  the translation will be used again in `calcurse`.

*c-format strings and special sequences*::
  Some strings have the following comment: `"#, c-format"`.  This tells that
  parts of the string to translate have a special meaning for the program, and
  that you should leave them alone.  For instance, %-sequences, like `"%s"`.
  These means that `calcurse` will replace them with another string. So it is
  important it remains.  There are also \-sequences, like `\n` or `\t`. Leave
  them, too. The former represents an end of line, the latter a tabulation.

*Translations can be wrapped*::
  If lines are too long, you can just break them like this:
+
----
msgid ""
"some very long line"
"another line"
----

*po-file header*::
  At the very beginning of the po-file, the first string form a header, where
  various kind of information has to be filled in. Most important one is the
  charset. It should resemble
+
----
"Content-Type: text/plain; charset=utf-8\n"
----
+
You should also fill in the Last-Translator field, so that potential
contributors can contact you if they want to join you in the translation team,
or have remarks/typo fixes to give about the translations. You can either just
give your name/nick, or add an email address, for exemple:
+
----
"Last-Translator: Frederic Culot <frederic@culot.org>\n"
----

*Comments*::
  Adding comments (lines begining with the `#` character) can be a good way to
  point out problems or translation difficulties to proofreaders or other
  members of your team.

*Strings size*::
  `calcurse` is a curses/console program, thus it can be heavily dependant on
  the terminal size (number of columns). You should think about this when
  translating. Often, a string must fit into a single line (standard length is
  80 characters). Don't translate blindly, try to look where your string will
  be displayed to adapt your translation.

*A few useful tools*::
  The po-file format is very simple, and the file can be edited with a standard
  text editor.  But if you prefer, there are few specialized tools you may find
  convenient for translating:
+
* `poEdit` (http://www.poedit.org/)
* `KBabel` (http://i18n.kde.org/tools/kbabel/)
* `GTranslator` (http://gtranslator.sourceforge.net/)
* `Emacs` po mode
* `Vim` po mode

*And finally*::
  I hope you'll have fun contributing to a more internationalized world. :) If
  you have any more questions, don't hesitate to contact us at *misc .at.
  calcurse .dot. org*.

[[transifex_uploading]]
Uploading to Transifex
^^^^^^^^^^^^^^^^^^^^^^

There's several different ways to upload a finished (or semi-finished)
translation for a new language to Transifex. The easiest way is to browse to
the http://www.transifex.net/projects/p/calcurse/teams/[Translation Teams] page
and request the addition of a new team.

As soon as we accepted your request, you will be able to upload your *po* file
on the
http://www.transifex.net/projects/p/calcurse/resource/calcursepot/[calcurse
resource page] by clicking the *Add translation* button at the bottom.

Using transifex-client
^^^^^^^^^^^^^^^^^^^^^^

You can also use a command line client to submit translations instead of having
to use the web interface every time you want to submit an updated version. If
you have a recent version of `setuptools` installed, you can get the CLI client
by issuing the following command:

----
$ easy_install -U transifex-client
----

Alternatively, you can get the source code of transifex-client at
http://pypi.python.org/pypi/transifex-client.

After you downloaded and installed the client, run the following commands in
the calcurse source directory to checkout the translation resources of
*calcurse*:

----
$ tx pull -a
----

To submit changes back to the server, use:

----
$ tx push -r calcurse.calcursepot -t -l <locale>
----

For more details, read up on `transifex-client` usage at the
http://help.transifex.net/user-guide/client/[The Transifex Command-line Client
v0.4] section of the http://help.transifex.net/[Transifex documentation].

[[transifex_webui]]
Using the Transifex web UI
^^^^^^^^^^^^^^^^^^^^^^^^^^

As an alternative to editing *po* files, there is a web-based interface that
can be used to create and update translations. After having signed up and
created a new translation team (see <<transifex_uploading,Uploading to
Transifex>> on how to do that), click the *Add translation* button at the
bottom on the
http://www.transifex.net/projects/p/calcurse/resource/calcursepot/[calcurse
resource page], select the language you'd like to translate and choose
*Translate Online*.

Links
-----

This section contains links and references that may be of interest to you.

calcurse homepage
~~~~~~~~~~~~~~~~~

The `calcurse` homepage can be found at http://calcurse.org

calcurse announce list
~~~~~~~~~~~~~~~~~~~~~~

If you are interested in the project and want to be warned when a new release
comes out, you can subscribe to the `calcurse` announce list. In doing so, you
will receive an email as soon as a new feature appears in `calcurse`.

To subscribe to this list, send a message to *announce+subscribe .at. calcurse
.dot. org* with "subscribe" in the subject field.

////
calcurse RSS feed
~~~~~~~~~~~~~~~~~

Another possibility to get warned when new releases come out is to follow the
RSS feed at: http://calcurse.org/news_rss.xml

This RSS feed is updated each time a new version of calcurse is available,
describing newly added features.
////

[[links_others]]
Other links
~~~~~~~~~~~

You may want to look at the ical format specification (rfc2445) at:
http://tools.ietf.org/html/rfc2445

The pcal project page can be found at: http://pcal.sourceforge.net/

Thanks
------

Its time now to thank other people without whom this program would not exist!
So here is a list of contributing persons I would like to thank:

* Alex for its patches, help and advices with `C` programming

* Gwen for testing and general discussions about how to improve `calcurse`

* Herbert for packaging `calcurse` for FreeBSD

* Zul for packaging `calcurse` for NetBSD

* Wain, Steffen and Ronald for packaging `calcurse` for Archlinux

* Kevin, Ryan, and fEnIo for packaging `calcurse` for Debian and Ubuntu

* Pascal for packaging `calcurse` for Slackware

* Alexandre and Markus for packaging `calcurse` for Mac OsX and Darwin

* Igor for packaging `calcurse` for ALT Linux

* Joel for its calendar script which inspired `calcurse` calendar view

* Jeremy Roon for the Dutch translation

* Frédéric Culot, Toucouch, Erik Saule, Stéphane Aulery and Baptiste Jonglez
  for the French translation

* Michael Schulz, Chris M., Benjamin Moeller and Lukas Fleischer for the German
  translation

* Rafael Ferreira for the Portuguese (Brazil) translation

* Aleksey Mechonoshin for the Russian translation

* Jose Lopez for the Spanish translation

* Tony for its patch which helped improving the recur_item_inday() function,
  and for implementing the date format configuration options

* Erik Saule for its patch implementing the `-N`, `-s`, `-S`, `-r` and `-D`
  flags as well as support for regular expressions!

* Baptiste Jonglez and Lars Henriksen for their awesome work on many important
  features of calcurse!

* Randy Ramos for his improvements to the calcurse-caldav synchronization
  script.

* people who write software I like and which inspired me, especially:

  - `vim` for the displacement keys
  - `orpheus` and `abook` for documentation
  - `pine` and `aptitude` for the text user interface
  - `tmux` for coding style

And last, many many thanks to all of the `calcurse` users who sent me their
feedback.