aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--0.pdfbin5500 -> 5505 bytes
-rw-r--r--Makefile4
-rw-r--r--README11
-rw-r--r--README.md16
-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
diff --git a/.gitignore b/.gitignore
index 66e5391..73283e0 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,3 +2,4 @@ output
0.pdf
main.o
draw.o
+TODO
diff --git a/0.pdf b/0.pdf
index a4a8dcc..0157847 100644
--- a/0.pdf
+++ b/0.pdf
Binary files differ
diff --git a/Makefile b/Makefile
index a53e318..67861a0 100644
--- a/Makefile
+++ b/Makefile
@@ -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
diff --git a/README b/README
deleted file mode 100644
index 069f555..0000000
--- a/README
+++ /dev/null
@@ -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)
diff --git a/color.h b/src/color.h
index e2b4cc0..e2b4cc0 100644
--- a/color.h
+++ b/src/color.h
diff --git a/date.h b/src/date.h
index 4ff3d32..4ff3d32 100644
--- a/date.h
+++ b/src/date.h
diff --git a/draw.c b/src/draw.c
index 51f9367..51f9367 100644
--- a/draw.c
+++ b/src/draw.c
diff --git a/draw.h b/src/draw.h
index 7c473a7..7c473a7 100644
--- a/draw.h
+++ b/src/draw.h
diff --git a/main.c b/src/main.c
index 51fb86d..6d76a6d 100644
--- a/main.c
+++ b/src/main.c
@@ -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);