Skip to content

Commit

Permalink
Docs: Improve navigation (#189)
Browse files Browse the repository at this point in the history
  • Loading branch information
RaniAgus authored Aug 15, 2024
1 parent 13f8356 commit 949b6a0
Show file tree
Hide file tree
Showing 20 changed files with 149 additions and 249 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
uses: actions/upload-pages-artifact@v3
with:
# Upload entire repository
path: './docs/html'
path: './docs/build/html'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,3 @@ Debug
build
test_save_config.cfg
.idea
html
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ Provee los siguientes TADs:
* Logging (commons/log.h)
* Manipulación de Strings (commons/string.h)
* Manipulación de archivos de configuración (commons/config.h)
* Funciones de fechas (commons/temporal.h)
* Manejo de array de bits (commons/bitarray.h)
* Manejo de timestamps (commons/temporal.h)
* Información de procesos (commons/process.h)
* Manejo simple de archivos de texto (commons/txt.h)
* Conjunto de elementos
* Colecciones de elementos
* List (commons/collections/list.h)
* Dictionary (commons/collections/dictionary.h)
* Queue (commons/collections/queue.h)
* Manejo de array de bits (commons/bitarray.h)
* Manejo de fechas y timestamps (commons/temporal.h)
* Información de procesos (commons/process.h)
* Impresión de dumps de memoria (commons/memory.h)
* Manejo simple de archivos de texto (commons/txt.h)

## Notas

Expand Down
58 changes: 7 additions & 51 deletions docs/Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ DOXYFILE_ENCODING = UTF-8
# title of most generated pages and in a few other places.
# The default value is: My Project.

PROJECT_NAME = "so-commons-library"
PROJECT_NAME = "Commons Library"

# The PROJECT_NUMBER tag can be used to enter a project or revision number. This
# could be handy for archiving the generated documentation or if some version
Expand All @@ -51,14 +51,14 @@ PROJECT_BRIEF = "TADs de uso común en aplicaciones desarrolladas en C"
# pixels and the maximum width should not exceed 200 pixels. Doxygen will copy
# the logo to the output directory.

PROJECT_LOGO = "./favicon-32x32.png"
PROJECT_LOGO = "img/favicon-32x32.png"

# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path
# into which the generated documentation will be written. If a relative path is
# entered, it will be relative to the location where doxygen was started. If
# left blank the current directory will be used.

OUTPUT_DIRECTORY = ./
OUTPUT_DIRECTORY = "build"

# If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub-
# directories (in 2 levels) under the output directory of each output format and
Expand Down Expand Up @@ -893,51 +893,7 @@ INPUT_ENCODING = UTF-8
# *.py, *.pyw, *.f90, *.f95, *.f03, *.f08, *.f18, *.f, *.for, *.vhd, *.vhdl,
# *.ucf, *.qsf and *.ice.

FILE_PATTERNS = *.c \
*.cc \
*.cxx \
*.cpp \
*.c++ \
*.java \
*.ii \
*.ixx \
*.ipp \
*.i++ \
*.inl \
*.idl \
*.ddl \
*.odl \
*.h \
*.hh \
*.hxx \
*.hpp \
*.h++ \
*.cs \
*.d \
*.php \
*.php4 \
*.php5 \
*.phtml \
*.inc \
*.m \
*.markdown \
*.md \
*.mm \
*.dox \
*.py \
*.pyw \
*.f90 \
*.f95 \
*.f03 \
*.f08 \
*.f18 \
*.f \
*.for \
*.vhd \
*.vhdl \
*.ucf \
*.qsf \
*.ice
FILE_PATTERNS = *.h

# The RECURSIVE tag can be used to specify whether or not subdirectories should
# be searched for input files as well.
Expand Down Expand Up @@ -1223,7 +1179,7 @@ GENERATE_HTML = YES
# The default directory is: html.
# This tag requires that the tag GENERATE_HTML is set to YES.

HTML_OUTPUT = html
HTML_OUTPUT = "html"

# The HTML_FILE_EXTENSION tag can be used to specify the file extension for each
# generated HTML page (for example: .htm, .php, .asp).
Expand All @@ -1250,7 +1206,7 @@ HTML_FILE_EXTENSION = .html
# of the possible markers and block names see the documentation.
# This tag requires that the tag GENERATE_HTML is set to YES.

HTML_HEADER =
HTML_HEADER = html/header.html

# The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each
# generated HTML page. If the tag is left blank doxygen will generate a standard
Expand Down Expand Up @@ -1285,7 +1241,7 @@ HTML_STYLESHEET =
# list). For an example see the documentation.
# This tag requires that the tag GENERATE_HTML is set to YES.

HTML_EXTRA_STYLESHEET = css/doxygen-awesome.css
HTML_EXTRA_STYLESHEET = css/custom.css css/doxygen-awesome.css

# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or
# other source files which should be copied to the HTML output directory. Note
Expand Down
8 changes: 8 additions & 0 deletions docs/css/custom.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#projectname, #projectbrief {
color: var(--header-foreground) !important; /* Inherit color from parent */
text-decoration: none; /* Remove underline */
}

