Binärdateien Impressive-0.12.0/demo.pdf und Impressive-0.12.1-WIP/demo.pdf sind verschieden.
diff -u Impressive-0.12.0/impressive.1 Impressive-0.12.1-WIP/impressive.1
--- Impressive-0.12.0/impressive.1 2018-02-04 21:31:39.000000000 +0100
+++ Impressive-0.12.1-WIP/impressive.1 2019-08-18 16:25:04.000000000 +0200
@@ -1,5 +1,5 @@
.\" generated by KeyJ's html2man.py version 0.1.1
-.TH IMPRESSIVE 1 2018-02-04 "Martin J. Fiedler" "Impressive Documentation">
+.TH IMPRESSIVE 1 2018-02-07 "Martin J. Fiedler" "Impressive Documentation">
.SH "NAME"
Impressive \- presentation tool with eye candy
.SH "SYNOPSIS"
@@ -666,6 +666,16 @@
.RE
.PP
.br
+\fBA\fR key
+.RS
+Toggle automatic slideshow mode.
+.br
+If an automatic presentation has been started with the \fB\-a\fR/\:\fB\-\-auto\fR option, it is temporarily disabled until this key is pressed again. It is not automatically re\-enabled after changing the page. If the \fB\-a\fR/\:\fB\-\-auto\fR has not been used, an automatic presentation with a timeout of 30 seconds is started when this key is pressed for the first time.
+.br
+Note that if a page has a \fBtimeout\fR PageProp, the specified timeout is \fIalways\fR in effect when the page is entered, even if the automatic slideshow is otherwise disabled.
+.RE
+.PP
+.br
\fBS\fR key
.RS
Save the info script associated with the current presentation. The main purpose for this is to permanently save highlight boxes or keyboard shortcuts, so they will be restored the next time this presentation is started.
@@ -857,6 +867,26 @@
The following list describes all actions supported by Impressive, together with the conditions under which they will match. Note that most actions will not match in overview mode and during video playback, unless mentioned otherwise in the description.
.PP
.br
+\fBauto\-start\fR
+.RS
+(Re\-)enable automatic presentation mode. If the current page has no \fBtimeout\fR PageProp and no \fB\-a\fR/\:\fB\-\-auto\fR option has been specified, an automatic presentation is started with a 30\-second page interval.
+.RE
+.PP
+.br
+\fBauto\-stop\fR
+.RS
+Disable automatic presentation mode. If the current page has a \fBtimeout\fR PageProp or an \fB\-a\fR/\:\fB\-\-auto\fR option has been specified, the timeout for the current page is stopped.
+.br
+The automatic presentation stays disabled after changing pages, unless a \fBtimeout\fR PageProp is specified for the target page, which will take precedence over the otherwise disabled automatic presentation mode.
+.RE
+.PP
+.br
+\fBauto\-toggle\fR
+.RS
+Disables or (re\-)enables automatic presentations, depending on the current state.
+.RE
+.PP
+.br
\fBbox\-add\fR
.RS
Draw a highlight box if the mouse has been moved since the button has been pressed down. This action must only be bound to a mouse button event, otherwise it will not function properly.
diff -u Impressive-0.12.0/impressive.html Impressive-0.12.1-WIP/impressive.html
--- Impressive-0.12.0/impressive.html 2018-02-04 21:31:39.000000000 +0100
+++ Impressive-0.12.1-WIP/impressive.html 2019-08-18 16:25:04.000000000 +0200
@@ -13,12 +13,12 @@
<!--VERSION-->
<p style="text-indent:0;">
<a href="http://impressive.sourceforge.net/">http://impressive.sourceforge.net/</a><br />
-<b>Version:</b> 0.12.0<br />
+<b>Version:</b> 0.12.1-WIP<br />
<b>Author:</b> <a href="mailto:martin.fiedler@gmx.net">Martin J. Fiedler</a><br />
-<b>Last updated:</b> 2018-02-04</p>
+<b>Last updated:</b> 2018-02-07</p>
<!--END-->
<!--man
-.TH IMPRESSIVE 1 2018-02-04 "Martin J. Fiedler" "Impressive Documentation">
+.TH IMPRESSIVE 1 2018-02-07 "Martin J. Fiedler" "Impressive Documentation">
.SH "NAME"
Impressive \- presentation tool with eye candy
.SH "SYNOPSIS"
@@ -461,6 +461,11 @@
<dt><strong>RMB</strong> (right mouse button) over a highlight box</dt>
<dd>If the right mouse button is clicked while the mouse cursor is above a highlight box, the box will be removed. If the last box on a page is removed, the page will turn bright and sharp again.</dd>
+<dt><strong>A</strong> key</dt>
+<dd>Toggle automatic slideshow mode.<br />
+If an automatic presentation has been started with the <code>-a</code>/<code>--auto</code> option, it is temporarily disabled until this key is pressed again. It is not automatically re-enabled after changing the page. If the <code>-a</code>/<code>--auto</code> has not been used, an automatic presentation with a timeout of 30 seconds is started when this key is pressed for the first time.<br />
+Note that if a page has a <code>timeout</code> PageProp, the specified timeout is <em>always</em> in effect when the page is entered, even if the automatic slideshow is otherwise disabled.</dd>
+
<dt><strong>S</strong> key</dt>
<dd>Save the info script associated with the current presentation. The main purpose for this is to permanently save highlight boxes or keyboard shortcuts, so they will be restored the next time this presentation is started.</dd>
@@ -568,6 +573,16 @@
<p>The following list describes all actions supported by Impressive, together with the conditions under which they will match. Note that most actions will not match in overview mode and during video playback, unless mentioned otherwise in the description.</p><dl>
+<dt><code>auto-start</code></dt>
+<dd>(Re-)enable automatic presentation mode. If the current page has no <code>timeout</code> PageProp and no <code>-a</code>/<code>--auto</code> option has been specified, an automatic presentation is started with a 30-second page interval.</dd>
+
+<dt><code>auto-stop</code></dt>
+<dd>Disable automatic presentation mode. If the current page has a <code>timeout</code> PageProp or an <code>-a</code>/<code>--auto</code> option has been specified, the timeout for the current page is stopped.<br />
+The automatic presentation stays disabled after changing pages, unless a <code>timeout</code> PageProp is specified for the target page, which will take precedence over the otherwise disabled automatic presentation mode.</dd>
+
+<dt><code>auto-toggle</code></dt>
+<dd>Disables or (re-)enables automatic presentations, depending on the current state.</dd>
+
<dt><code>box-add</code></dt>
<dd>Draw a highlight box if the mouse has been moved since the button has been pressed down. This action must only be bound to a mouse button event, otherwise it will not function properly.</dd>
diff -u Impressive-0.12.0/impressive.py Impressive-0.12.1-WIP/impressive.py
--- Impressive-0.12.0/impressive.py 2018-02-04 21:31:39.000000000 +0100
+++ Impressive-0.12.1-WIP/impressive.py 2019-08-18 16:27:33.439233087 +0200
@@ -2,7 +2,7 @@
# -*- coding: iso-8859-1 -*-
#
# Impressive, a fancy presentation tool
-# Copyright (C) 2005-2014 Martin J. Fiedler <martin.fiedler@gmx.net>
+# Copyright (C) 2005-2018 Martin J. Fiedler <martin.fiedler@gmx.net>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License, version 2, as
@@ -18,8 +18,8 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
__title__ = "Impressive"
-__version__ = "0.12.0"
-__rev__ = 235
+__version__ = "0.12.1-WIP"
+__rev__ = 245
__author__ = "Martin J. Fiedler"
__email__ = "martin.fiedler@gmx.net"
__website__ = "http://impressive.sourceforge.net/"
@@ -72,7 +72,8 @@
EnableOverview = True
InitialPage = None
Wrap = False
-AutoAdvance = None
+AutoAdvanceTime = 30000
+AutoAdvanceEnabled = False
AutoAutoAdvance = False
RenderToDirectory = None
Rotation = 0
@@ -376,7 +377,15 @@
pygame.quit()
def SetWindowTitle(self, text):
- pygame.display.set_caption(text, __title__)
+ if not isinstance(text, unicode):
+ try:
+ text = unicode(text, 'utf-8')
+ except UnicodeDecodeError:
+ text = unicode(text, 'windows-1252', 'replace')
+ try:
+ pygame.display.set_caption(text, __title__)
+ except UnicodeEncodeError:
+ pygame.display.set_caption(text.encode('utf-8'), __title__)
def GetWindowID(self):
return pygame.display.get_wm_info()['window']
@@ -2544,6 +2553,12 @@
raise PDFError, "object does not match the intended type"
return data
+ def resolve(self, obj):
+ if isinstance(obj, PDFref):
+ return self.getobj(obj)
+ else:
+ return obj
+
def parse_xref_section(self, start, count):
xref = {}
for obj in xrange(start, start + count):
@@ -2600,7 +2615,7 @@
self.page_count = page
self.obj2page[obj] = page
self.page2obj[page] = obj
- self.box[page] = node.get('CropBox', cbox) or node.get('MediaBox', mbox)
+ self.box[page] = self.resolve(node.get('CropBox', cbox) or node.get('MediaBox', mbox))
self.rotate[page] = node.get('Rotate', rotate)
self.annots[page] = [a.ref for a in anode]
except (KeyError, TypeError, ValueError):
@@ -3267,6 +3282,11 @@
print >>sys.stderr, " Display of PDF files will not be supported."
+def ApplyRotation(img, rot):
+ rot = (rot or 0) & 3
+ if not rot: return img
+ return img.transpose({1:Image.ROTATE_270, 2:Image.ROTATE_180, 3:Image.ROTATE_90}[rot])
+
# generate a dummy image
def DummyPage():
img = Image.new('RGB', (ScreenWidth, ScreenHeight))
@@ -3325,7 +3345,7 @@
return DummyPage()
# apply rotation
- if rot: img = img.rotate(90 * (4 - rot))
+ img = ApplyRotation(img, rot)
# compute final output image size based on PAR
if not parscale:
@@ -3410,11 +3430,7 @@
return DummyPage()
# apply rotation
- rot = GetPageProp(page, 'rotate')
- if rot is None:
- rot = Rotation
- if rot:
- img = img.rotate(90 * (4 - rot))
+ img = ApplyRotation(img, GetPageProp(page, 'rotate', Rotation))
# determine destination size
newsize = ZoomToFit((img.size[0], int(img.size[1] * PAR + 0.5)),
@@ -4307,7 +4323,7 @@
PageEnterTime = Platform.GetTicks() - StartTime
IsZoomed = 0 # no, we don't have a pre-zoomed image right now
WantStatus = False # don't show status unless it's changed interactively
- PageTimeout = AutoAdvance
+ PageTimeout = AutoAdvanceTime if AutoAdvanceEnabled else 0
shown = GetPageProp(Pcurrent, '_shown', 0)
try:
os.chdir(os.path.dirname(GetPageProp(Pcurrent, '_file')))
@@ -4940,6 +4956,7 @@
f = fullscreen
tab = overview-enter, overview-exit
s = save
+ a = auto-toggle
t = time-toggle
r = time-reset
c = box-clear
@@ -5650,6 +5667,33 @@
"fade to a white screen"
FadeMode(1.0)
+ def _auto_stop(self):
+ "stop automatic slideshow"
+ global AutoAdvanceEnabled, PageTimeout
+ AutoAdvanceEnabled = False
+ PageTimeout = 0
+ Platform.ScheduleEvent('$page-timeout', 0)
+ if AutoAdvanceProgress:
+ DrawCurrentPage()
+ def _auto_start(self):
+ "start or resume automatic slideshow"
+ global AutoAdvanceEnabled, PageTimeout
+ AutoAdvanceEnabled = True
+ PageTimeout = AutoAdvanceTime
+ if (GetPageProp(Pcurrent, '_shown') == 1) or Wrap:
+ PageTimeout = GetPageProp(Pcurrent, 'timeout', PageTimeout)
+ dt = PageTimeout - (Platform.GetTicks() - PageEnterTime)
+ if dt > 0:
+ Platform.ScheduleEvent('$page-timeout', dt)
+ else:
+ TransitionTo(GetNextPage(Pcurrent, 1))
+ def _auto_toggle(self):
+ "toggle automatic slideshow"
+ if AutoAdvanceEnabled:
+ self._auto_stop()
+ else:
+ self._auto_start()
+
def _time_toggle(self):
"toggle time display and/or time tracking mode"
global TimeDisplay
@@ -5807,7 +5851,7 @@
print >>sys.stderr, "Warning: input file `%s' has unrecognized file type" % name
elif os.path.isdir(name):
- images = [os.path.join(name, f) for f in os.listdir(name) if IsImageFileName(f)]
+ images = [os.path.join(name, f) for f in os.listdir(name) if IsImageFile(f)]
images.sort(lambda a, b: cmp(a.lower(), b.lower()))
if not images:
print >>sys.stderr, "Warning: no image files in directory `%s'" % name
@@ -5838,7 +5882,7 @@
global PAR, DAR, TempFileName, Bare, MaxZoomFactor
global BackgroundRendering, FileStats, RTrunning, RTrestart, StartTime
global CursorImage, CursorVisible, InfoScriptPath
- global HalfScreen, AutoAdvance, WindowPos
+ global HalfScreen, AutoAdvanceTime, AutoAdvanceEnabled, WindowPos
global BoxFadeDarknessBase, BoxZoomDarknessBase, SpotRadiusBase
global BoxIndexBuffer, UseBlurShader
@@ -6189,8 +6233,9 @@
time_left -= GetPageProp(p, 'transtime', TransitionDuration)
p = pnext
if pages and (time_left >= pages):
- AutoAdvance = time_left / pages
- print >>sys.stderr, "Setting auto-advance timeout to %.1f seconds." % (0.001 * AutoAdvance)
+ AutoAdvanceTime = time_left / pages
+ AutoAdvanceEnabled = True
+ print >>sys.stderr, "Setting auto-advance timeout to %.1f seconds." % (0.001 * AutoAdvanceTime)
else:
print >>sys.stderr, "Warning: Could not determine auto-advance timeout automatically."
@@ -6235,7 +6280,8 @@
# prebuffer current and next page
Pnext = 0
RenderPage(Pcurrent, Tcurrent)
- DrawCurrentPage()
+ if not FadeInOut:
+ DrawCurrentPage()
PageEntered(update_time=False)
PreloadNextPage(GetNextPage(Pcurrent, 1))
@@ -6332,7 +6378,14 @@
print >>sys.stderr, "Impressive version:", __version__
print >>sys.stderr, "Python version:", sys.version
print >>sys.stderr, "PyGame version:", pygame.__version__
- print >>sys.stderr, "PIL version:", Image.VERSION
+ if hasattr(Image, "__version__"): # Pillow >= 5.2
+ print >>sys.stderr, "PIL version: Pillow", Image.__version__
+ elif hasattr(Image, "PILLOW_VERSION"): # Pillow < 7.0
+ print >>sys.stderr, "PIL version: Pillow", Image.PILLOW_VERSION
+ elif hasattr(Image, "VERSION"): # classic PIL or Pillow 1.x
+ print >>sys.stderr, "PIL version: classic", Image.VERSION
+ else:
+ print >>sys.stderr, "PIL version: unknown"
if PDFRenderer:
print >>sys.stderr, "PDF renderer:", PDFRenderer.name
else:
@@ -6396,28 +6449,28 @@
Usage: """+os.path.basename(sys.argv[0])+""" [OPTION...] <INPUT(S)...>
-You may either play a PDF file, a directory containing image files or
-individual image files.
+Inputs may be PDF files, image files, video files or directories
+containing image files.
Input options:
+ -h, --help show this help text and exit
-r, --rotate <n> rotate pages clockwise in 90-degree steps
--scale scale images to fit screen (not used in PDF mode)
--supersample use supersampling (only used in PDF mode)
-s --supersample for PDF files, --scale for image files
-I, --script <path> set the path of the info script
- -u, --poll <seconds> check periodically if the source file has been
- updated and reload it if it did
+ -u, --poll <seconds> check periodically if the source files have been
+ updated and reload them if they did
-X, --shuffle put input files into random order
- -h, --help show this help text and exit
Output options:
- -o, --output <dir> don't display the presentation, only render to .png
--fullscreen start in fullscreen mode
-ff, --fake-fullscreen start in "fake fullscreen" mode
-f, --windowed start in windowed mode
-g, --geometry <WxH> set window size or fullscreen resolution
-A, --aspect <X:Y> adjust for a specific display aspect ratio (e.g. 5:4)
-G, --gamma <G[:BL]> specify startup gamma and black level
+ -o, --output <dir> don't display the presentation, only render to .png
Page options:
-i, --initialpage <n> start with page <n>
@@ -6442,33 +6495,33 @@
-z, --zoom <factor> set zoom factor (default: 2.0)
--maxzoom <factor> maximum factor to render high-resolution zoom
-x, --fade fade in at start and fade out at end
- --spot-radius <px> set the initial radius of the spotlight, in pixels
--invert display slides in inverted colors
+ --noblur use legacy blur implementation
+ --spot-radius <px> set the initial radius of the spotlight, in pixels
--min-box-size <x> set minimum size of a highlight box, in pixels
--box-edge <px> size of highlight box borders, in pixels
--zbox-edge <px> size of zoom box borders, in pixels
--darkness <p> set highlight box mode darkness to <p> percent
--zoomdarkness <p> set box-zoom mode darkness to <p> percent
- --noblur use legacy blur implementation
Timing options:
- -M, --minutes display time in minutes, not seconds
- --clock show current time instead of time elapsed
- --tracking enable time tracking mode
- --time-display enable time display (implies --tracking)
-a, --auto <seconds> automatically advance to next page after some seconds
-d, --duration <time> set the desired duration of the presentation and show
a progress bar at the bottom of the screen
-y, --auto-auto if a duration is set, set the default time-out so
that it will be reached exactly
+ -q, --page-progress shows a progress bar based on the position in the
+ presentation (based on pages, not time)
-k, --auto-progress shows a progress bar for each page for auto-advance
+ --time-display enable time display (implies --tracking)
+ --tracking enable time tracking mode
+ --clock show current time instead of time elapsed
+ -M, --minutes display time in minutes, not seconds
-T, --transtime <ms> set transition duration in milliseconds
-D, --mousedelay <ms> set mouse hide delay for fullscreen mode (in ms)
(0 = show permanently, 1 = don't show at all)
-B, --boxfade <ms> set highlight box fade duration in milliseconds
-Z, --zoomtime <ms> set zoom animation duration in milliseconds
- -q, --page-progress shows a progress bar based on the position in the
- presentation (based on pages, not time)
Control options:
--control-help display help about control configuration and exit
@@ -6478,9 +6531,9 @@
-W, --nowheel disable page navigation via mouse wheel, zoom instead
--noquit disable single-key shortcuts that quit the program
--evtest run Impressive in event test mode
- --bare don't use any special features (hyperlinks etc.)
Advanced options:
+ --bare don't use any special features (hyperlinks etc.)
-c, --cache <mode> set page cache mode:
-c none = disable caching completely
-c memory = store cache in RAM, uncompressed
@@ -6492,8 +6545,8 @@
-P, --renderer <path> set path to PDF renderer executable (GhostScript,
Xpdf/Poppler pdftoppm, or MuPDF mudraw/pdfdraw)
-V, --overscan <px> render PDF files <px> pixels larger than the screen
- --nologo disable startup logo and version number display
-H, --half-screen show OSD on right half of the screen only
+ --nologo disable startup logo and version number display
-v, --verbose (slightly) more verbose operation
For detailed information, visit""", __website__
@@ -6625,14 +6678,15 @@
global FileName, FileList, Fullscreen, Scaling, Supersample, CacheMode
global TransitionDuration, MouseHideDelay, BoxFadeDuration, ZoomDuration
global ScreenWidth, ScreenHeight, InitialPage, Wrap, TimeTracking
- global AutoAdvance, RenderToDirectory, Rotation, DAR, Verbose
+ global AutoAdvanceTime, AutoAdvanceEnabled, AutoAutoAdvance
+ global RenderToDirectory, Rotation, DAR, Verbose
global BackgroundRendering, UseAutoScreenSize, PollInterval, CacheFileName
global PageRangeStart, PageRangeEnd, FontList, FontSize, Gamma, BlackLevel
global EstimatedDuration, CursorImage, CursorHotspot, MinutesOnly, Overscan
global PDFRendererPath, InfoScriptPath, EventTestMode, EnableCursor
global AutoOverview, DefaultZoomFactor, FadeInOut, ShowLogo, Shuffle
global QuitAtEnd, ShowClock, HalfScreen, SpotRadius, InvertPages
- global MinBoxSize, AutoAutoAdvance, AutoAdvanceProgress, BoxFadeDarkness
+ global MinBoxSize, AutoAdvanceProgress, BoxFadeDarkness
global WindowPos, FakeFullscreen, UseBlurShader, Bare, EnableOverview
global PageProgress, BoxZoomDarkness, MaxZoomFactor, BoxEdgeSize
global TimeDisplay, MouseWheelZoom, ZoomBoxEdgeSize
@@ -6784,8 +6838,12 @@
opterr("invalid parameter for --duration")
if opt in ("-a", "--auto"):
try:
- AutoAdvance = int(float(arg) * 1000)
- assert (AutoAdvance > 0) and (AutoAdvance <= 86400000)
+ if arg.lower().strip('.') in ("0", "00", "off", "none", "false"):
+ AutoAdvanceEnabled = False
+ else:
+ AutoAdvanceTime = int(float(arg) * 1000)
+ assert (AutoAdvanceTime > 0) and (AutoAdvanceTime <= 86400000)
+ AutoAdvanceEnabled = True
except:
opterr("invalid parameter for --auto")
if opt in ("-T", "--transtime"):