Skip to content

Commit 31a767a

Browse files
committed
[!] New source!
1 parent cdc21aa commit 31a767a

File tree

216 files changed

+15935
-28
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

216 files changed

+15935
-28
lines changed

LICENSE

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
This work is licensed under the Creative Commons Attribution 4.0 International License. To view a copy of this license, visit http://creativecommons.org/licenses/by/4.0/ or send a letter to Creative Commons, PO Box 1866, Mountain View, CA 94042, USA.

README.md

+2-28
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,3 @@
1-
<h2 align="center"> aleph8 Website </h2>
1+
# web-graph-pandoc
22

3-
***
4-
5-
Personal web page where I show my way through the long (but exciting) path of knowledge.
6-
7-
## Used tools:
8-
***
9-
10-
1. R
11-
2. RStudio
12-
3. Framework Hugo
13-
14-
## Repository structure:
15-
***
16-
17-
The repository is divided into two branches: one with the source files and the other with the files generated when building the page.
18-
19-
### main
20-
21-
In this branch are the source files of the web, the project in R. To build the web I use [Blogdown](https://bookdown.org/yihui/blogdown/) a package of R that with RStudio allows to build web sites quickly with Hugo as framework.
22-
23-
The website theme is the work of [Jimmy Cai](https://github.com/CaiJimmy/hugo-theme-stack) who has written a great [documentation for using the theme in his website](https://stack.jimmycai.com/guide/).
24-
25-
### generated-web
26-
27-
Generated files. Necessary to host it with Github Pages.
28-
29-
<hr>
3+
Desarrollo de la web "Universo" con inicio de presentación y constelaciones según especialidad

content_graphs_generator.sh

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
#!/bin/bash
2+
3+
SPECIALTIES_PATH="./src/graphs/"
4+
ROOT_PATH=$(pwd)
5+
6+
for SPECIALTY in $(ls $SPECIALTIES_PATH); do
7+
8+
mkdir -p dist/graphs/$SPECIALTY
9+
10+
cd $SPECIALTIES_PATH$SPECIALTY
11+
12+
cp index.html ../../../dist/graphs/$SPECIALTY/
13+
cp -r images/ ../../../dist/graphs/$SPECIALTY/
14+
15+
cat << EOF > $SPECIALTY.json
16+
{
17+
"nodes": [],
18+
"links": []
19+
}
20+
EOF
21+
22+
for MARKDOWN_FILE in $(ls *.md); do
23+
## TODO: READ THE FILE ONLY ONE TIME, METADATA WITH: sed -n '/^---/,/^---/p'
24+
TITLE=$(cat $MARKDOWN_FILE | grep -o 'title:.*' | head -n 1 | sed 's/title://g')
25+
ID=$(cat $MARKDOWN_FILE | grep -o 'id:.*' | head -n 1 | sed 's/id://g' | tr -d " ")
26+
GROUP=$(cat $MARKDOWN_FILE | grep -o 'group:.*' | head -n 1 | sed 's/group://g' | tr -d " ")
27+
LINKS=$(cat $MARKDOWN_FILE | sed -n "/links:/,/---/p" | grep -Ev "links:|\-\-\-" | tr -d "-")
28+
echo $TITLE" "$ID" "$GROUP" "$LINKS
29+
30+
jq '.nodes += [{"id": "'"$ID"'","group": "'"$GROUP"'","title": "'"$TITLE"'" }]' $SPECIALTY.json > $SPECIALTY.tmp && mv $SPECIALTY.tmp $SPECIALTY.json
31+
32+
for link in $LINKS; do
33+
jq '.links += [{ "source": "'"$ID"'","target": "'"$link"'", "value": 1 }]' $SPECIALTY.json > $SPECIALTY.tmp && mv $SPECIALTY.tmp $SPECIALTY.json
34+
done
35+
36+
pandoc -V fontsize=14pt -s $MARKDOWN_FILE --template aleph_default.html -o ../../../dist/graphs/$SPECIALTY/$ID.html
37+
38+
done
39+
40+
41+
cp $SPECIALTY.json ../../../dist/graphs/$SPECIALTY/
42+
cd ../../../
43+
44+
done

images/profile.png

28.3 KB
Loading

index.html

+149
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)