#projectname:hover, #projectbrief:hover {
text-decoration: none; /* Ensure no underline on hover */
}
59 changes: 59 additions & 0 deletions docs/html/header.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
<!-- HTML header for doxygen 1.9.1-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen $doxygenversion"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<!--BEGIN PROJECT_NAME--><title>$projectname: $title</title><!--END PROJECT_NAME-->
<!--BEGIN !PROJECT_NAME--><title>$title</title><!--END !PROJECT_NAME-->
<link href="$relpath^tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="$relpath^jquery.js"></script>
<script type="text/javascript" src="$relpath^dynsections.js"></script>
$treeview
$search
$mathjax
<link href="$relpath^$stylesheet" rel="stylesheet" type="text/css" />
$extrastylesheet
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->

<!--BEGIN TITLEAREA-->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<!--BEGIN PROJECT_LOGO-->
<td id="projectlogo">
<a href="/index.html">
<img alt="Logo" src="$relpath^$projectlogo"/>
</a>
</td>
<!--END PROJECT_LOGO-->
<!--BEGIN PROJECT_NAME-->
<td id="projectalign" style="padding-left: 0.5em;">
<a href="/index.html" id="projectname">$projectname
<!--BEGIN PROJECT_NUMBER-->&#160;<span id="projectnumber">$projectnumber</span><!--END PROJECT_NUMBER-->
</a>
</td>
<!--END PROJECT_NAME-->
<!--BEGIN !PROJECT_NAME-->
<!--BEGIN PROJECT_BRIEF-->
<td style="padding-left: 0.5em;">
<div id="projectbrief">$projectbrief</div>
</td>
<!--END PROJECT_BRIEF-->
<!--END !PROJECT_NAME-->
<!--BEGIN DISABLE_INDEX-->
<!--BEGIN SEARCHENGINE-->
<td>$searchbox</td>
<!--END SEARCHENGINE-->
<!--END DISABLE_INDEX-->
</tr>
</tbody>
</table>
</div>
<!--END TITLEAREA-->
<!-- end header part -->
File renamed without changes
11 changes: 6 additions & 5 deletions docs/makefile
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
SRCS := Doxyfile $(shell find ../src/commons -name "*.h") ../README.md
SRCS := $(shell find . -not -path "./build**") $(shell find ../src/commons -name "*.h") ../README.md

all: html
all: build

clean:
rm -rf html
rm -rf build

serve: all
python3 -m http.server -d html
python3 -m http.server -d build/html

watch:
echo "$(SRCS)" | tr ' ' '\n' | entr -r make serve

.PHONY: all clean serve watch

