Signed-off-by: Timothy Gu <timothyg...@gmail.com> --- Now with a ISC license. --- README | 12 +----------- generate-doc.sh | 42 ++++++++++++++++++++++++++++++++++++++++++ src/template_doc_head1 | 11 +++++++++++ src/template_doc_head2 | 44 ++++++++++++++++++++++++++++++++++++++++++++ src/template_doc_head3 | 2 ++ src/template_doc_head4 | 2 ++ src/template_head2 | 1 + src/template_head3 | 1 + 8 files changed, 104 insertions(+), 11 deletions(-) create mode 100755 generate-doc.sh create mode 100644 src/template_doc_head1 create mode 100644 src/template_doc_head2 create mode 100644 src/template_doc_head3 create mode 100644 src/template_doc_head4
diff --git a/README b/README index 93854ee..7f15db2 100644 --- a/README +++ b/README @@ -15,17 +15,7 @@ GENERATE THE DOCUMENTATION /!\ None of the generated versions of the website contain the documentation. -To generate the documentation pages: -- Add the HTML wrappers to your environment: - $ export FFMPEG_HEADER1="$(cat src/template_head1 src/template_doctitle src/template_head_prod)" - $ export FFMPEG_HEADER2="$(cat src/template_head2 src/template_doctitle src/template_head3)" - $ export FFMPEG_FOOTER="$(cat src/template_footer1 src/template_footer_prod src/template_footer2)" -- Get the main ffmpeg repo: - $ git clone git://source.ffmpeg.org/ffmpeg.git -- Compile the documentation using the ffmpeg main repo Makefile: - $ make doc -- Copy the generated HTML files inside the website: - $ cp /path/to/ffmpeg/doc/*.html /path/to/ffmpeg-web/htdocs/ +To generate the documentation pages, just `./generate-doc.sh <ffmpeg-src>`. In case of a major CSS update, please also update the `style.min.css` file in the main FFmpeg repo: diff --git a/generate-doc.sh b/generate-doc.sh new file mode 100755 index 0000000..b4c2ae3 --- /dev/null +++ b/generate-doc.sh @@ -0,0 +1,42 @@ +#!/bin/sh +# +# Copyright (c) 2014 Tiancheng "Timothy" Gu. +# +# Permission to use, copy, modify, and/or distribute this software for any +# purpose with or without fee is hereby granted, provided that the above +# copyright notice and this permission notice appear in all copies. +# +# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY +# SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION +# OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN +# CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +die() { + echo $1 + exit 1 +} + +if [ $# != 1 ]; then + die "Usage: $0 <ffmpeg-source>" +fi + +src=$1 +current_dir=$(pwd) + +export FFMPEG_EXTRA_HEAD="$(cat src/template_doc_head1)" +export FFMPEG_AFTER_BODY_OPEN="$(cat src/template_doc_head2)" +export FFMPEG_BEFORE_TITLE="$(cat src/template_doc_head3)" +export FFMPEG_AFTER_HEADER="$(cat src/template_doc_head4)" +export FFMPEG_PRE_BODY_CLOSE="$(cat src/template_footer1 src/template_footer_prod src/template_footer2)" + +rm -rf build-doc +mkdir build-doc && cd build-doc +$src/configure --enable-gpl --disable-yasm || die "configure failed" +make doc || die "doc not made" +cp doc/*.html ../htdocs/ || die "copy failed" + +cd .. +rm -rf build-doc \ No newline at end of file diff --git a/src/template_doc_head1 b/src/template_doc_head1 new file mode 100644 index 0000000..10833f0 --- /dev/null +++ b/src/template_doc_head1 @@ -0,0 +1,11 @@ +<!-- Please keep this in sync with template_head_prod and template_head2 --> + <link rel="stylesheet" href="css/font-awesome.min.css" /> + <link rel="stylesheet" href="css/bootstrap.min.css" /> + <link rel="stylesheet" href="css/simple-sidebar.css" /> + <link rel="stylesheet" href="css/style.min.css" /> + <meta name="viewport" content="width=device-width,initial-scale=1.0"> + <!--[if lt IE 9]> + <script src="js/html5shiv.min.js"></script> + <script src="js/respond.min.js"></script> + <![endif]--> + <link rel="shortcut icon" href="favicon.ico" /> \ No newline at end of file diff --git a/src/template_doc_head2 b/src/template_doc_head2 new file mode 100644 index 0000000..652fbec --- /dev/null +++ b/src/template_doc_head2 @@ -0,0 +1,44 @@ +<!-- Please keep this in sync with template_head2 --> + <div id="wrapper"> + + <nav id="sidebar-wrapper"> + <ul class="sidebar-nav"> + <li class="sidebar-brand"><a href="."> + <img src="img/ffmpeg3d_white_20.png" alt="FFmpeg" /> + FFmpeg</a> + </li> + <li><a href="about.html">About</a></li> + <li><a href="index.html#news">News</a></li> + <li><a href="download.html">Download</a></li> + <li><a href="documentation.html">Documentation</a></li> + <li><a href="contact.html#MailingLists">Community</a> + <ul> + <li><a href="contact.html#MailingLists">Mailing Lists</a></li> + <li><a href="contact.html#IRCChannels">IRC</a></li> + <li><a href="contact.html#Forums">Forums</a></li> + <li><a href="bugreports.html">Bug Reports</a></li> + <li><a href="http://trac.ffmpeg.org">Wiki</a></li> + <li><a href="projects.html">Projects</a></li> + </ul> + </li> + <li><a href="#">Developers</a> + <ul> + <li><a href="download.html#get-sources">Source Code</a> + <li><a href="http://fate.ffmpeg.org">FATE</a></li> + <li><a href="http://coverage.ffmpeg.org">Code Coverage</a></li> + </ul> + </li> + <li><a href="#">More</a> + <ul> + <li><a href="donations.html"> + Donate<span style="color: #e55; font-size: 0.8em; margin-left: -10px"><i class="fa fa-heart"></i></span></a></li> + <li><a href="consulting.html">Hire Developers</a></li> + <li><a href="contact.html">Contact</a></li> + <li><a href="security.html">Security</a></li> + <li><a href="legal.html">Legal</a></li> + </ul> + </li> + </ul> + </nav> + + <div id="page-content-wrapper"> \ No newline at end of file diff --git a/src/template_doc_head3 b/src/template_doc_head3 new file mode 100644 index 0000000..fd83b87 --- /dev/null +++ b/src/template_doc_head3 @@ -0,0 +1,2 @@ +<!-- Please keep this in sync with template_doc_head2 --> + <a id="menu-toggle" href="#" class="btn btn-success"><i class="fa fa-reorder"></i></a> \ No newline at end of file diff --git a/src/template_doc_head4 b/src/template_doc_head4 new file mode 100644 index 0000000..7cf7d7c --- /dev/null +++ b/src/template_doc_head4 @@ -0,0 +1,2 @@ +<!-- Please keep this in sync with template_head3 --> + <div class="page-content inset"> \ No newline at end of file diff --git a/src/template_head2 b/src/template_head2 index e7eda54..ab23e06 100644 --- a/src/template_head2 +++ b/src/template_head2 @@ -1,3 +1,4 @@ +<!-- Please keep this in sync with template_doc_head[1-3] --> <meta name="viewport" content="width=device-width,initial-scale=1.0"> <!--[if lt IE 9]> <script src="js/html5shiv.min.js"></script> diff --git a/src/template_head3 b/src/template_head3 index 6ca3eaa..399002a 100644 --- a/src/template_head3 +++ b/src/template_head3 @@ -1,3 +1,4 @@ +<!-- Please keep this in sync with template_doc_head4 --> </h1> </header> <div class="page-content inset"> -- 1.9.1 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel