Added paragraph, image and link detection to porcess_md function. Refactored code a bit

This commit is contained in:
2020-07-04 14:10:16 +05:00
parent 06ff0761fc
commit 4c61d24352
8 changed files with 388 additions and 228 deletions

View File

@@ -0,0 +1,29 @@
#ifndef _ARTICLE_H
#define _ARTICLE_H
#include <stdio.h>
#include <time.h>
#include <string.h>
#include <stdlib.h>
#include <ctype.h>
#include "../../include/file_op/file.h"
#include "../../include/utils_op/utils.h"
#include "../../include/articles_op/process_md.h"
#define LINE_LENGTH 512
#ifndef _ARTICLE_INFO
#define _ARTICLE_INFO
typedef struct
{
char *title;
long time;
char *content;
unsigned long length;
} article_info;
#endif
#endif

View File

@@ -0,0 +1,23 @@
#ifndef _PROCESS_MD_H
#define _PROCESS_MD_H
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#ifndef _ARTICLE_INFO
#define _ARTICLE_INFO
typedef struct
{
char *title;
long time;
char *content;
unsigned long length;
} article_info;
#endif
int process_md(article_info article, char **out);
#endif