Coder Social home page Coder Social logo

cimbali / pympress Goto Github PK

View Code? Open in Web Editor NEW
1.1K 17.0 85.0 10.4 MB

Pympress is a simple yet powerful PDF reader designed for dual-screen presentations

Home Page: https://cimbali.github.io/pympress/

License: GNU General Public License v2.0

Python 98.73% Shell 0.92% CSS 0.36%
presentation python pdf-viewer beamer presenter slide poppler projector pdf-reader gtk

pympress's Introduction

Pympress logo What is Pympress?

Pympress is a PDF presentation tool designed for dual-screen setups such as presentations and public talks. Highly configurable, fully-featured, and portable

It comes with many great features (more below):

  • supports embedded gifs (out of the box), videos, and audios (with VLC or Gstreamer integration)
  • text annotations displayed in the presenter window
  • natively supports beamer's notes on second screen, as well as Libreoffice notes pages!

Pympress is a free software, distributed under the terms of the GPL license (version 2 or, at your option, any later version).

Pympress was originally created and maintained by Schnouki, on his repo.

Here is what the 2 screen setup looks like, with a big notes slide next to 2 small slides (current and next) on the presenter side: A screenshot with Pympress’ 2 screens

Installing github version badge

  • Ubuntu ubuntu logo 20.04 focal or newer, Debian debian logo 11 Bullseye or newer ubuntu version badge debian version badge (maintained by @mans0954)

    apt-get install pympress libgtk-3-0 libpoppler-glib8 libcairo2 python3-gi python3-gi-cairo gobject-introspection libgirepository-1.0-1 gir1.2-gtk-3.0 gir1.2-poppler-0.18
    
  • RPM-based Linux (Fedora fedora logo CentOS centos logo Mageia mageia logo OpenSuse suse logo RHEL) Copr build version

    You can get pympress from the pympress COPR repo of your system. With yum or dnf, simply do:

    dnf copr enable cimbali/pympress
    dnf install python3-pympress

    With zypper, fetch the link of the .repo in the table at the bottom of the COPR page and add it as a source.

    zypper addrepo https://copr.fedorainfracloud.org/coprs/cimbali/pympress/repo/opensuse-tumbleweed/cimbali-pympress-opensuse-tumbleweed.repo
    zypper install python3-pympress
  • Arch Linux arch linux logo from AUR AUR version badge (maintained by @Jose1711)

    git clone https://aur.archlinux.org/python-pympress.git
    cd python-pympress
    makepkg -si

    Or using any other tool to manage AUR packages (yay, pacaur, etc.):

    yay -S python-pympress
  • macOS apple logo using Homebrew homebrew version badge

    brew install pympress

    Or using MacPorts macport version badge

    port install pympress
  • Windows windows logo with Chocolatey chocolatey version badge (maintained by @ComFreek)

    choco install pympress

    Or using the Windows Package Manager (winget) winget version badge

    winget install pympress

    Or download the latest installer from the latest Github release.

    Troubleshooting
    • If you get an error message along the lines of "MSVCP100.dll is missing", get the Visual C++ 2010 redistributables from Microsoft (x86 (32 bit) or x64 (64 bits)). Those libraries really should already be installed on your system.
  • Other systems, directly from PyPI pypi version badge − requires python, gtk+3, poppler, and their python bindings:

    pipx install --system-site-packages "pympress"
    
    Troubleshooting
    • Make sure you have all the dependencies. (These are already included in binary packages or their dependencies.)

    • If your python environment lacks the Gobject Introspections module, try

      1. using --system-site-packages for pipx or virtual environments,
      2. installing pygobject and pycairo with pipx (pipx inject pympress pygobject pycairo), which requires the correct development/header packages be present on your system. See the PyPI installation instructions of PyGObject for your system.
    • As per the python documentation on installing, it is recommended to install packages in virtual environments. Since mid 2022, the pipx tool automates this process. Your distribution (or Homebrew on macOS) should have a version you can install. Alternately, you can get the same effect with the standard venv and pip modules:

      # Create virtual environment
      python3 -m venv --system-site-packages ~/.local/lib/venv/pympress
      # Install pympress
      ~/.local/lib/venv/pympress/bin/python3 -m pip install pympress
      # Link to the executable from a place in your path
      ln -s ~/.local/lib/venv/pympress/bin/pympress ~/.local/bin/

      Note that:

      • If you don’t want to use system packages, you can build and install pygobject/pycairo in the virtual environment using ~/.local/lib/venv/bin/pip install pygobject pycairo
      • You can adjust the ~/.local/lib/venv/ path to your personal preference.
    • Unfortunately, installing pympress in a virtual environment means you will not get desktop integration (i.e. installing pympress' desktop and png files to have pympress show up in your menus etc).

      This is by design, as desktop applications are intended to be installed through system packages (rpm, apt, etc.). You can work around this in 2 ways:

      1. Manually (note that links/copied files will need to be removed):
        cp "`pipx environment -V PIPX_LOCAL_VENVS`/pympress/share/applications/io.github.pympress.desktop" ~/.share/applications/
        ln -s "`pipx environment -V PIPX_LOCAL_VENVS`/pympress/share/pixmaps/pympress.png" ~/.share/pixmaps/
      2. Relying on the deprecated data_files, that only work outside of virtual environments. This means installing with pip:
        python3 -m pip install --user --break-system-packages pympress

Notes

To support playing embedded videos in the PDFs, your system must have VLC installed (with the same bitness as pympress). VLC is not distributed with pympress, but it is certainly available in your system’s package manager and on their website.

Usage

Opening a file

Simply start Pympress and it will ask you what file you want to open. You can also start pympress from the command line with a file to open like so: pympress slides.pdf or python3 -m pympress slides.pdf

Functionalities

All functionalities are available from the menus of the window with slide previews. Don't be afraid to experiment with them!

Keyboard shortcuts are also listed in these menus. Some more usual shortcuts are often available, for example Ctrl+L, and F11 also toggle fullscreen, though the main shortcut is just F.

A few of the fancier functionalities are listed here:

  • Two-screen display: See on your laptop or tablet display the current slide, the next slide, the talk time and wall-clock time, and annotations (either PDF annotations, beamer notes on second slide, or Libreoffice notes pages). The position of the beamer or Libreoffice notes in the slide is detected automatically and can be overridden via a menu option.

    If you do not want to use second-slide beamer notes but prefer to have notes on their own pages, you can enable auto-detection of these notes. Use the following snippet that prefixes the page labels with notes: on notes pages:

    \addtobeamertemplate{note page}{}{\thispdfpagelabel{notes:\insertframenumber}}
  • Media support: supports playing video, audio, and gif files embedded in (or linked from) the PDF file, with optional start/end times and looping.

  • Highlight mode: Allows one to draw freehand on the slide currently on screen.

  • Go To Slide: To jump to a selected slide without flashing through the whole presentation on the projector, press G or click the "current slide" box. Using J or clicking the slide label will allow you to navigate slide labels instead of page numbers, useful e.g. for multi-page slides from beamer \pause.

    A spin box will appear, and you will be able to navigate through your slides in the presenter window only by scrolling your mouse, with the Home/Up/Down/End keys, with the + and - buttons of the spin box, or simply by typing in the number of the slide. Press Enter to validate going to the new slide or Esc to cancel.

  • Deck Overview: Pressing D will open an overview of your whole slide deck, and any slide can be opened from can simply clicking it.

  • Software pointer: Clicking on the slide (in either window) while holding ctrl down will display a software laser pointer on the slide. Or press L to permanently switch on the laser pointer.

  • Talk time breakdown: The Presentation > Timing Breakdown menu item displays a breakdown of how much time was spent on each slide, with a hierarchical breakdown per chapters/sections/etc. if available in the PDF.

  • Automatic file reloading: If the file is modified, pympress will reload it (and preserve the current slide, current time, etc.)

  • Big button mode: Add big buttons (duh) for touch displays.

  • Swap screens: If Pympress mixed up which screen is the projector and which is not, press S

  • Automatic full screen: pympress will automatically put the content window fullscreen on your non-primay screen when:

    • connecting a second screen,
    • extending your desktop to a second screen that was mirroring your main screen,
    • when starting pympress on a two-screen display. To disable this behaviour, untick “Content fullscreen” under the “Starting configuration” menu.
  • Estimated talk time: Click the Time estimation box and set your planned talk duration. The color will allow you to see at a glance how much time you have left.

  • Adjust screen centering: If your slides' form factor doesn't fit the projectors' and you don't want the slide centered in the window, use the "Screen Center" option in the "Presentation" menu.

  • Resize Current/Next slide: You can drag the bar between both slides on the Presenter window to adjust their relative sizes to your liking.

  • Caching: For efficiency, Pympress caches rendered pages (up to 200 by default). If this is too memory consuming for you, you can change this number in the configuration file.

  • Configurability: Your preferences are saved in a configuration file, and many options are accessible there directly. These include:

    • Customisable key bindings (or shortcuts),
    • Configurable layout of the presenter window, with 1 to 16 next slides preview
    • and many more.

    See the configuration file documentation for more details,

  • Editable PDF annotations: Annotations can be added, removed, or changed, and the modified PDF files can be saved

  • Automatic next slide and looping

Command line arguments

  • -h, --help: Shows a list of all command line arguments.
  • -t mm[:ss], --talk-time=mm[:ss]: The estimated (intended) talk time in minutes and optionally seconds.
  • -n position, --notes=position: Set the position of notes on the pdf page (none, left, right, top, bottom, or after). Overrides the detection from the file.
  • --log=level: Set level of verbosity in log file (DEBUG, INFO, WARNING, ERROR).

Media and autoplay

To enable media playback, you need to have either:

  • Gstreamer installed (enabled by default), with its gtk plugin (libgstgtk) which is sometimes packaged separately (e.g. as gst-plugin-gtk or gstreamer1.0-gtk3), and plugins gstreamer-good/-bad/-ugly based on which codecs you need, or
  • VLC installed (and the python-vlc module), with enabled = on under the [vlc] section of your config file.

On macOS, issues with the gstreamer brew formula may require users to set GST_PLUGIN_SYSTEM_PATH manually. For default homebrew configurations the value should be /opt/homebrew/lib/gstreamer-1.0/. Make sure to set this environmental variable globally, or pympress might not pick it up.

To produce PDFs with media inclusion, the ideal method is to use beamer’s multimedia package, always with \movie:

\documentclass{beamer}
\usepackage{multimedia}

\begin{frame}{Just a mp4 here}
    \centering
    \movie[width=0.3\textwidth]{\includegraphics[width=0.9\textwidth]{frame1.png}}{movie.mp4}

    \movie[width=0.3\textwidth]{}{animation.gif}

    \movie[width=0.3\textwidth]{}{ding.ogg}
\end{frame}

If you desire autoplay, ensure you have pympress ≥ 1.7.0 and poppler ≥ 21.04, and use the movie15 package as follows:

\documentclass{beamer}
\usepackage{movie15}
\begin{document}

\begin{frame}
  \begin{center}
    \includemovie[attach=false,autoplay,text={%
        \includegraphics{files/mailto.png}%
      }]{0.4\linewidth}{0.3\linewidth}{files/random.mpg}
  \end{center}
\end{frame}

\end{document}

Dependencies

Pympress relies on:

  • Python (version ≥ 3.4, python 2.7 is supported only until pympress 1.5.1, and 3.x < 3.4 until v1.6.4).
  • Poppler, the PDF rendering library.
  • Gtk+ 3, a toolkit for creating graphical user interfaces, and its dependencies, specifically:
    • Cairo (and python bindings for cairo), the graphics library which is used to pre-render and draw over PDF pages.
    • Gdk, a lower-level graphics library to handle icons.
  • PyGi, the python bindings for Gtk+3. PyGi is also known as pygobject3, just pygobject or python3-gi.
    • Introspection bindings for poppler may be shipped separately, ensure you have those as well (typelib-1_0-Poppler-0_18 on OpenSUSE, gir1.2-poppler-0.18 on Ubuntu)
  • optionally VLC, to play videos (with the same bitness as Python) and the python-vlc bindings.
  • optionally Gstreamer to play videos (which is a Gtk library)

On linux platforms

The dependencies are often installed by default, or easily available through your package or software manager. For example, on ubuntu, you can run the following as root to make sure you have all the prerequisites assuming you use python3:

apt-get install python3 python3-pip libgtk-3-0 libpoppler-glib8 libcairo2 python3-gi python3-cairo python3-gi-cairo gobject-introspection libgirepository-1.0-1 libgirepository1.0-dev gir1.2-gtk-3.0 gir1.2-poppler-0.18

Different distributions might have different package naming conventions, for example the equivalent on OpenSUSE would be:

zypper install python3 python3-pip libgtk-3-0 libpoppler-glib8 libcairo2 python3-gobject python3-gobject-Gdk python3-cairo python3-gobject-cairo typelib-1_0-GdkPixbuf-2_0 typelib-1_0-Gtk-3_0 typelib-1_0-Poppler-0_18

On CentOS/RHEL/Fedora the dependencies would be:

yum install python36 python3-pip gtk3 poppler-glib cairo gdk-pixbuf2 python3-gobject python3-cairo

And on Arch Linux:

pacman -S --needed python python-pip gtk3 poppler cairo gobject-introspection poppler-glib python-gobject gst-plugin-gtk

On macOS

Dependencies can be installed using Homebrew:

brew install --only-dependencies pympress

On windows

The binary installer for windows comes with pympress and all its dependencies packaged.

Alternately, in order to install from pypi or from source on windows, there are two ways to get the dependencies:

  1. using MSYS2 (replace x86_64 with i686 if you're using a 32 bit machine).

    Warning: this can take a substantial amount of disk size as it requires a full software distribution and building platform.

    pacman -S --needed mingw-w64-x86_64-gtk3 mingw-w64-x86_64-cairo mingw-w64-x86_64-poppler mingw-w64-x86_64-python3 mingw-w64-x86_64-vlc python3-pip mingw-w64-x86_64-python3-pip mingw-w64-x86_64-python3-gobject mingw-w64-x86_64-python3-cairo

    This is also the strategy used to automate builds on appveyor.

  2. Using PyGobjectWin32. Be sure to check the supported Python versions (up to 3.4 at the time of writing), they appear in the FEATURES list in the linked page.

  • Install native python for windows
  • Get GTK+3, Poppler and their python bindings by executing the PyGi installer. Be sure to tick all the necessary dependencies in the installer (Poppler, Cairo, Gdk-Pixbuf).

Alternately, you can build your Gtk+3 stack from source using MSVC, see the Gnome wiki and this python script that compiles the whole Gtk+3 stack. This strategy has not been used successfully yet, due to problems building Poppler with its introspection bindings (i.e. typelib) − see #109.

Contributing

Feel free to clone this repo and use it, modify it, redistribute it, etc, under the GPLv2+. A number of contributors have taken part in the development of pympress and submitted pull requests to improve it.

Be respectful of everyone and keep this community friendly, welcoming, and harassment-free. Abusive behaviour will not be tolerated, and can be reported by email at [email protected] − wrongdoers may be permanently banned.

Pympress has inline sphinx documentation (Google style, contains rst syntax), and the docs generated from it are hosted on the github pages of this repo.

Translations

Chinese (simplified) Chinese (traditional) Czech Hindi Italian Japanese Polish French German Spanish

We thank the many contributors of translations: Agnieszka, atsuyaw, Cherrywoods, Dongwang, Estel-f, Fabio Pagnotta, Ferdinand Fichtner, Frederik. blome, FriedrichFröbel, GM, He. yifan. xs, Jaroslav Svoboda, Jeertmans, Kristýna, lazycat, Leonvincenterd, LogCreative, Lorenzo. pacchiardi, Luis Sibaja, Marcin Dohnalik, marquitul, Morfit, Mzn, Nico, Ogawa, Paul, Pierre BERTHOU, polaksta, Saulpierotti, Shebangmed, Stanisław Polak, susobaco, Tapia, Tejas, Timo Zhang, Tkoyama010, Toton95, Vojta Netrh, Vulpeculus, and Cimbali.

If you also want to add or contribute to a translation, check pympress’ page on POEditor. Note that old strings are kept and tagged removed, to give context and keep continuity between translations of successive versions. This means removed strings are unused and do not need translating.

Packages

Official releases are made to PyPI and with github releases. The community maintains a number of other packages or recipes to install pympress (see Install section). Any additions welcome.

pympress's People

Contributors

blaisorblade avatar cgevans avatar cimbali avatar comfreek avatar dannosliwcd avatar epithumia avatar f0k avatar fernand0 avatar flyingsamson avatar friedrichfroebel avatar hyiltiz avatar joreiff avatar kenohassler avatar kleest avatar logcreative avatar mans0954 avatar mic92 avatar multiflexi avatar nziermann avatar ousia avatar paulo-haas avatar polaksta avatar schnouki avatar susobaco avatar taaem avatar thepalbi avatar timvahlbrock avatar vulpeculus avatar walli545 avatar wisp3rwind avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pympress's Issues

Gtk+ version requirement to high for Linux Mint 18.3 – error on slides with videos

The file vlcvideo.glade triggers an error because of unsatisfied requirements. Videos could not be played.

Environment

  • Linux Mint 18.3
  • Python version 3.5

Pympress

  • 1.1.2
  • Installation method: source

Expected behaviour

No error :-)

Steps to reproduce

With Gtk+ version 3.18 installed pympress throws an error when changing to a slide with video:

Traceback (most recent call last):
  File "/home/teichert/Development/pympress/pympress/ui.py", line 812, in on_navigation
    self.doc.goto_next()
  File "/home/teichert/Development/pympress/pympress/document.py", line 678, in goto_next
    self.goto(self.cur_page + 1)
  File "/home/teichert/Development/pympress/pympress/document.py", line 666, in goto
    self._do_page_change(number)
  File "/home/teichert/Development/pympress/pympress/document.py", line 651, in_do_page_change
    self.page_change()
  File "/home/teichert/Development/pympress/pympress/ui.py", line 706, in on_page_change
    self.medias.replace_media_overlays(self.doc.current_page())
  File "/home/teichert/Development/pympress/pympress/extras.py", line 178, in replace_media_overlays
    v_da_c = vlcvideo.VLCVideo(self.c_overlay, show_controls, relative_margins, get_curryfied_callback)
  File "/home/teichert/Development/pympress/pympress/vlcvideo.py", line 135, in __init__
    self.load_ui('vlcvideo')
  File "/home/teichert/Development/pympress/pympress/builder.py", line 183, in load_ui
    self.add_from_file(util.get_ui_resource_file(resource_name))
GLib.Error: gtk-builder-error-quark: /home/teichert/Development/pympress/pympress/share/xml/vlcvideo.glade:5:1 Required gtk+ version 3.20, current version is 3.18 (7)

Problem

The file pympress/share/xml/vlcvideo.glade reads <requires lib="gtk+" version="3.20"/> at line 4.
I could remove the error by changing to version="3.2" as found in the other glade files.
Everything seemed to worke fine after that.

Is there any specific reason for requiring v 3.20 or was this simply inserted by the development software itself?

Use a single VLC player instead of one per window

To save resources and guarantee a perfect sync between the video in both windows, we should use a single player instance and split the output in both windows.

It does not seem possible out of the box. Relevant topics on the VLC forums:

So basically extend libVLC and the python plugin, to use the clone splitter and embed the second output.

PyGI/PyGTK Deprecation Warnings with latest release

Environment

  • Ubuntu 16.04
  • Python 3.5

Pympress

  • version 1.1.0
  • Installation method: pip

Expected behaviour

No warnings are displayed.

Steps to reproduce

Run python3 -m pympress. (May needs the latest pygobject.)

Problem

There are some deprecation warnings (and maybe some more which are not shown during normal startup):

/usr/local/lib/python3.5/dist-packages/pympress/talk_time.py:184: PyGIDeprecationWarning: GObject.timeout_add is deprecated; use GLib.timeout_add instead
  GObject.timeout_add(250, self.update_time)
/usr/local/lib/python3.5/dist-packages/pympress/ui.py:537: PyGTKDeprecationWarning: Using positional arguments with the GObject constructor has been deprecated. Please specify keyword(s) for "title, parent, action, buttons" or use a class specific constructor. See: https://wiki.gnome.org/PyGObject/InitializerDeprecations
  (Gtk.STOCK_OPEN, Gtk.ResponseType.OK))
