Compare commits

..

6 Commits

Author SHA1 Message Date
7089222512 add: the lua img 2023-11-08 18:22:08 +01:00
0c8c8854a4 d 2023-11-08 18:20:16 +01:00
61db53767c fix: do not add the more button
if all the content fit
2023-11-08 18:19:16 +01:00
e0cf2a6059 update: reademe 2023-11-08 18:18:28 +01:00
31ee578f5f add: program to generate the README.md from
README_COMPLET.md
2023-11-08 18:10:27 +01:00
be3ae772cb test readme 2023-11-08 17:54:50 +01:00
6 changed files with 80 additions and 5 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
a.out

View File

@ -1,11 +1,11 @@
### About Me ### About Me
- Student at 42 Angouleme - Student at 42 Angouleme
- Computer science enthusiast - Computer science enthusiast
- I use arch btw
#### Programming language #### Programming language
- <img src="https://git.chauvet.pro/starnakin/.profile/raw/branch/main/img/c.png" width="15" height="15"> C - <img src="https://git.chauvet.pro/starnakin/.profile/raw/branch/main/img/c.png" width="15" height="15"> C
- <img src="https://git.chauvet.pro/starnakin/.profile/raw/branch/main/img/python.png" width="15" height="15"> Python - <img src="https://git.chauvet.pro/starnakin/.profile/raw/branch/main/img/python.png" width="15" height="15"> Python
- <img src="https://git.chauvet.pro/starnakin/.profile/raw/branch/main/img/c++.png" width="15" height="15"> C++ - <img src="https://git.chauvet.pro/starnakin/.profile/raw/branch/main/img/c++.png" width="15" height="15"> C++
- <img src="https://git.chauvet.pro/starnakin/.profile/raw/branch/main/img/lua.png" width="15" height="15"> Lua
- [<img src="https://git.chauvet.pro/starnakin/.profile/raw/branch/main/img/golem.png" width="15" height="15"> Golem](https://golem.re) - [<img src="https://git.chauvet.pro/starnakin/.profile/raw/branch/main/img/golem.png" width="15" height="15"> Golem](https://golem.re)
#### Skills #### Skills
- Programmation - Programmation
@ -16,11 +16,11 @@
- [matrix](https://matrix.chauvet.pro) - [matrix](https://matrix.chauvet.pro)
- [element](https://element.chauvet.pro) - [element](https://element.chauvet.pro)
- [gitea](https://git.chauvet.pro) - [gitea](https://git.chauvet.pro)
- [gitea](https://git.chauvet.pro)
- [vaultwarden](https://pass.chauvet.pro) - [vaultwarden](https://pass.chauvet.pro)
#### Projects #### Projects
- [Minishell](https://git.chauvet.pro/starnakin/minishell): A simplified version of bash from scratch - [Minishell](https://git.chauvet.pro/starnakin/minishell): A simplified version of bash from scratch
- [IronGolem](https://git.chauvet.pro/starnakin/IronGOLEM): A library to the golem language (Memory allocator, print, trait string, etc) - [IronGolem](https://git.chauvet.pro/starnakin/IronGOLEM): A library to the golem language (Memory allocator, print, trait string, etc)
- [PyMenuBOT](https://git.chauvet.pro/starnakin/PyMenuBOT): A bot discord to create greocery list
### Contact ### Contact
discord: starnakin\ discord: starnakin\
mail: camille@chauvet.pro### [More](https://urlz.fr/mqBB) mail: camille@chauvet.pro

View File

@ -1,11 +1,11 @@
### About Me ### About Me
- Student at 42 Angouleme - Student at 42 Angouleme
- Computer science enthusiast - Computer science enthusiast
- I use arch btw
#### Programming language #### Programming language
- <img src="https://git.chauvet.pro/starnakin/.profile/raw/branch/main/img/c.png" width="15" height="15"> C - <img src="https://git.chauvet.pro/starnakin/.profile/raw/branch/main/img/c.png" width="15" height="15"> C
- <img src="https://git.chauvet.pro/starnakin/.profile/raw/branch/main/img/python.png" width="15" height="15"> Python - <img src="https://git.chauvet.pro/starnakin/.profile/raw/branch/main/img/python.png" width="15" height="15"> Python
- <img src="https://git.chauvet.pro/starnakin/.profile/raw/branch/main/img/c++.png" width="15" height="15"> C++ - <img src="https://git.chauvet.pro/starnakin/.profile/raw/branch/main/img/c++.png" width="15" height="15"> C++
- <img src="https://git.chauvet.pro/starnakin/.profile/raw/branch/main/img/lua.png" width="15" height="15"> Lua
- [<img src="https://git.chauvet.pro/starnakin/.profile/raw/branch/main/img/golem.png" width="15" height="15"> Golem](https://golem.re) - [<img src="https://git.chauvet.pro/starnakin/.profile/raw/branch/main/img/golem.png" width="15" height="15"> Golem](https://golem.re)
#### Skills #### Skills
- Programmation - Programmation
@ -16,11 +16,11 @@
- [matrix](https://matrix.chauvet.pro) - [matrix](https://matrix.chauvet.pro)
- [element](https://element.chauvet.pro) - [element](https://element.chauvet.pro)
- [gitea](https://git.chauvet.pro) - [gitea](https://git.chauvet.pro)
- [gitea](https://git.chauvet.pro)
- [vaultwarden](https://pass.chauvet.pro) - [vaultwarden](https://pass.chauvet.pro)
#### Projects #### Projects
- [Minishell](https://git.chauvet.pro/starnakin/minishell): A simplified version of bash from scratch - [Minishell](https://git.chauvet.pro/starnakin/minishell): A simplified version of bash from scratch
- [IronGolem](https://git.chauvet.pro/starnakin/IronGOLEM): A library to the golem language (Memory allocator, print, trait string, etc) - [IronGolem](https://git.chauvet.pro/starnakin/IronGOLEM): A library to the golem language (Memory allocator, print, trait string, etc)
- [PyMenuBOT](https://git.chauvet.pro/starnakin/PyMenuBOT): A bot discord to create greocery list
### Contact ### Contact
discord: starnakin\ discord: starnakin\
mail: camille@chauvet.pro mail: camille@chauvet.pro

72
create_short.c Normal file
View File

@ -0,0 +1,72 @@
#include <sys/stat.h>
#include <fcntl.h>
#include <string.h>
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
#define BUTTON "\n### [More](https://urlz.fr/mqBB)"
#define TOTAL_SIZE 2272
#define MAX_SIZE TOTAL_SIZE - strlen(BUTTON)
char* read_file(const char* path)
{
char* content;
int fd;
fd = open(path, O_RDONLY);
if (fd == -1)
goto open_fail;
content = malloc((TOTAL_SIZE + 1) * sizeof(char));
if (content == NULL)
goto alloc_fail;
int written = read(fd, content, MAX_SIZE);
if (written == -1)
goto read_fail;
content[written] = '\0';
close(fd);
return content;
read_fail:
alloc_fail:
free(content);
open_fail:
close(fd);
return NULL;
}
int write_file(const char* path, const char* content)
{
int fd = open(path, O_WRONLY | O_TRUNC);
if (fd == -1)
return 1;
return write(fd, content, strlen(content));
}
int main(int ac, char **av)
{
char* path;
if (ac > 2)
path = av[1];
else
path = "README_COMPLET.md";
char* content = read_file(path);
if (content == NULL)
return 1;
if (strlen(content) == MAX_SIZE)
strcat(content, BUTTON);
int ret = write_file("README.md", content);
free(content);
return ret;
}

2
create_short.sh Executable file
View File

@ -0,0 +1,2 @@
gcc -g -Wall -Werror -Wextra create_short.c &&
./a.out

BIN
img/lua.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 128 KiB