]> git.sesse.net Git - ffmpeg/blob - doc/t2h.init
Merge commit '096a1d5b46391f65dfd0bee6292e9962f53bd7c8'
[ffmpeg] / doc / t2h.init
1 # Init file for texi2html.
2
3 # This is deprecated, and the makeinfo/texi2any version is doc/t2h.pm
4
5 # no horiz rules between sections
6 $end_section = \&FFmpeg_end_section;
7 sub FFmpeg_end_section($$)
8 {
9 }
10
11 my $TEMPLATE_HEADER1 = $ENV{"FFMPEG_HEADER1"} || <<EOT;
12 <!DOCTYPE html>
13 <html lang="en">
14   <head>
15     <meta charset="utf-8" />
16     <meta http-equiv="X-UA-Compatible" content="IE=edge" />
17     <title>FFmpeg documentation</title>
18     <link rel="stylesheet" href="style.min.css" />
19 EOT
20
21 my $TEMPLATE_HEADER2 = $ENV{"FFMPEG_HEADER2"} || <<EOT;
22   </head>
23   <body>
24     <div style="width: 95%; margin: auto">
25 EOT
26
27 my $TEMPLATE_FOOTER = $ENV{"FFMPEG_FOOTER"} || <<EOT;
28     </div>
29   </body>
30 </html>
31 EOT
32
33 $SMALL_RULE = '';
34 $BODYTEXT = '';
35
36 $print_page_foot = \&FFmpeg_print_page_foot;
37 sub FFmpeg_print_page_foot($$)
38 {
39     my $fh = shift;
40     my $program_string = defined &T2H_DEFAULT_program_string ?
41         T2H_DEFAULT_program_string() : program_string();
42     print $fh '<footer class="footer pagination-right">' . "\n";
43     print $fh '<span class="label label-info">' . $program_string;
44     print $fh "</span></footer></div></div></body>\n";
45 }
46
47 $float = \&FFmpeg_float;
48
49 sub FFmpeg_float($$$$)
50 {
51     my $text = shift;
52     my $float = shift;
53     my $caption = shift;
54     my $shortcaption = shift;
55
56     my $label = '';
57     if (exists($float->{'id'}))
58     {
59         $label = &$anchor($float->{'id'});
60     }
61     my $class = '';
62     my $subject = '';
63
64     if ($caption =~ /NOTE/)
65     {
66         $class = "alert alert-info";
67     }
68     elsif ($caption =~ /IMPORTANT/)
69     {
70         $class = "alert alert-warning";
71     }
72
73     return '<div class="float ' . $class . '">' . "$label\n" . $text . '</div>';
74 }
75
76 $print_page_head = \&FFmpeg_print_page_head;
77 sub FFmpeg_print_page_head($$)
78 {
79     my $fh = shift;
80     my $longtitle = "$Texi2HTML::THISDOC{'fulltitle_no_texi'}";
81     $longtitle .= ": $Texi2HTML::NO_TEXI{'This'}" if exists $Texi2HTML::NO_TEXI{'This'};
82     my $description = $DOCUMENT_DESCRIPTION;
83     $description = $longtitle if (!defined($description));
84     $description = "<meta name=\"description\" content=\"$description\">" if
85          ($description ne '');
86     $description = $Texi2HTML::THISDOC{'documentdescription'} if (defined($Texi2HTML::THISDOC{'documentdescription'}));
87     my $encoding = '';
88     $encoding = "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=$ENCODING\">" if (defined($ENCODING) and ($ENCODING ne ''));
89     $longtitle =~ s/Documentation.*//g;
90     $longtitle = "FFmpeg documentation : " . $longtitle;
91
92     print $fh <<EOT;
93 $TEMPLATE_HEADER1
94 $description
95 <meta name="keywords" content="$longtitle">
96 <meta name="Generator" content="$Texi2HTML::THISDOC{program}">
97 $Texi2HTML::THISDOC{'copying'}<!-- Created on $Texi2HTML::THISDOC{today} by $Texi2HTML::THISDOC{program} -->
98 <!--
99 $Texi2HTML::THISDOC{program_authors}
100 -->
101 $encoding
102 $TEMPLATE_HEADER2
103 EOT
104 }
105
106 $print_page_foot = \&FFmpeg_print_page_foot;
107 sub FFmpeg_print_page_foot($$)
108 {
109     my $fh = shift;
110     print $fh <<EOT;
111 $TEMPLATE_FOOTER
112 EOT
113 }
114
115 # declare encoding in header
116 $IN_ENCODING = $ENCODING = "utf-8";
117
118 # no navigation elements
119 $SECTION_NAVIGATION = 0;
120 # the same for texi2html 5.0
121 $HEADERS = 0;
122
123 # TOC and Chapter headings link
124 $TOC_LINKS = 1;
125
126 # print the TOC where @contents is used
127 $INLINE_CONTENTS = 1;