/usr/local/lib/python3.5/dist-packages/pympress/ui.py:537: PyGTKDeprecationWarning: The "buttons" argument must be a Gtk.ButtonsType enum value. Please use the "add_buttons" method for adding buttons. See: https://wiki.gnome.org/PyGObject/InitializerDeprecations
  (Gtk.STOCK_OPEN, Gtk.ResponseType.OK))
/usr/local/lib/python3.5/dist-packages/gi/overrides/Gtk.py:542: PyGTKDeprecationWarning: The keyword(s) "parent" have been deprecated in favor of "transient_for" respectively. See: https://wiki.gnome.org/PyGObject/InitializerDeprecations
  self._init(*args, **new_kwargs)

cairo error - missing python-gi-cairo?

I am on Ubuntu 16.04 with Python 2.7 and installed the prerequisites as described in the readme. I tried to run the script on a .pdf and got errors like this.

Errors:

Traceback (most recent call last):
  File "/home/matsest/.local/lib/python2.7/site-packages/pympress/surfacecache.py", line 262, in renderer
    surface = cairo.ImageSurface(cairo.FORMAT_ARGB32, ww, wh)
TypeError: Couldn't find foreign struct converter for 'cairo.Context'
Traceback (most recent call last):
  File "/home/matsest/.local/lib/python2.7/site-packages/pympress/surfacecache.py", line 264, in renderer
    page.render_cairo(context, ww, wh, wtype)
  File "/home/matsest/.local/lib/python2.7/site-packages/pympress/document.py", line 421, in render_cairo
    self.page.render(cr)
