Skip to content
Snippets Groups Projects
Commit f5a837dc authored by Lukáš Krupčík's avatar Lukáš Krupčík
Browse files

version 0.47

parent 6fff8de9
No related branches found
No related tags found
No related merge requests found
Převod html dokumentace do md formátu (version 0.46) - BETA Převod html dokumentace do md formátu (version 0.47) - BETA
=========================================================== ===========================================================
Výsledkem projektu by měl být skript pro stažení a převod stávající dokumentace na docs.it4i.cz do md formátu Výsledkem projektu by měl být skript pro stažení a převod stávající dokumentace na docs.it4i.cz do md formátu
...@@ -13,17 +13,19 @@ Výsledkem projektu by měl být skript pro stažení a převod stávající dok ...@@ -13,17 +13,19 @@ Výsledkem projektu by měl být skript pro stažení a převod stávající dok
Pro svou práci si naklonujete Gitem repozitář do svého pracovního adresáře. Pro svou práci si naklonujete Gitem repozitář do svého pracovního adresáře.
### Vývoj
| Verze | čas | změny |
|--------|--------|---|
|0.3|34m56s|přidání filtru pro html a css|
|0.4|24m56s|oprava obrázků + optimalizace|
|0.45|7m56s|optimalizace|
|0.47|11m7s|přidání filtrů pro opravu a nahrazení tabulek, vylepšení filtrace, ...|
>**Problémy** >**Problémy**
> * obrázky nemají správný odkaz na uložení v adresářích (částečně vyřešeno)
> * interní a externí odkazy > * interní a externí odkazy
> * formátování tabulek > * formátování tabulek
> * formátovámí textu v některých místech > * doba převodu ~~24min~~
> * doba převodu ~24min
>**Změny v nové verzi**
> * optimalizace + měření času
> * rozdělení filtrů podle kategorie
> * formátování tabulek, nahrazení tabulek
### Funkce skriptu ### Funkce skriptu
...@@ -37,10 +39,4 @@ Konverze html do md ...@@ -37,10 +39,4 @@ Konverze html do md
```bash ```bash
html_md.sh -c html_md.sh -c
``` ```
\ No newline at end of file
Testování
```bash
html_md.sh -t
```
...@@ -191,7 +191,7 @@ You should see after the successful login. ...@@ -191,7 +191,7 @@ You should see after the successful login.
Open Screensaver preferences dialog: Open Screensaver preferences dialog:
![](gdmscreensaver.png) Preferences](gdmscreensaver.png/@@images/8e80a92f-f691-4d92-8e62-344128dcc00b.png "Screensaver Preferences")](../../../../salomon/gnome_screen.jpg.1)
Uncheck both options below the slider: Uncheck both options below the slider:
......
...@@ -134,7 +134,7 @@ For more informations see the man pages. ...@@ -134,7 +134,7 @@ For more informations see the man pages.
To use the Berkley UPC compiler and runtime environment to run the To use the Berkley UPC compiler and runtime environment to run the
binaries use the module bupc binaries use the module bupc
$ module add bupc $ module add BerkeleyUPC/2.16.2-gompi-2015b
$ upcc -version $ upcc -version
As default UPC network the "smp" is used. This is very quick and easy As default UPC network the "smp" is used. This is very quick and easy
......
...@@ -2,42 +2,11 @@ ...@@ -2,42 +2,11 @@
### DOWNLOAD AND CONVERT DOCUMENTATION ### DOWNLOAD AND CONVERT DOCUMENTATION
# autor: kru0052 # autor: kru0052
# version: 0.46 # version: 0.47
# change: repair tables, optimalization # change: repair tables, optimalization
# bugs: bad links for other files, formatting bugs, bad bash and other code (formatting)... # bugs: bad links for other files, formatting bugs, bad bash and other code (formatting)...
### ###
if [ "$1" = "-t" ]; then
# testing new function
echo "Testing..."
printf "\t\tformatting tables...\n"
cat ./test > ./test.md;
while read x ; do
arg1=`echo "$x" | cut -d"&" -f1 | sed 's:[]\[\^\$\.\*\/\"]:\\\\&:g'`;
arg2=`echo "$x" | cut -d"&" -f2 | sed 's:[]\[\^\$\.\*\/\"]:\\\\&:g'`;
sed -e 's/'"$arg1"'/'"$arg2"'/' ./test.md > ./test.tmp;
sed -e :a -e '/\\$/N; s/\\\n//; ta' ./test.tmp > ./test.md;
#cat ./test.tmp > ./test.md;
done < ./source/tab
fi
if [ "$1" = "-t1" ]; then
STARTTIME=$(date +%s)
sleep 5
ENDTIME=$(date +%s)
echo "It takes $(($ENDTIME - $STARTTIME)) seconds to complete this task..."
fi
if [ "$1" = "-w" ]; then if [ "$1" = "-w" ]; then
# download html pages # download html pages
STARTTIME=$(date +%s) STARTTIME=$(date +%s)
...@@ -108,7 +77,7 @@ if [ "$1" = "-c" ]; then ...@@ -108,7 +77,7 @@ if [ "$1" = "-c" ]; then
arg2=`echo "$x" | cut -d"&" -f2 | sed 's:[]\[\^\$\.\*\/\"]:\\\\&:g'`; arg2=`echo "$x" | cut -d"&" -f2 | sed 's:[]\[\^\$\.\*\/\"]:\\\\&:g'`;
sed -e 's/'"$arg1"'/'"$arg2"'/' "${i%.*}TMP.md" > "${i%.*}TMP.TEST.md"; sed -e 's/'"$arg1"'/'"$arg2"'/' "${i%.*}TMP.md" > "${i%.*}TMP.TEST.md";
cat "${i%.*}TMP.TEST.md" > "${i%.*}TMP.md"; cat -s "${i%.*}TMP.TEST.md" > "${i%.*}TMP.md";
done < ./source/replace done < ./source/replace
# repair formatting... # repair formatting...
...@@ -118,7 +87,7 @@ if [ "$1" = "-c" ]; then ...@@ -118,7 +87,7 @@ if [ "$1" = "-c" ]; then
arg2=`echo "$x" | cut -d"&" -f2 | sed 's:[]\[\^\$\.\*\/\"]:\\\\&:g'`; arg2=`echo "$x" | cut -d"&" -f2 | sed 's:[]\[\^\$\.\*\/\"]:\\\\&:g'`;
sed -e 's/'"$arg1"'/'"$arg2"'/' "${i%.*}TMP.md" > "${i%.*}TMP.TEST.md"; sed -e 's/'"$arg1"'/'"$arg2"'/' "${i%.*}TMP.md" > "${i%.*}TMP.TEST.md";
cat "${i%.*}TMP.TEST.md" > "${i%.*}TMP.md"; cat -s "${i%.*}TMP.TEST.md" > "${i%.*}TMP.md";
done < ./source/formatting done < ./source/formatting
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment