-
Notifications
You must be signed in to change notification settings - Fork 0
/
sitemap_generator.sh
executable file
·79 lines (63 loc) · 2.25 KB
/
sitemap_generator.sh
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
#!/bin/bash
OUT=sitemap.xml
# Předpokládejme, že mám dostatečná práva na zápis do souboru atd...
# Chtěl jsem to mít jenom rychle napsané
echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" > $OUT
echo '<urlset xmlns="https://www.sitemaps.org/schemas/sitemap/0.9">' >> $OUT
echo '<url>' >> $OUT
echo ' <loc>https://potrebujurousku.cz/</loc>' >> $OUT
echo ' <changefreq>hourly</changefreq>' >> $OUT
echo '</url>' >> $OUT
echo '<url>' >> $OUT
echo ' <loc>https://potrebujurousku.cz/aktualnost/</loc>' >> $OUT
echo ' <changefreq>hourly</changefreq>' >> $OUT
echo '</url>' >> $OUT
echo '<url>' >> $OUT
echo ' <loc>https://potrebujurousku.cz/opatreni/</loc>' >> $OUT
echo ' <changefreq>hourly</changefreq>' >> $OUT
echo '</url>' >> $OUT
echo '<url>' >> $OUT
echo ' <loc>https://potrebujurousku.cz/opatreni/</loc>' >> $OUT
echo ' <changefreq>hourly</changefreq>' >> $OUT
echo '</url>' >> $OUT
echo '<url>' >> $OUT
echo ' <loc>https://potrebujurousku.cz/celostatni-opatreni/</loc>' >> $OUT
echo ' <changefreq>hourly</changefreq>' >> $OUT
echo '</url>' >> $OUT
echo '<url>' >> $OUT
echo ' <loc>https://potrebujurousku.cz/o-projektu/</loc>' >> $OUT
echo ' <changefreq>hourly</changefreq>' >> $OUT
echo '</url>' >> $OUT
echo '<url>' >> $OUT
echo ' <loc>https://potrebujurousku.cz/home/</loc>' >> $OUT
echo ' <changefreq>hourly</changefreq>' >> $OUT
echo '</url>' >> $OUT
for i in {1..14}
do
echo " <url>" >> $OUT
echo " <loc>https://potrebujurousku.cz/opatreni/?kraj_id=$i</loc>" >> $OUT
echo " <changefreq>hourly</changefreq>" >> $OUT
echo " </url>" >> $OUT
done
for i in {1..77}
do
echo " <url>" >> $OUT
echo " <loc>https://potrebujurousku.cz/opatreni/?okres_id=$i</loc>" >> $OUT
echo " <changefreq>hourly</changefreq>" >> $OUT
echo " </url>" >> $OUT
done
for i in {1..206}
do
echo " <url>" >> $OUT
echo " <loc>https://potrebujurousku.cz/opatreni/?nuts3_id=$i</loc>" >> $OUT
echo " <changefreq>hourly</changefreq>" >> $OUT
echo " </url>" >> $OUT
done
for i in {1..15105}
do
echo " <url>" >> $OUT
echo " <loc>https://potrebujurousku.cz/opatreni/?obecmesto_id=$i</loc>" >> $OUT
echo " <changefreq>hourly</changefreq>" >> $OUT
echo " </url>" >> $OUT
done
echo "</urlset>" >> $OUT