KeyError: 'could not find foreign type Context'
# ... continuing

I solved it with performing

apt-get install python-gi-cairo

:)

ValueError: Namespace Gtk not available

I tried installing pympress for Windows 10 (64bit) according to your instructions in the readme.
When setting up PyGi (Version 3.24.1), I have not the option to tick Cairo as dependency! Poppler and Gdk-Pixbuf are available.

I'm not familiar with all the dependencies, can I install Cairo in another way directly? The website says that it's shipped with other packages.

(Always the same with windows. On my Linux-machine everything works like a charm...)

Request: Freely arrange size of windows in presenter view

Might it be possible to allow the user to freely arrange the size of the windows showing notes, current slide and next slide? As far as I know, the only method at the moment is to shift a vertical bar which often leads to a lot of unused space.

embedded video disabled on Windows 10 (binary installer with VLC)

From the logfile:

ERROR:pympress.ui:video support is disabled
Traceback (most recent call last):
  File "C:\Users\bscuser\Documents\pympress\pympress\ui.py", line 66, in <module>
  File "c:\Python\64-bit\3.4\lib\importlib\_bootstrap.py", line 2237, in _find_and_load
  File "c:\Python\64-bit\3.4\lib\importlib\_bootstrap.py", line 2226, in _find_and_load_unlocked
  File "c:\Python\64-bit\3.4\lib\importlib\_bootstrap.py", line 1191, in _load_unlocked
  File "c:\Python\64-bit\3.4\lib\importlib\_bootstrap.py", line 1161, in _load_backward_compatible
  File "C:\Users\bscuser\Documents\pympress\pympress\vlcvideo.py", line 56, in <module>
TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'

Enable blank screen with dot

It would be great to get a blank screen when pressing the dot, too. This seems to be the key event which is send by Logitech presenters.

Switch to Gtk.Application

The Gtk.Application framework seems to be meant for simplifying code, which using glade files and a Gtk.Builder did quite a bit already.

So if the change is worth it in code clarity etc, then switch to that approach.

I'm afraid that for example we'd have to write out all the Gio.Action by hand in the code, as in the demo on readthedocs. Or that having two windows content/presenter with only one with a menu bar could become messy.

Crash at startup on OSX "Failed to load shared library"

I am running OSX 10.13.3 with Python version 2.7. I installed pympress via pip yesterday (not sure what version it is, I assume the latest).

Expected behaviour

What are you trying to achieve? What's the expected outcome?
It took me a while to install the relevant dependencies and I had to create symbolic links for gi and cairo in the pympress install location, but I now have it operational such that the program will open without errors (to an extent).

My issue now is that when I try and open the program with a pdf file, or when I try to open a pdf after having already started the program, I get a pop-up messagebox simply saying

Error opening the file "/path/presentation.pdf"

I'm simply typing
pympress /path/presentation.pdf
in the terminal, and get output

(pympress:25174): Gtk-WARNING **: 10:22:21.204: Allocating size to GtkPaned 0x7fe54d0eff00 without calling gtk_widget_get_preferred_width/height(). How does the code know the size to allocate?

** (pympress:25174): WARNING **: 10:22:21.214: Failed to load shared library '@rpath/libpoppler-glib.8.dylib' referenced by the typelib: dlopen(@rpath/libpoppler-glib.8.dylib, 9): image not found

** (pympress:25174): WARNING **: 10:22:21.293: Failed to load shared library 'libcairo-gobject.2.dylib' referenced by the typelib: dlopen(libcairo-gobject.2.dylib, 9): image not found

The log file at /tmp/pympress.log is empty.

Any ideas on how to fix this issue?

Request: Internal pointer by using mouse on current slide in presenter mode