html: $(SRCS)
build: $(SRCS)
doxygen
echo "var menudata = $$(cat navbar.config.json);" > build/html/menudata.js
45 changes: 45 additions & 0 deletions docs/navbar.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
"children": [
{
"text": "Headers",
"url": "#",
"children": [
{
"text": "commons",
"url": "#",
"children": [
{
"text": "collections",
"url": "#",
"children": [
{ "text": "list.h", "url": "list_8h.html" },
{ "text": "dictionary.h", "url": "dictionary_8h.html" },
{ "text": "queue.h", "url": "queue_8h.html" }
]
},
{ "text": "bitarray.h", "url": "bitarray_8h.html" },
{ "text": "config.h", "url": "config_8h.html" },
{ "text": "log.h", "url": "log_8h.html" },
{ "text": "memory.h", "url": "memory_8h.html" },
{ "text": "process.h", "url": "process_8h.html" },
{ "text": "string.h", "url": "string_8h.html" },
{ "text": "temporal.h", "url": "temporal_8h.html" },
{ "text": "txt.h", "url": "txt_8h.html" }
]
}
]
},
{
"text": "Código fuente",
"url": "#",
"children": [
{ "text": "Repositorio de GitHub ↗", "url": "https://faq.utnso.com.ar/commons" },
{ "text": "Archivos fuente ↗", "url": "https://faq.utnso.com.ar/commons/tree/master/src/commons" },
{ "text": "Unit tests ↗", "url": "https://faq.utnso.com.ar/commons/tree/master/tests/unit-tests" }
]
},
{ "text": "Blog ↗", "url": "https://faq.utnso.com.ar/blog" },
{ "text": "Guías ↗", "url": "https://faq.utnso.com.ar/docs" },
{ "text": "Inscripciones ↗", "url": "https://faq.utnso.com.ar/inscripciones" }
]
}
10 changes: 1 addition & 9 deletions src/commons/bitarray.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
/**
* @enum bit_numbering_t
* @brief Define el orden bajo el cual se guardarán los bits a la hora de llenar los bytes
* @relates t_bitarray
*
* @note La mayoría de las implementaciones de bitmap usan LSB_FIRST. Si no estás seguro
* de cuál usar, probablemente quieras usar esta.
Expand All @@ -39,7 +38,7 @@

/**
* @struct t_bitarray
* @brief Manipulación de un bloque de memoria a nivel de bits
* @brief Manipulación de un bloque de memoria a nivel de bits. Inicializar con `bitarray_create_with_mode()`
*/
typedef struct {
char *bitarray;
Expand All @@ -52,7 +51,6 @@
* Usar bitarray_create_with_mode().
*
* @brief Crea y devuelve un puntero a una estructura t_bitarray con formato LSB_FIRST
* @relates t_bitarray
*
* @param bitarray: El bloque de memoria que contiene los bits a leer/escribir
* @param size: La cantidad de bits del bitarray, expresada en bytes (1 byte = 8 bits)
Expand All @@ -67,7 +65,6 @@

/**
* @brief Crea y devuelve un puntero a una estructura t_bitarray
* @relates t_bitarray
*
* @param bitarray: El bloque de memoria que contiene los bits a leer/escribir
* @param size: La cantidad de bits del bitarray, expresada en bytes (1 byte = 8 bits)
Expand All @@ -82,31 +79,26 @@

/**
* @brief Devuelve el valor del bit de la posicion indicada
* @relates t_bitarray
*/
bool bitarray_test_bit(t_bitarray*, off_t bit_index);

/**
* @brief Setea el valor del bit de la posicion indicada
* @relates t_bitarray
*/
void bitarray_set_bit(t_bitarray*, off_t bit_index);

/**
* @brief Limpia el valor del bit de la posicion indicada
* @relates t_bitarray
*/
void bitarray_clean_bit(t_bitarray*, off_t bit_index);

/**
* @brief Devuelve la cantidad de bits en el bitarray
* @relates t_bitarray
*/
size_t bitarray_get_max_bit(t_bitarray*);

/**
* @brief Destruye el bit array
* @relates t_bitarray
*/
void bitarray_destroy(t_bitarray*);

Expand Down
Loading

0 comments on commit 949b6a0

Please sign in to comment.