diff options
| author | foswret <foswret@posteo.com> | 2025-12-11 20:22:55 -0600 |
|---|---|---|
| committer | foswret <foswret@posteo.com> | 2025-12-11 20:22:55 -0600 |
| commit | de77826633fc128b915e999a9adf10f088b4d3f3 (patch) | |
| tree | 65cbe77d7c04cc7fc3bb84a64e6b80889675a0d8 | |
| parent | 0ea73247a8ba4036567a9dc28b6133d4b58507b3 (diff) | |
added src/, updated README.md
| -rw-r--r-- | .gitignore | 1 | ||||
| -rw-r--r-- | 0.pdf | bin | 5500 -> 5505 bytes | |||
| -rw-r--r-- | Makefile | 4 | ||||
| -rw-r--r-- | README | 11 | ||||
| -rw-r--r-- | README.md | 16 | ||||
| -rw-r--r-- | src/color.h (renamed from color.h) | 0 | ||||
| -rw-r--r-- | src/date.h (renamed from date.h) | 0 | ||||
| -rw-r--r-- | src/draw.c (renamed from draw.c) | 0 | ||||
| -rw-r--r-- | src/draw.h (renamed from draw.h) | 0 | ||||
| -rw-r--r-- | src/main.c (renamed from main.c) | 6 |
10 files changed, 22 insertions, 16 deletions
@@ -2,3 +2,4 @@ output 0.pdf main.o draw.o +TODO Binary files differ@@ -1,5 +1,6 @@ CC = cc -OBJS = draw.o main.o +DIR = src +OBJS = $(DIR)/draw.o $(DIR)/main.o CAIROI = `pkg-config --cflags -libs cairo cairo-pdf` .PHONY: clean all @@ -9,5 +10,6 @@ all: output output: $(OBJS) $(CC) $(CAIROI) -o output $(OBJS) + clean: -rm -f $(OBJS) output @@ -1,11 +0,0 @@ -calp: Generate elegant, printable calendars -=========================================== - -calp (CALendar-Print) is a command line tool that allows for the creation of calendars that can be printed. It aims to be highly customizable, with support for holidays, alternative color formatting, alternative calendar systems, month-specific images, various paper formats, and more. - -calp is written in C and utilizes the cairo library. All calculations relating to weekdays and holiday dates are done internally, meaning no programs like cal are used as a dependency. As such, if you find a bug, please create an issue on GitHub. - -Install -======= - - diff --git a/README.md b/README.md new file mode 100644 index 0000000..8e6b231 --- /dev/null +++ b/README.md @@ -0,0 +1,16 @@ +# Calp +`calp` attempts to generate clear and attractive calendars that can be printed. + +# Dependencies +- `cairo` +- `pkg-config` + +# Build +- `make` + +# Planned Features +- Arguments (`getopts`) +- Holidays +- Moon Phases +- Month Art +- Custom layout file parsing (config files) @@ -16,11 +16,10 @@ #include "date.h" #include "draw.h" - // int main (int argc, char *argv[]) { int main (void) { /* Dimension initialization */ - int rows = 5; /* Number of weeks in a month */ + int rows = 6; /* Number of weeks in a month */ int columns = 7; /* Number of days in a week */ double margin = 0.5; /* 0.5" */ int number_of_days = 28; @@ -83,12 +82,11 @@ int main (void) { cairo_scale(cr, 72, 72); - set_color(cr, "BLACK"); + set_color(cr, "GRAY"); cairo_set_line_width (cr, 0.03); draw_calendar(cr, month_origin_x, month_origin_y, dim); - set_color(cr, "GRAY"); draw_numbers(cr, month_origin_x, month_origin_y, dim, day.tm_wday, number_of_days); draw_month_name(cr, months[1], dim); |
