projects
/
HTML5TV.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
205e504
)
convert presentation(s) into text
author
Dobrica Pavlinusic
<dpavlin@rot13.org>
Sat, 13 Feb 2010 11:00:37 +0000
(12:00 +0100)
committer
Dobrica Pavlinusic
<dpavlin@rot13.org>
Sat, 13 Feb 2010 11:00:37 +0000
(12:00 +0100)
bin/mplayer.pl
patch
|
blob
|
history
diff --git
a/bin/mplayer.pl
b/bin/mplayer.pl
index
6932708
..
3440a71
100755
(executable)
--- a/
bin/mplayer.pl
+++ b/
bin/mplayer.pl
@@
-608,8
+608,14
@@
sub edit_subtitles {
my @slide_titles;
-if ( -e "$media_dir/presentation.txt" ) {
- my $slides = read_file "$media_dir/presentation.txt";
+foreach my $path ( sort glob "$media_dir/presentation*.pdf" ) {
+
+ my $txt = $path;
+ $txt =~ s/pdf$/txt/;
+
+ system "pdftotext '$path'" unless -e $txt;
+
+ my $slides = read_file $txt;
my @s = ( map { [ split(/[\n\r]+/, $_) ] } split(/\f/, $slides) );
my $slide_line = 0;