I am actually looking for something like using mouse arrow while holding Ctrl in powerpoint (https://www.youtube.com/watch?v=ttYOIVaJnf8). I know about the option to draw onto the current slide by pressing H. However, this is permanent and sort of messes up your slides if you highlight different things after each other. Also, it is sort of distracting to jump back and forth between presenter mode and drawing mode. Perfect for me (and colleagues) would be mimicking the powerpoint behaviour by directly using the mouse as pointer in presenter view inside the current slide window.

Clocks are confusing

There's too many of them and/or they are not differentiated enough. Any user should see how much time has passed since the presentation start with a simple glimpse, without having to look for that information on screen.

Hence, make other clocks (estimated time, wall clock) have one (or more) of:

  • smaller font
  • different format (e.g. 1:30pm or 13h30 instead of 1:30)
  • hideable
  • hidden by default

AttributeError: 'Overlay' object has no attribute 'reorder_overlay'

pympress document.pdf 
Traceback (most recent call last):
  File "/home/moi/.local/bin/pympress", line 9, in <module>
    load_entry_point('pympress==0.6', 'gui_scripts', 'pympress')()
  File "/home/moi/.local/lib/python3.4/site-packages/pympress/__main__.py", line 86, in main
    ui = pympress.ui.UI(name, ett)
  File "/home/moi/.local/lib/python3.4/site-packages/pympress/ui.py", line 275, in __init__
    self.setup_scribbling()
  File "/home/moi/.local/lib/python3.4/site-packages/pympress/ui.py", line 1897, in setup_scribbling
    self.c_overlay.reorder_overlay(self.scribble_c_eb, 1)
AttributeError: 'Overlay' object has no attribute 'reorder_overlay'

Installed via python3 -m pip

[OSX] AttributeError: 'module' object has no attribute 'bindtextdomain'

Hello,

Apparently this has been tested on Mac (assuming you mean OSX?), however I am not able to get past this error:

$ pympress            
2017-02-24 10:17:08.800 python2.7[49410:3172507] *** WARNING: Method userSpaceScaleFactor in class NSView is deprecated on 10.7 and later. It should not be used in new applications. Use convertRectToBacking: instead. 
Traceback (most recent call last):
  File "/tmp/virtual/bin/pympress", line 7, in <module>
    from pympress.__main__ import main
  File "/tmp/virtual/lib/python2.7/site-packages/pympress/__main__.py", line 46, in <module>
    locale.bindtextdomain('pympress', pympress.util.get_resource_path('share', 'locale'))
AttributeError: 'module' object has no attribute 'bindtextdomain'

If I try:

$ python
Python 2.7.13 (default, Feb 24 2017, 10:13:58) 
[GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.42.1)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import locale
>>> locale.bindtextdomain
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'bindtextdomain'
>>>

I am a bit puzzled at this point, I thought that was a standard Python feature.

Regards

Option -t raises exception

Environment

  • Linux Ubuntu 17.10
  • Python 3.6.3

Pympress

  • 1.1.1
  • pip

Expected behaviour

I try to specify the duration of the presentation using '-t' option or 't' key. When '-t' is used, exception occurs. If I run without the abovementioned option everything is OK. But if I press 't' and I tray to set the duration, e.g., 90:00, then "Time elapsed" value does not change, and after closing the program displays:

(pympress3:1978): Gtk-WARNING **: Allocating size to GtkPaned 0x1a95f90 without calling gtk_widget_get_preferred_width/height(). How does the code know the size to allocate?
Protocol error: bad 3 (Window); Sequence Number 5
 Opcode (20, 0) = GetProperty
 Bad resource 1483866739 (0x58720273)
 at -e line 15.
Traceback (most recent call last):
  File "/home/polak/.local/lib/python3.6/site-packages/pympress/talk_time.py", line 256, in update_time
    self.label_colorer.update_time_color(self.ett.est_time - self.delta)
  File "/home/polak/.local/lib/python3.6/site-packages/pympress/talk_time.py", line 135, in update_time_color
    color_spec = '* {color: {}}'.format(color.to_string())
KeyError: 'color'

Steps to reproduce

What are you doing?
Running pympress with -t / --talk_time

$ pympress3 -t 90:00 js.pdf
$ pympress3 --talk-time=90:00 js.pdf

Problem

When I run pympress without '-t' everything is OK. But when I run it as follows:
pympress3 -t 90:00 js.pdf it displays:

(pympress3:32688): Gtk-WARNING **: Allocating size to GtkPaned 0x30abf90 without calling gtk_widget_get_preferred_width/height(). How does the code know the size to allocate?
Traceback (most recent call last):
  File "/home/polak/.local/bin/pympress3", line 11, in <module>
    load_entry_point('pympress==1.1.1', 'gui_scripts', 'pympress3')()
  File "/home/polak/.local/lib/python3.6/site-packages/pympress/__main__.py", line 113, in main
    gui = ui.UI(ett, name)
  File "/home/polak/.local/lib/python3.6/site-packages/pympress/ui.py", line 221, in __init__
    self.swap_document(docpath)
  File "/home/polak/.local/lib/python3.6/site-packages/pympress/ui.py", line 501, in swap_document
    self.talk_time.reset_timer()
  File "/home/polak/.local/lib/python3.6/site-packages/pympress/talk_time.py", line 233, in reset_timer
    self.update_time()
  File "/home/polak/.local/lib/python3.6/site-packages/pympress/talk_time.py", line 256, in update_time
    self.label_colorer.update_time_color(self.ett.est_time - self.delta)
  File "/home/polak/.local/lib/python3.6/site-packages/pympress/talk_time.py", line 135, in update_time_color
    color_spec = '* {color: {}}'.format(color.to_string())
KeyError: 'color'

-----------------------------------------------------------------

$ cat pympress.log 
CRITICAL:pympress.__main__:Uncaught exception:
Traceback (most recent call last):
  File "/home/polak/.local/bin/pympress3", line 11, in <module>
    load_entry_point('pympress==1.1.1', 'gui_scripts', 'pympress3')()
  File "/home/polak/.local/lib/python3.6/site-packages/pympress/__main__.py", line 113, in main
    gui = ui.UI(ett, name)
  File "/home/polak/.local/lib/python3.6/site-packages/pympress/ui.py", line 221, in __init__
    self.swap_document(docpath)
  File "/home/polak/.local/lib/python3.6/site-packages/pympress/ui.py", line 501, in swap_document
    self.talk_time.reset_timer()
  File "/home/polak/.local/lib/python3.6/site-packages/pympress/talk_time.py", line 233, in reset_timer
    self.update_time()
  File "/home/polak/.local/lib/python3.6/site-packages/pympress/talk_time.py", line 256, in update_time
    self.label_colorer.update_time_color(self.ett.est_time - self.delta)
  File "/home/polak/.local/lib/python3.6/site-packages/pympress/talk_time.py", line 135, in update_time_color
    color_spec = '* {color: {}}'.format(color.to_string())
KeyError: 'color'

No module named gi

Hi,
I'm working on ubuntu 17.04 with gnome 3 and I installed it using pip install pympress. I also installed the dependencies using apt-get install python3 python3-pip libgtk-3-0 libpoppler-glib8 libcairo2 python3-gi python3-cairo gir1.2-gtk-3.0 gir1.2-poppler-0.18 and I get the following error :
image

Any idea ?

Hyperref links

I've noticed that my hyperref links return to the first frame, rather than to the linked frame. I tested the links with pdfpc and okular, where they do work. I am not sure if this is a bug or a suggestion for improvement.

I like pympress a lot, thanks for sharing it.

Blurry rendering

Setup

  • Python 3.6.3 on Arch Linux 4.13.11-1
  • Pympress 1.1.0b2, installed with pip from github
  • external Monitor (1680x1050) on a laptop (2560x1440)

Expected behaviour

Text and images should be sharp on all slides

Steps to reproduce

Open any PDF to start the presentation

Problem

On the first slide, everything (full screen slide + 2 smaller previews) is nice and sharp. When I switch to the next slide, it and all subsequent slides are rendered blurry, as if they were upscaled from a smaller resolution.
I can force a re-render by moving the vertical delimiter between the previews or by switching the screens with S, which makes everything on the current and the next slide appear sharp. The following slides are blurry again.
I suspect that this is some scaling issue where the pre-rendered slides don't use the correct resolution. pympress.log also seems to point towards that direction:

CRITICAL:pympress.main:Uncaught exception:
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/pympress/ui.py", line 1166, in on_configure_win
p_monitor = self.p_win.get_screen().get_monitor_at_window(self.p_frame_cur.get_parent_window())
TypeError: Argument 1 does not allow None as a value

Question about window size

Hi, congratulations on your show. I have a question. In a dual monitor presentation, it is possible to start the fulscreen presentation, but it is possible that the other window, the control window, will not start full screen? I'd like a small window. I've tried it with the openbox configuration, but the output of "xprop | grep class" is the same for both windows, so I can't define the size for a single window.
I am using the latest version of pympres on lxde in Tisquel 8 (ubuntu 16.04). Thank you for your work.

Control playback of video files – seek and current position

Would’t it be nice to be able to control the playback of a video aside of pausing and resuming?

Pdfpc implements such a feature. I have used it lately, but it has a very high cpu usage while playing videos, which does not go down once the playback is stopped – this is a problem in long presentations because it limits my battery time dramatically.

Pympress + vlc performs much better in that way, but control over video playback is currently very limited.

I could imagine an implementation with keystrokes (as possible in vlc player) or by showing the playing video in the presenter view, too – together with a kind of progressbar that allows seeking by clicking a specific position or something like that.

I can not tell if this is possible and how much work it would be as I have never looked into python-vlc so far.

support playing embedded video on mac OS

Environment

  • OSX 10.13.3
  • Python 3.6

Pympress

  • not sure where to find version (downloaded in last 2 weeks)
  • installed with pip (using homebrew)

Expected behaviour

Play a PDF with embedded .mov files

Steps to reproduce

Play a PDF with embedded .mov files (the PDF works fine in Adobe Reader DC)

Problem

What's happening instead of what you are expecting?
Embedded videos will not play even though audio plays fine.

pympress.log is not present in any of the tmp folders. The issue that displays in terminal is

Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/pympress/vlcvideo.py", line 161, in handle_embed
    self.player.set_xwindow(self.movie_zone.get_window().get_xid())
AttributeError: 'GdkQuartzWindow' object has no attribute 'get_xid'
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/pympress/vlcvideo.py", line 161, in handle_embed
    self.player.set_xwindow(self.movie_zone.get_window().get_xid())
AttributeError: 'GdkQuartzWindow' object has no attribute 'get_xid'

(pympress:12460): Gtk-WARNING **: 11:49:47.824: Error loading theme icon 'media-playback-start' for stock: 
(pympress:12460): Gtk-WARNING **: 11:49:47.824: Error loading theme icon 'media-playback-pause' for stock: Icon 'media-playback-pause' not present in theme Adwaita

(pympress:12460): Gtk-WARNING **: 11:49:47.824: Error loading theme icon 'media-playback-stop' for stock: Icon 'media-playback-stop' not present in theme Adwaita
[00007fc3f45de5e0] videotoolbox decoder: Using Video Toolbox to decode 'h264'
[00007fc3f78878e0] videotoolbox decoder: Using Video Toolbox to decode 'h264'
[00007fc3f78878e0] videotoolbox decoder: vt cvpx chroma: BGRA
[00007fc3f45de5e0] videotoolbox decoder: vt cvpx chroma: BGRA
[00007fc3f6a67fd0] macosx vout display error: No drawable-nsobject nor vout_window_t found, passing over.
[00007fc3f79492b0] macosx vout display error: No drawable-nsobject nor vout_window_t found, passing over.
[00007fc3f320e2f0] main video output error: video output creation failed
[00007fc3f320bcf0] main video output error: video output creation failed
[00007fc3f78878e0] main decoder error: failed to create video output
[00007fc3f45de5e0] main decoder error: failed to create video output
[00007fc3f78878e0] videotoolbox decoder error: decoder failure, Abort.
[00007fc3f45de5e0] videotoolbox decoder error: decoder failure, Abort.`

Heading to line 161 in vlcvideo.py:

if sys.platform == 'win32':
    self.player.set_hwnd(get_window_handle(self.movie_zone.get_window())) #get_property('window')
else:
    self.player.set_xwindow(self.movie_zone.get_window().get_xid())
return False

The issue is related to using an XQuartz window which does not have the attribute for get_xid()

Use monospaced font for time display

Environment

  • Manjaro Linux
  • Python 3.6.4

Pympress

  • version 1.1.2
  • Installation method: pip

Expected behaviour

The displayed time has a fixed width and does not move its position.

Steps to reproduce

  1. Open a presentation.
  2. Look at the clock for some seconds.

Problem

The displayed time string moves its position depending on the width of the displayed time string.

Pre-rendering not working; 100% CPU usage

I'm running pympress 1.0 on Windows, and pre-rendering doesn't seem to be working:

  • Pympress is constantly using one CPU core.
  • If I simply wait, RAM usage doesn't go up.
  • If I click through the slides, some complex slides take a fraction of a second to render. RAM usage goes up while I do this.
  • After having clicked through all slides once, RAM usage is high (1.56 GB for a >100 slides presentation), and clicking through the slides is smooth.

To me, it looks like the prerenderer gets stuck, burning CPU without progressing.

(I'd be happy to privately send you the PDF file I use, if this helps you debugging this.)

Embedded video appears at wrong location and too small when notes on second page enabled.

Environment

  • Fedora 26, KDE
  • Python 3.6.4

Pympress

  • version 1.1.2
  • Installation method: pip

Expected behaviour

Embeded video when clicked should play seamlessly over frame grab, matching position and size.

Steps to reproduce

Minimum working example:

\documentclass{beamer}
\usepackage{multimedia}
\usepackage{pgfpages}
\setbeameroption{show notes}
\setbeameroption{show notes on second screen=right}
\begin{document}
\begin{frame}
\movie{\includegraphics[width=0.8\textwidth]{test.jpg}}{test.mp4}
\end{frame}
\end{document}

Problem

Video appears with wrong size (too small, perhaps 1/2 of expected width) and in slightly wrong location (too far left by about 1/2). If notes on second page not used, works correctly.

/tmp/pympress.log is empty

vlc always opens new window, rather than embedding

Environment

  • Fedora 26, KDE spin
  • Python 3.6.4
  • (beamer / pdflatex)

Pympress

Expected behaviour

Video playback should appear seamlessly above the still image that acts as a placeholder, without any window decorations; the user should not be aware that a separate program has been invoked to perform the video playback.

Steps to reproduce

Create PDF in beamer / pdflatex that includes .mp4 video.
Start pympress on PDF and advance to page that has embedded video.
Click on placeholder for embedded video.

Problem

Instead of embedding properly, VLC opens a new window to play the video. The video plays correctly, except that it is not embedded and not at the size expected from the size of the placeholder.

The log file pympress.log is empty.

"Blue" is not translated into Polish

I have noticed that word "Blue" is not translated into Polish (MO file) - 'pympress' displays "Blue" instead of "Niebieski". The cause is presence of "#, fuzzy" in line 237 of the locale/pl/pympress.po file that I sent you last year. I did not remove this string (label) because I thought it is necessary. The file also contains some fuzzy entries - I am not sure if they are needed now. The same problem is probably in German translation - the presence of "#, fuzzy" before "_Blue".

Encoding issues in translation

It looks like pympress has a problem with rendering Umlauts:

image
(This is from the 1.0.2 binary install.)

The broken character should be an ä.

(Side note: I find it curious that pympress is loading the German interface at all. My system language is English, only my region is set to Germany.)

File playlist

It would be nice to have a (possibly collapsible) list of files to open in the presenter window. Maybe with a file tree as well?
Depends on #8

Useful in situations where a set of presentations are to be presented in order and the user would like to minimize the setup time between talks.

Latex/Beamer link not working in presentation

Hello gyus,

i have a problem with pympress and links in my presentation.
It is difficult to click on a link, because in the main window (picture1) it is not possible to press a link.
In the secondary window it is possible by good luck. Sometimes it works and sometimes not

Picture1

Picture2

Gdk.RGBA – import missing in pympress/config.py

I think there is a import statement missing in pympress/config.py

When there is no config file (e.g. because of a fresh install) config.py throws an Error at line 167.

I think there is missing the following statement at the beginning of the file:

from gi.repository import Gdk

Invalid checkbox states in menu

Environment

  • Windows 8.1
  • Python 3.4 (64 bit)

Pympress

  • version 1.0.4 from pip
  • version 1.1.0.b2 from master (using self-built executable from cx_freeze)

Expected behaviour, Steps to reproduce, Problem

  1. Presentation -> Pause timer
    • Open presentation by calling python -m pympress presentation.pdf
    • Timer is paused, checkbox in presentation menu entry is checked -> works
    • Switch to next slide, checkbox is not checked anymore as the timer started -> does not work
    • Pause timer, checkbox is checked (currently unchecked) -> does not work
  2. Presentation -> Highlight
    • Call highlight mode from presentation menu entry, checkbox is checked -> works
    • Close the highlighting mode using the close button, checkbox is not checked anymore -> does not work

(The problem may appear for other checkboxes, too, which I did not check.)

Positioning windows does not work on i3wm

Environment

  • OS: Manjaro 17.1.6 Hakoila with i3wm
  • Python 3.6.4

Pympress

  • 1.1.2
  • Installation method: pip

Expected behaviour

I tried to display the presentation on the right screen and presenter on the left screen
I try the function change screen in the menu, but without result

Steps to reproduce

pympress file.pdf

Problem

the presenter and presentation screens are reversed
some functions in the menu does not work

2018-03-15-134123_3840x1080_scrot

pympress.log

INFO:pympress.main:Pympress version 1.1.2 by:
2009, 2010 Thomas Jost [email protected]
2015-2017 Cimbali [email protected]
2016 Christoph Rath [email protected]
2016 Epithumia [email protected]
WARNING:pympress.ui:Attention: La fenêtre de contenu et de présenteur ne peuvent être sur le même écran pour démarrer en plein écran !

Unpause by click adds waited time to timer

There is inconsistent behaviour when unpausing. If I unpause using P, the timer continues where it left off. E.g. I pause at 2:00, wait 20 seconds, then unpause by pressing P, the timer continues with 2:01.

When I unpause using navigation (e.g. next page), the timer instead continues at 2:21.

(By the way: Awesome project, thanks!)

'gdk_pixbuf_new_from_file' could not be found

I just tried to use the latest master, but could not get it to run (tested on Windows 8.1 with Python 3.4, no error on Ubuntu with Python3.5).

Seems like there is some error with the orientation value:

ERROR:pympress.ui:Invalid layout
Traceback (most recent call last):
  File "C:\Users\Me\Documents\pympress\pympress\ui.py", line 633, in make_pwin
    self.validate_layout(self.notes_layout, set(self.placeable_widgets.keys()) - {"annotations"})
  File "C:\Users\Me\Documents\pympress\pympress\ui.py", line 447, in validate_layout
    raise ValueError('"orientation" is mandatory and must be "horizontal" or "vertical" at node {}'.format(w_desc))
ValueError: "orientation" is mandatory and must be "horizontal" or "vertical" at node {}
ERROR:pympress.ui:Invalid layout
Traceback (most recent call last):
  File "C:\Users\Me\Documents\pympress\pympress\ui.py", line 640, in make_pwin
    self.validate_layout(self.plain_layout, set(self.placeable_widgets.keys()) - {"notes"})
  File "C:\Users\Me\Documents\pympress\pympress\ui.py", line 447, in validate_layout
    raise ValueError('"orientation" is mandatory and must be "horizontal" or "vertical" at node {}'.format(w_desc))
ValueError: "orientation" is mandatory and must be "horizontal" or "vertical" at node {}

There seems to be another error which seems to occur on Windows only:

CRITICAL:__main__:Uncaught exception:
Traceback (most recent call last):
  File "C:\Python34\lib\runpy.py", line 170, in _run_module_as_main
    "__main__", mod_spec)
  File "C:\Python34\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Users\Me\Documents\pympress\pympress\__main__.py", line 123, in <module>
    main()
  File "C:\Users\Me\Documents\pympress\pympress\__main__.py", line 116, in main
    ui = pympress.ui.UI(ett, name)
  File "C:\Users\Me\Documents\pympress\pympress\ui.py", line 329, in __init__
    self.make_pwin()
  File "C:\Users\Me\Documents\pympress\pympress\ui.py", line 645, in make_pwin
    self.rearrange_p_layout(self.notes_layout if self.notes_mode else self.plain_layout)
  File "C:\Users\Me\Documents\pympress\pympress\ui.py", line 618, in rearrange_p_layout
    self.load_pointer(default)
  File "C:\Users\Me\Documents\pympress\pympress\ui.py", line 2114, in load_pointer
    self.pointer = pympress.util.get_icon_pixbuf(name + '.png')
  File "C:\Users\Me\Documents\pympress\pympress\util.py", line 107, in get_icon_pixbuf
    return GdkPixbuf.Pixbuf.new_from_file(get_resource_path('share', 'pixmaps', name))
GLib.Error: g-invoke-error-quark: Could not locate gdk_pixbuf_new_from_file: 'gdk_pixbuf_new_from_file': The specified procedure could not be found. (1)

Support cx_Freeze version 5.x

When running the cx_Freeze setup script on Windows, an error is thrown:

running build_exe
error: error in setup script: command 'build_exe' has no such option 'compressed'

Seems like the support for this option has been dropped some time ago: marcelotduarte/cx_Freeze#253.

By the way: Is there any documentation on how to obtain the installer for the pympress installer (tried it on Windows)? After removing the the compressed option from the corresponding dictionary, a folder got created, but after trying to start the pympress.exe file from the command line, it got closed after some time without any visible output.

Beamer transition animation

Hello Guys,

i have add a transition animation for a slide in my presentation, but it doesnt works with pympress.
In an PDF Viewer(foxit) i can see the animation.

Example:

\documentclass{beamer}
\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
\usepackage{xcolor}
\usepackage{pgfpages}

\setbeameroption{show notes on second screen = right}

\begin{document}
	\begin{frame}
		\only<1>{\includegraphics[width=0.5\textwidth]{example-image-a}}
		\only<2>{\includegraphics[width=0.5\textwidth]{example-image-golden}}
		\transdissolve<2>
	\end{frame}
\end{document}

[python2] TypeError: string indices must be integers

Today i have installed new version and when I try to execute the code ...

$ ./pympress
Traceback (most recent call last):
File "./pympress", line 11, in
load_entry_point('pympress==1.0.3', 'gui_scripts', 'pympress')()
File "/home/polak/.local/lib/python2.7/site-packages/pympress/main.py", line 116, in main
ui = pympress.ui.UI(ett, name)
File "/home/polak/.local/lib/python2.7/site-packages/pympress/ui.py", line 329, in init
self.make_pwin()
File "/home/polak/.local/lib/python2.7/site-packages/pympress/ui.py", line 645, in make_pwin
self.rearrange_p_layout(self.notes_layout if self.notes_mode else self.plain_layout)
File "/home/polak/.local/lib/python2.7/site-packages/pympress/ui.py", line 577, in rearrange_p_layout
w = Gtk.Box.new(getattr(Gtk.Orientation, w_desc['orientation'].upper()), 5)
TypeError: string indices must be integers

Video/audio playback tinny (because of the doubled video output?)

Environment

  • Linux Mint 18.3
  • Python version 3.5

Pympress

  • 1.1
  • Installation method: source

Expected behaviour

When playing videos the sound should be heard clearly.

Steps to reproduce

  1. Open a pdf file with embedded video.
  2. Show a slide with video and start playback.
  3. Listen closely :)
  4. Examine the system’s audio output streams (e.g. with pavucontrol) – you should see the audio track of the video twice.

Problem

Sometimes the audio track of videos sounds quite tinny. Probably this is because of the doubled video on the presenter and the presentation view. That way the audio output is doubled, too.
When disabling/muting one of the two output streams (e.g. with pavucontrol) the sound is clear again.

I think it is a good idea to disable the audio tracks of one of the two player instances.
Sadly, libvlc doesn’t seem to be quit straight forward there. I could not manage it this morning, not even with reading the docs.
Looks like you’ve got to grab the audio track of one of the player’s media, "free" it somehow and then mute or disable it. Didn’t get it right.

Resolve shared files from local folder if possible

Environment

  • Ubuntu 16.04
  • Python 3.5

Pympress

  • latest master in local folder
  • current release installed via pip

Expected behaviour

Starting pympress in local master clone using python3 -m pympress from within a folder should use the shared files from the share/ directory of the current folder and not throw any errors.

Steps to reproduce

  • Install pympress using pip3.
  • Clone the latest master into a local directory.
  • Run python3 -m pympress inside the cloned directory.

Problem

The shared files from the pip install are used and an error message may be produced, see 0bdc5da#commitcomment-26206898 and 0bdc5da#commitcomment-26212807.

no write permission for log file

I just installed pympress on Windows 10 (binary installer). The installation finished without errors, but I was not able to start pympress. Reason: one of the first things the program is doing it to create a logfile pympress.log. This file is created in the current working directory. If the current working directory is the installation directory, then the program will (silently) fail to start. Also, it is not possible to use the "open with" function of the windows explorer because of the same reason.
As a workaround I created now a batch-file, which starts pympress in a folder with write permission. I think, it would be a better solution to create the logfile not in the current working directory. What do you think about this change:

logging.basicConfig(filename=os.path.join(tempfile.gettempdir(), 'pympress.log'), level=log_level)

The logfile would be created within the default temporal folder of the OS. That should work on all OS.

Gtk-WARNING for GtkPaned

Environment

  • Manjaro Linux
  • Python 3.6.4

Pympress

  • version 1.1.2
  • Installation method: pip

Expected behaviour

No warnings.

Steps to reproduce

Run pympress presentation.pdf from the terminal - the first warning is shown. When opening the help afterwards, the second warning is shown.

Problem

Warnings are shown:

(pympress:8764): Gtk-WARNING **: Allocating size to GtkPaned 0x558000273f40 without calling gtk_widget_get_preferred_width/height(). How does the code know the size to allocate?
Gtk-Message: GtkDialog mapped without a transient parent. This is discouraged.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.