File: createTagletProps.sh

package info (click to toggle)
libjogl2-java 2.3.2%2Bdfsg-10
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 44,112 kB
  • sloc: java: 218,529; ansic: 75,727; xml: 6,722; objc: 3,139; sh: 2,736; cpp: 139; awk: 46; makefile: 29
file content (34 lines) | stat: -rw-r--r-- 1,004 bytes parent folder | download | duplicates (5)
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
root=http://www.opengl.org/sdk/docs/

createProperties() {

    toc=index.html
    doc=${1}

    #download index
    wget ${root}/${doc}/xhtml/${toc};

    #find lines with links to gl* function doc
    grep -E .+\<a\ target=\"pagedisp\"\ href=\"gl[A-Z][^\"]+\"\>gl[A-Z][a-Z0-9]+\</a\>.+ ./${toc} > links;

    #add all links as properties to file and cleanup
    sed -r "s/.+<td><a target=\"pagedisp\" href=\"([a-Z0-9.]+)\">([a-Z0-9]+)<\/a><\/td>.*/\2 = ${doc}\/xhtml\/\1/" links | sort -u;

    rm ./${toc} ./links

}

>tmp

createProperties man2 >> tmp
createProperties man3 >> tmp
createProperties man4 >> tmp

#add doc root to properties file
echo "#Generated, do not edit, edit createTagletProps.sh instead.
#This file is used in NativeTaglet and maps the generated method names
#to the function specific OpenGL documentation man pages.
nativetaglet.baseUrl=${root}" > native-taglet.properties;

cat tmp | sort -k1,2 -r | awk '!x[$1]++' | tr -d [:blank:] | sort >> native-taglet.properties;
rm tmp