summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoryuzu-eva <cafebabe@disroot.org>2025-04-11 17:44:49 +0200
committeryuzu-eva <cafebabe@disroot.org>2025-04-11 17:44:49 +0200
commit59c01a556ada289caa143be8301868035fcf89ef (patch)
treed7ae06d29b9f5c3af6e083d2563177d49b73bd2f
parenta56994fbaea532e2d2314aeeb917c30031c29f08 (diff)
renamed project to libman since it's for more than just anime
-rw-r--r--.gitignore2
-rw-r--r--Makefile14
-rw-r--r--README.md41
3 files changed, 30 insertions, 27 deletions
diff --git a/.gitignore b/.gitignore
index 27c573e..0028175 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,4 +4,4 @@ old_main.c
*.db
*.o
-myal
+libman
diff --git a/Makefile b/Makefile
index d42e755..ffbf78f 100644
--- a/Makefile
+++ b/Makefile
@@ -11,27 +11,27 @@ CFLAGS = -Wall -Wextra
LIBS = -lsqlite3
SRC = main.c dbhandling.c
OBJ = ${SRC:.c=.o}
-BIN = myal
+BIN = libman
all: options ${BIN}
options:
- @echo myal build options:
+ @echo ${BIN} build options:
@echo "CFLAGS = ${CFLAGS}"
@echo "CC = ${CC}"
.c.o:
${CC} -c ${CFLAGS} ${SRC}
-myal: .c.o
- ${CC} ${CFLAGS} ${LIBS} ${OBJ} -o myal
+libman: .c.o
+ ${CC} ${CFLAGS} ${LIBS} ${OBJ} -o ${BIN}
install:
- ${INSTALL_PROGRAM} myal ${PREFIX}${BINDIR}/myal
+ ${INSTALL_PROGRAM} ${BIN} ${PREFIX}${BINDIR}/${BIN}
clean:
- ${RM} myal
+ ${RM} ${BIN}
${RM} ${OBJ}
uninstall:
- ${RM} /usr/local/bin/myal
+ ${RM} ${PREFIX}/${BINDIR}/${BIN}
diff --git a/README.md b/README.md
index 291a913..2c08995 100644
--- a/README.md
+++ b/README.md
@@ -1,17 +1,17 @@
-# myal - My Anime Library
+# libman - Library Manager
## Overview
-My Anime Library is a CLI-Tool to manage an anime and manga list.
-I used to track which anime I have watched and what episode I'm on by writing in
-a text file, which got annoying after a while.
-This is why I created this tool to keep anime and manga organized in a sqlite3
-database.
+Library Manager is a CLI-Tool to manage a library of anime and manga.
+I used to track which anime I have watched and what episode I'm on by
+writing in a text file, which got annoying after a while.
+This is why I created this tool to keep everything organized in a
+sqlite3 database.
## Quickstart
-You need a database with tables `anime` and `manga`. Attached in this repo
-is a setup script for the database. Simply execute
+You need a database with tables `anime` and `manga`. Attached in this
+repo is a setup script for the database. Simply execute
```
sqlite3 library.db <db-setup.sql
```
@@ -20,12 +20,13 @@ This will create the following tables:
anime(ID integer pk, NAME text, EPISODE text, STATUS text)
manga(ID integer pk, NAME text, CHAPTER text, STATUS text)
-Chapters and episodes are stored as text, because sometimes the chapter isn't
-just a number but rather in the form "Volume 6 Chapter 4", shortened to "V6CH4".
-When I'm done with an anime or manga, I set the episode or chapter to 0 and set
-the status to "done".
+Chapters and episodes are stored as text, because sometimes the chapter
+isn't just a number but rather in the form "Volume 6 Chapter 4",
+shortened to "V6CH4". When I'm done with an anime or manga, I set the
+episode or chapter to 0 and set the status to "done".
-The database file is expected to be in "~/.local/share/sqlite/library.db".
+The database file is expected to be in
+"~/.local/share/sqlite/library.db".
To compile, do
```bash
make
@@ -41,8 +42,10 @@ sudo make install
## Usage
Currently there are 3 modes:
-- get, which retrieves one or more anime or manga by the given name argument
-- set, which updates the episode or chapter and/or the status of a given entry
+- get, which retrieves one or more anime or manga by the given name
+argument
+- set, which updates the episode or chapter and/or the status of a given
+entry
- add, which adds a new entry to a given table
Here are examples for each mode:
@@ -52,11 +55,11 @@ myal get anime jojo
```
```
-myal set manga "Nikubami Honegishimi" 3
-myal set anime "Lucky Star" done
-myal set anime "Durarara!!" 13 "watching"
+libman set manga "Nikubami Honegishimi" 3
+libman set anime "Lucky Star" done
+libman set anime "Durarara!!" 13 "watching"
```
```
-myal add anime "Detective Conan" 1 "not started"
+libman add anime "Detective Conan" 1 "not started"
```