Installation#

HPBooklet provides 2 types of executable files for Windows, Linux(Ubuntu). All the resources are fully independent to OS, therefore supporting OSX is possible. However, the developer does not have any Mac device, so it will be presented later. If you are OSX user you can build project yourself see below From Source section.

Executable bunldle#

Download executable file from Sourceforge.

Download HornPenguin Booklet

Repository provides two types of program one file version and one directory bundle. The directory bundle version of each OS is presented with compressed file, zip and tgz which are common compressed file format in each OS.

Windows#

default
booklet.exe # one file version
booklet_Windows.zip # one directory bundle

Linux#

default
booklet # one file version
booklet_Linux.tgz # one directory bundle

OSX#

Please build yourself or directly execute from sources. See the below section.

Warning

Python is compatible for major three OSs, however, the implementations of tkinter in those OSs are different in details. For example, there is a iconbitmap issue in Linux environment and basic tkiner Label and Button are not work properly in OSX of color routines. The developer tested and saw those bugs and fixed them with best efforts (tkmacosx module was useful), but there can be some bugs in Linux and Mac environments. Please notice the developer those bugs to fix.

Older version#

The 0.0.1 version was seperated by user interface. The graphic interface version got w suffix in file name.

Windows

default
booklet.exe # command line interface
bookletw.exe # graphic interface

Linux

default
booklet
bookletw

From source#

This section describes the execution and build process with source directory.

Get a project#

You can download the project with git.

default
git clone https://github.com/HornPenguin/Booklet.git # github
git clone https://git.code.sf.net/p/hornpenguinbooklet/code hornpenguinbooklet-code # sourceforge

or download with zipped file from project source repository ..

Directory

  • booklet: Python source codes.

  • dist: Standalone executable files for OSs.

  • documents: Sphinx rst documents

  • images: Miscellaneous images, in working images or original .odg files.

  • resources: Essential resources for program, voice, images, logo, … .

  • test: Temper test directory.

File

  • .readthedocs.yaml: Readthedocs setting file.

  • build.py: Build script for Pyinstaller and Sphinx.

  • Makefile, make.bat: Sphinx build script.

Dependencies#

Install above dependencies with next command.

default
pip install PyPDF2 reportlab Pillow simpleaudio fonttools

For simpleaudio in Ubuntu, it requires compilers, build tools, and prerequisite library, libasound2-dev, to install. If you are using Ubuntu, you can install build-essential from Ubuntu repository and install libasound2-dev with next command.

default
sudo apt install build-essential libasound2-dev

In Mac, they are automatically installed.

Execution with python#

From the root of project directory,

CUI#

default
python ./booklet/main.py --console {INPUT} {OUTPUTPAHT} {options}

See usage for options and basic usages.

GUI#

default
python ./booklet/main.py

Build#

This project uses PyInstaller as a build tool to generate a standalone executable bundle. In the root of the project directory, there is a build.py file. It is a simple python script to initiate the proejct and document build process with pyinstaller and sphinx. Install Pyinstaller, befroe you start to build.

default
pip install pyinstaller

There are prefixed arguments in build.py and you can use additional pyinstaller arguments. See PyInstaller documents.

default
python build.py --onefile # one file bundle
python build.py --onedir # one directory bundle

Build with graphic user interface with splash image.

default
python build.py --onefile --splash=resources\\splash.png

The --onedir option add platform name to its directory name.

If you add arguments with --sphinx option, build.py automatically build project documents with sphinx.

default
python build.py --onedir --sphinx=html