From ee01e05bc968a66d4a2581bf2dd28f73584d1057 Mon Sep 17 00:00:00 2001 From: foswret Date: Sat, 13 Dec 2025 14:00:00 -0600 Subject: did some stuff --- .gitignore | 4 ++-- Makefile | 6 ++++-- README.md | 12 ++++++++++++ output.pdf | Bin 15902 -> 15883 bytes src/calp.c | 5 ++++- src/calp.o | Bin 14008 -> 14008 bytes 6 files changed, 22 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 50f0bac..acf1090 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,5 @@ calp -0.pdf -main.o +output.pdf +calp.o draw.o TODO diff --git a/Makefile b/Makefile index a1f017c..cd8ef21 100644 --- a/Makefile +++ b/Makefile @@ -3,15 +3,17 @@ PREFIX = /usr/local CC = cc DIR = src OBJS = $(DIR)/draw.o $(DIR)/calp.o $(DIR)/date.o -LIBS = -lcairo .PHONY: clean all install +FLAGS = `pkg-config --cflags pangocairo` +LIBS = `pkg-config --libs pangocairo` + CFLAGS = -O2 -g -Wall -Werror -Wextra -Winit-self -Wuninitialized -pedantic all: calp calp: $(OBJS) - $(CC) $(LIBS) -o calp $(OBJS) + $(CC) $(FLAGS) -o calp $(OBJS) $(LIBS) clean: -rm -f $(OBJS) calp diff --git a/README.md b/README.md index 21ab165..352eac3 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,7 @@ calp attempts to generate dry and attractive calendars that can be printed. It i # Dependencies - `cairo` - `gcc` +- `git` # Install ``` @@ -15,9 +16,20 @@ make clean install # Uninstall - `make uninstall` +# Usage +``` +# BASIC +calp # Generate 12-month calendar with default options +``` + # Planned Features +- Toy Font API --> Pango Backend - Arguments (`getopts`) +- Various International Paper Size Support - Custom layout file parsing (config files) - Holidays (.csv files) - Month Art - Moon Phases + +# Contact +If you have a comment or concern, please contact me through my email [here](https://foswret.com/about/). If you have a change you'd like to make to the code, I can create a mirror GitHub repository to ease collaborative development. diff --git a/output.pdf b/output.pdf index a2bf164..d3cecd2 100644 Binary files a/output.pdf and b/output.pdf differ diff --git a/src/calp.c b/src/calp.c index d18498d..977d24e 100644 --- a/src/calp.c +++ b/src/calp.c @@ -11,6 +11,8 @@ #include #include +//#include + /* calp Libraries */ #include "color.h" #include "date.h" @@ -19,6 +21,7 @@ // int main (int argc, char *argv[]) { int main (void) { // Dimension initialization + //PangoLayout *layout; int rows = 6; // Number of weeks in a month int columns = 7; // Number of days in a week int months_in_year = 12; @@ -54,7 +57,7 @@ int main (void) { }; // If year is a leap year, isleap(year) = 1, and will be added to February. - int year = 2028; + int year = 1943; int days_in_month[12] = {31, 28 + isleap(year), 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; diff --git a/src/calp.o b/src/calp.o index 19c2195..7a15239 100644 Binary files a/src/calp.o and b/src/calp.o differ -- cgit v1.2.3