aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfoswret <foswret@posteo.com>2025-12-13 14:00:00 -0600
committerfoswret <foswret@posteo.com>2025-12-13 14:00:00 -0600
commitee01e05bc968a66d4a2581bf2dd28f73584d1057 (patch)
treeb7025454295025078a13071705373a34fedce73f
parent4b18819e5f34358cab1bf1c1514d443421d7968c (diff)
did some stuff
-rw-r--r--.gitignore4
-rw-r--r--Makefile6
-rw-r--r--README.md12
-rw-r--r--output.pdfbin15902 -> 15883 bytes
-rw-r--r--src/calp.c5
-rw-r--r--src/calp.obin14008 -> 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
--- a/output.pdf
+++ b/output.pdf
Binary files 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 <cairo/cairo-pdf.h>
#include <cairo/cairo.h>
+//#include <pango/pangocairo.h>
+
/* 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
--- a/src/calp.o
+++ b/src/calp.o
Binary files differ