-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathConvertor.sh
More file actions
57 lines (57 loc) · 1.68 KB
/
Copy pathConvertor.sh
File metadata and controls
57 lines (57 loc) · 1.68 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# /usr/bin/bash
echo "Πόσα αρχεία θές να αλλάξεις?:"
read n
for ((i = 0; i < $n; i++))
do
echo "Διάλεξε ένα απο τα διαθέσιμα αρχεία:
a) scratch.epub
b) MyRepo.md"
read convertopt1
if [ "$convertopt1" = "a" ];
then
echo "Διαθέσιμες επιλογές για μετατροπή:
a) html
b) txt"
read convertopt2
if [ "$convertopt2" = "a" ];
then
echo "Μετατροπή scratch.epub σε html..."
pandoc -s scratch.epub -o scratch.html
echo "Ολοκληρώθηκε"
vim scratch.html
echo "Το μέγεθος του scratch.html:"
ls -lhS
elif [ "$convertopt2" = "b" ];
then
echo "Μετατροπή scratch.epub σε scratch.txt..."
pandoc -s scratch.epub -o scratch.txt
echo "Ολοκληρώθηκε"
vim scratch.txt
echo "Το μέγεθος του scratch.txt:"
ls -lhS
fi
elif [ "$convertopt1" = "b" ];
then
echo "Διαθέσιμες επιλογές για μετατροπή:
a) html
b) txt"
read convertopt2
if [ "$convertopt2" = "a" ];
then
echo "Μετετροπή .md σε html.."
pandoc -s -f markdown -t html5 -o MyRepo.html MyRepo.md -c style.css
echo "Ολοκληρώθηκε"
vim MyRepo.html
echo "Το μέγεθος του MyRepo.html:"
ls -lhS
elif [ "$convertopt2" = "b" ];
then
echo "Μετατροπή MyRepo.md σε MyRepo.txt..."
pandoc -f markdown -t plain MyRepo.md -o MyRepo.txt
echo "Ολοκληρώθηκε"
vim MyRepo.txt
cho "Το μέγεθος του MyRepo.txt:"
ls -lhS
fi
fi
done