Skip to content

Commit

Permalink
Find Author name for foorter in 2nde line of md file
Browse files Browse the repository at this point in the history
  • Loading branch information
ValeryBruniaux committed Jul 3, 2018
1 parent 9ec25f5 commit 3f8eb0e
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
6 changes: 3 additions & 3 deletions examples/proportionnalite.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion examples/proportionnalite.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
% La Proportionnalité
% Valéry Bruniaux
% Valéry Bruniaux - Lycée Arthur Rimbaud
% 25/04/2018

# Qu'est-ce-que la Proportionnalité ?
Expand Down
Binary file modified examples/proportionnalite.pdf
Binary file not shown.
5 changes: 4 additions & 1 deletion md2htmlpdf
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.

Author="Valéry Bruniaux - Lycée Arthur Rimbaud"
Author=""
PageSize="A4"
PageOrientation="Portrait"
TopMargin="0.75cm"
Expand Down Expand Up @@ -66,4 +66,7 @@ echo "============================================================="
echo "=> Make PDF file : $Title.pdf ..."
echo "============================================================="

Author=$(head -2 "$Title".md | tail -1)
Author=${Author:2}

wkhtmltopdf --encoding 'utf-8' --print-media-type --footer-line --footer-spacing 2 --footer-font-name "$FooterFont" --footer-font-size "$FooterSize" --footer-left "$Author" --footer-right "[page] / [topage]" --margin-top "$TopMargin" --margin-left "$LeftMargin" --margin-right "$RightMargin" --margin-bottom "$BottomMargin" -O "$PageOrientation" -s "$PageSize" --javascript-delay 500 "$Title".html "$Title".pdf

0 comments on commit 3f8eb0e

Please sign in to comment.