Added manual
- Added manual page for ls - Added manual manager - More manual pages coming soon
This commit is contained in:
parent
023dcf2d3e
commit
f77acacd90
6 changed files with 61 additions and 4 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -12,3 +12,4 @@ sys_info.o
|
|||
show_dir.o
|
||||
change_dir.o
|
||||
update_check.o
|
||||
man.o
|
||||
|
|
@ -8,7 +8,7 @@ Tested on: *Ubuntu, Debian, Arch*
|
|||
|
||||
Used libs for Linux: *gtk+3.0, libmysqlclient*
|
||||
|
||||
Version: *0.2.3*
|
||||
Version: *0.2.4*
|
||||
|
||||
## Features:
|
||||
- A help page (OMG!!!)
|
||||
|
|
|
|||
47
etc/man/man.c
Normal file
47
etc/man/man.c
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
// Color Codes:
|
||||
// Reset: \033[0m
|
||||
// Red: \033[0;31m
|
||||
// Green: \033[0;32m
|
||||
// Yellow: \033[0;33m
|
||||
// Blue: \033[0;34m
|
||||
// Magenta: \033[0;35m
|
||||
// Cyan: \033[0;36m
|
||||
// BoldRed: \033[1;31m
|
||||
// BoldGreen: \033[1;32m
|
||||
// BoldYellow: \033[1;33m
|
||||
// BoldBlue: \033[1;34m
|
||||
// BoldMagenta: \033[1;35m
|
||||
// BoldCyan: \033[1;36m
|
||||
|
||||
//Main function to start man is at the bottom
|
||||
|
||||
//MAN ENTRIES
|
||||
//LS
|
||||
void manEntry_ls(){
|
||||
printf("\033[0;33m##################\033[0m\n");
|
||||
printf("\033[0;33m# Manual of \033[0;36m'ls' \033[0;33m#\033[0m\n");
|
||||
printf("\033[0;33m##################\033[0m\n\n");
|
||||
printf("\033[0;33mNAME\033[0m\n");
|
||||
printf("\t\033[0;36mls - list directory contents\033[0m\n\n");
|
||||
printf("\033[0;33mUSAGE\033[0m\n");
|
||||
printf("\t\033[0;36mls \033[0;35m[DIRECTORY]\033[0m\n\n");
|
||||
printf("\033[0;33mDESCRIPTION\033[0m\n");
|
||||
printf("\t\033[0;36mList files and directorys in the given directory. Sorts entries alphabetically.\033[0m\n\n");
|
||||
}
|
||||
|
||||
|
||||
|
||||
//MAIN FUNCTION
|
||||
void showManEntry(char *arg[]){
|
||||
if(!strcmp(arg[1], "man")){
|
||||
printf("Coming soon.\n");
|
||||
} else if(!strcmp(arg[1], "ls")){
|
||||
manEntry_ls();
|
||||
} else {
|
||||
printf("Entry not found.\n");
|
||||
}
|
||||
}
|
||||
7
etc/man/man.h
Normal file
7
etc/man/man.h
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
#ifndef _MAN_H_
|
||||
#define _MAN_H_
|
||||
|
||||
void manEntry_ls();
|
||||
void showManEntry(char *arg[]);
|
||||
|
||||
#endif
|
||||
2
main.c
2
main.c
|
|
@ -20,7 +20,7 @@
|
|||
#include "etc/man/man.h"
|
||||
|
||||
|
||||
#define VERSION "0.2.3"
|
||||
#define VERSION "0.2.4"
|
||||
#define AUTHOR "netbenix"
|
||||
|
||||
bool VER_CHECK_ON_START = true;
|
||||
|
|
|
|||
4
makefile
4
makefile
|
|
@ -2,7 +2,7 @@ CC= gcc
|
|||
ARGS= -export-dynamic -ansi -std=gnu99
|
||||
CFLAGS= $(shell pkg-config --cflags gtk+-3.0) -I/usr/include/mysql
|
||||
LDLIBS= $(shell pkg-config --libs gtk+-3.0) -L/usr/lib/mysql -lmysqlclient
|
||||
OBJ= main.o logo.o logger.o help.o sys_info.o gtk_test.o sql_test.o show_dir.o change_dir.o update_check.o
|
||||
OBJ= main.o logo.o logger.o help.o sys_info.o gtk_test.o sql_test.o show_dir.o change_dir.o update_check.o man.o
|
||||
|
||||
netbenixCMD: $(OBJ)
|
||||
$(CC) $(CFLAGS) $(ARGS) -o netbenixCMD $(OBJ) $(LDLIBS)
|
||||
|
|
@ -26,3 +26,5 @@ change_dir.o: commands/change_dir.c
|
|||
$(CC) $(CFLAGS) -c commands/change_dir.c
|
||||
update_check.o: utils/update_check.c
|
||||
$(CC) $(CFLAGS) -c utils/update_check.c
|
||||
man.o: etc/man/man.c
|
||||
$(CC) $(CFLAGS) -c etc/man/man.c
|
||||
|
|
|
|||
Reference in a new issue