diff options
Diffstat (limited to 'driver.f90')
-rw-r--r-- | driver.f90 | 18 |
1 files changed, 12 insertions, 6 deletions
@@ -27,7 +27,7 @@ implicit none type(pptxtracted)::presentation logical::verbose logical::notes - integer::i, j + integer::i, j, retcode character(len=:), pointer::filename, arg if(command_argument_count() < 1) then @@ -35,6 +35,7 @@ implicit none call exit(0) end if + retcode = 0 verbose = .false. notes = .false. filename => null() @@ -73,17 +74,22 @@ implicit none call maybe_print(verbose, "File opened at "//trim(presentation%directory)) call presentation%parse() - - write(*, '(A)') presentation%to_text() - + + if((.not. notes) .or. presentation%has_notes()) then + write(*, '(A)') presentation%to_text(notes_only=notes) + else + call maybe_print(verbose, "No slide notes found in "//filename) + retcode = 1 + end if + call presentation%close() else call maybe_print(verbose, "Failed on "//filename) - call exit(1) + retcode = 1 end if - call exit(0) + call exit(retcode) contains |