├── .gitignore ├── .readthedocs.yaml ├── Panconvert.py ├── Panconvert.spec ├── docs ├── Developer │ ├── Build_Instructions.md │ ├── Platforms.md │ └── changelog.md ├── User_Guide │ ├── Basic_Usage.md │ ├── Customizing_Panconvert.md │ ├── Install_Instructions.md │ ├── Known_Problems.md │ ├── Pandoc_Help.md │ ├── Update.md │ └── basic_info.md ├── Xtras │ └── requirements_mkdocs.txt ├── index.md └── license.txt ├── mkdocs.yml ├── packaging ├── Panconvert.spec ├── Panconvert_InstallBuilder_Linux.xml ├── Panconvert_InstallBuilder_MacOS.xml ├── Panconvert_InstallBuilder_Windows.xml ├── Panconvert_PKGBuilder.pkgproj └── Readme_first.md ├── readme.md └── source ├── __init__.py ├── converter ├── __init__.py ├── batch_converter.py ├── lyx_converter.py └── manual_converter.py ├── dialogs ├── __init__.py ├── dialog_batch.py ├── dialog_fromformat.py ├── dialog_help.py ├── dialog_openuri.py ├── dialog_options.py ├── dialog_preferences.py └── dialog_toformat.py ├── gui ├── __init__.py ├── icons.qrc ├── icons │ ├── close.png │ ├── export │ ├── export_latex │ ├── freferences │ ├── help.png │ ├── icon.icns │ ├── new.icns │ ├── open │ ├── opml │ ├── preferences │ ├── save │ └── save_as ├── icons_rc.py ├── panconvert_diag_fromformat.py ├── panconvert_diag_fromformat.ui ├── panconvert_diag_help.py ├── panconvert_diag_help.ui ├── panconvert_diag_info.py ├── panconvert_diag_info.ui ├── panconvert_diag_openuri.py ├── panconvert_diag_openuri.ui ├── panconvert_diag_prefpane.py ├── panconvert_diag_prefpane.ui ├── panconvert_diag_toformat.py ├── panconvert_diag_toformat.ui ├── panconvert_dialog_batch.py ├── panconvert_dialog_batch.ui ├── panconvert_gui.py ├── panconvert_gui.ui ├── panconvert_gui_old.py └── panconvert_gui_old.ui ├── helpers ├── __init__.py ├── helper_functions.py └── interface_pandoc.py ├── language ├── Panconvert_de.qm ├── Panconvert_de.ts ├── Panconvert_es.qm ├── Panconvert_es.ts ├── Panconvert_fr.qm ├── Panconvert_fr.ts ├── Panconvert_xx.ts ├── __init__.py ├── messages.py └── translation.po └── main_gui.py /.gitignore: -------------------------------------------------------------------------------- 1 | /venv/ 2 | /venv39/ 3 | /build/ 4 | /dist/ 5 | /Installer_MacOS/ 6 | 7 | .idea 8 | /Panconvert_install.xml.backup 9 | /binaries 10 | /output/ 11 | -------------------------------------------------------------------------------- /.readthedocs.yaml: -------------------------------------------------------------------------------- 1 | # Read the Docs configuration file for MkDocs projects 2 | # See https://docs.readthedocs.io/en/stable/config-file/v2.html for details 3 | 4 | # Required 5 | version: 2 6 | 7 | # Set the version of Python and other tools you might need 8 | build: 9 | os: ubuntu-22.04 10 | tools: 11 | python: "3.12" 12 | 13 | mkdocs: 14 | configuration: mkdocs.yml 15 | 16 | # Optionally declare the Python requirements required to build your docs 17 | python: 18 | install: 19 | - requirements: docs/Xtras/requirements_mkdocs.txt -------------------------------------------------------------------------------- /Panconvert.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | __author__ = 'apaeffgen' 3 | # -*- coding: utf-8 -*- 4 | 5 | # This file is part of Panconvert. 6 | # 7 | # Panconvert is free software: you can redistribute it and/or modify 8 | # it under the terms of the GNU General Public License as published by 9 | # the Free Software Foundation, either version 3 of the License, or 10 | # (at your option) any later version. 11 | # 12 | # Panconvert is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU General Public License 18 | # along with Panconvert. If not, see . 19 | 20 | from PyQt5 import QtCore 21 | from PyQt5 import QtGui 22 | from PyQt5.QtCore import QPoint, QSize 23 | from PyQt5.QtCore import QT_VERSION_STR 24 | from PyQt5.QtCore import QLocale 25 | from source.main_gui import * 26 | import sys 27 | 28 | def main(): 29 | 30 | app = QtWidgets.QApplication(sys.argv) 31 | app.installTranslator(_translate) 32 | myapp = StartQT5() 33 | myapp.show () 34 | sys.exit (app.exec_ () ) 35 | 36 | 37 | if __name__ == '__main__': 38 | import sys 39 | 40 | settings = QSettings('Pandoc', 'PanConvert') 41 | 42 | actualLanguage = settings.value('default_language') 43 | 44 | path_pandoc_tmp = settings.value('path_pandoc','') 45 | path_pandoc = str(path_pandoc_tmp) 46 | 47 | _translate = QtCore.QTranslator() 48 | script_dir = os.path.dirname(sys.argv[0]) 49 | 50 | if actualLanguage in ['de','es','fr']: 51 | xx_language = script_dir + "/Panconvert_" + actualLanguage + ".qm" 52 | if os.path.isfile(xx_language): 53 | _translate.load(xx_language) 54 | else: 55 | path2trxx = script_dir + "/source/language/Panconvert_" + \ 56 | actualLanguage + ".qm" 57 | _translate.load(path2trxx) 58 | 59 | if not os.path.isfile(str(path_pandoc)): 60 | get_path_pandoc() 61 | 62 | main() 63 | -------------------------------------------------------------------------------- /Panconvert.spec: -------------------------------------------------------------------------------- 1 | # -*- mode: python ; coding: utf-8 -*- 2 | 3 | 4 | a = Analysis( 5 | ['/Users/apaeffgen/PROG/Python/PanConvert/Panconvert.py'], 6 | pathex=[], 7 | binaries=[], 8 | datas=[('source/language/Panconvert_de.qm', 'MacOS')], 9 | hiddenimports=[], 10 | hookspath=[], 11 | hooksconfig={}, 12 | runtime_hooks=[], 13 | excludes=[], 14 | noarchive=False, 15 | ) 16 | pyz = PYZ(a.pure) 17 | 18 | exe = EXE( 19 | pyz, 20 | a.scripts, 21 | a.binaries, 22 | a.datas, 23 | [], 24 | name='Panconvert', 25 | debug=False, 26 | bootloader_ignore_signals=False, 27 | strip=False, 28 | upx=True, 29 | upx_exclude=[], 30 | runtime_tmpdir=None, 31 | console=False, 32 | disable_windowed_traceback=False, 33 | argv_emulation=False, 34 | target_arch=None, 35 | codesign_identity=None, 36 | entitlements_file=None, 37 | ) 38 | app = BUNDLE( 39 | exe, 40 | name='Panconvert.app', 41 | icon=None, 42 | bundle_identifier=None, 43 | ) 44 | -------------------------------------------------------------------------------- /docs/Developer/Build_Instructions.md: -------------------------------------------------------------------------------- 1 | # Building selfcontained executables 2 | 3 | ## Prerequisites 4 | 5 | - Installing QT5.11.0, PyQT5.11.2, Python3.5.6. With other versions you are on your own. They may fail. 6 | - Installing the pyinstaller scripts for your platform (See http://pyinstaller.readthedocs.io) 7 | - Test that you can run Panconvert.py with your Python3 interpreter 8 | 9 | 10 | ## Running the Build-Script 11 | - Run pyinstaller Panconvert.spec 12 | - some usefull optins for all plattforms: --onefile --windowed 13 | - The programs can be to packaged: create-dmg for Macos, Inno Setup for windows or Zipped for Linux 14 | 15 | 16 | ## Known Issues: 17 | 18 | - The source code is not fully compatible with the --windowed option. Expect some glitches of 19 | autodetection of pandoc 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /docs/Developer/Platforms.md: -------------------------------------------------------------------------------- 1 | # Supported OS / Hardware Platforms 2 | 3 | ## Platforms tested: (Binary Version 0.2.9) 4 | 5 | * Windows 10 (64bit) 6 | * Mac OS: Ventura 13.6 (M2) 7 | 8 | ## Platforms that should be supported (All Panconvert Versions) 9 | 10 | * Any Platform that supports QT5, PyQT5, Python from Version QT5.11 - QT5.15 -------------------------------------------------------------------------------- /docs/Developer/changelog.md: -------------------------------------------------------------------------------- 1 | ### Version 0.2.9 2 | - Fixed markdown problems with newer pandoc versions 3 | 4 | ### Version 0.2.8 5 | - Fixed some Binary Build bugs 6 | - Fixed some Preference bugs 7 | - Support of newer pandoc versions 8 | 9 | ### Version 0.2.7 10 | - Maximized the Option filed for more input 11 | - Simplified the from / to format dialogs 12 | - Made the batch Widget hidable 13 | - Fixed find pandoc in from / to dialog 14 | - Extended Old-Gui Batch Dialog with Output-directory 15 | 16 | ### Version 0.2.6 17 | - Batch Converter save file without the original extension 18 | - Added seperat Batch Ouptut directory 19 | - Added Buffer SaveToFile Option 20 | - Added BufferSaveSuffix and BufferSaveName fields 21 | - Switched binary creation tool to pyinstaller 22 | - Code Cleanup 23 | 24 | ### Version 0.2.5 25 | - Code Cleanup 26 | - Bug Fix for the MacBinary Version 27 | 28 | ### Version 0.2.4 29 | - Added new Interface 30 | - Added possibility to use the old Interface instead 31 | 32 | ### Version 0.2.3 33 | - Added Counter for written log messages 34 | - Code Cleanup of converters 35 | - Code Cleanup of Functions for Check of Converters 36 | - All errors are written to the log viewer, except a fatal error message 37 | 38 | 39 | ### Version 0.2.2 40 | - Added seperated Log-Viewer 41 | - Added Make the Windows Position + Size savable 42 | - Added Make the Log-Viewer Position + Size savable 43 | - Added Make the Dialogs Position + Size sabable 44 | - Added Date / Time of the Log-Messages 45 | - Added Adjust the LogViewer Position manually 46 | - Fixed From / To Formats Dialogs 47 | 48 | 49 | ### Version 0.2.1 50 | - Added Multilanguage Support 51 | - Supported languages: English, German, (Spanish: 40%) 52 | - Added Blank Translation File 53 | - Fixed Error when inserting a new Path in Preferences 54 | 55 | ### Version 0.2.0 56 | - Fixed About Dialog in Binary Versions 57 | - Fixed Error handling of Path detection in windows 58 | 59 | ### Version 0.1.9 60 | - Added Batch Conversion for Standard Converters 61 | - Added Batch Conversion for Lyx in Standard Conversion 62 | - Added Filefilter option for Batch Conversion 63 | - Code Cleanup 64 | - Cleaner Error handling 65 | 66 | ### Version 0.1.8 67 | - Added: Standard Batch Conversion support 68 | - Missing: Lyx Standard Batch Conversion support 69 | 70 | ### Version 0.1.7 71 | - Added: Support pandoc Versions greater 1.18 72 | - Fixed: Change of the Help-System Windows 73 | 74 | ### Version 0.1.6 75 | - Code Cleanup 76 | - Fixed: Gui Cleanup (Deleted the menu functions for the converters) 77 | - Fixed: a bug for FreeBSD (Posix-System) 78 | 79 | ### Version 0.1.5 80 | - Added: Batch Converion Mode (Files, Directories, Recursive Directories) 81 | - Added: OpenDirectory-Buttons for path input 82 | - Added: Help-Buttons for from-formats, to-formats and options 83 | 84 | ### Version 0.1.4 85 | - Added: Preference for Open/Safe-Path (Standard is the Home-Directory) 86 | - Added: a Help menu for the pandoc user guide 87 | - Added: a undo function 88 | - Removed: save button, changed to save buffer (Only in Memory) 89 | 90 | ### Version 0.1.3 91 | - Added Support for the binary format docx in the from section (Manual Converter only (Needs Pandoc 1.13.1 or better) 92 | - Added Preferences for the Manual Converter 93 | - Added Support for error-messages from the Manual Converter 94 | - Bugfix: Binary Handling of the Manual Converter (For odt, docx formats) 95 | 96 | ### Version 0.1.2 97 | - Fixed: Message after filewrite to filesystem (e.g. odt-Export) 98 | - Fixed: Change to multiple Arguments 99 | 100 | ### Version 0.1.1 101 | - Added: integrated Lyx Support via Multimarkdown 102 | - Added: Change the Default Converters via Preferences 103 | - Added: Preferences are saved as QSettings 104 | - Added: Set open/save-path to homefolder 105 | -------------------------------------------------------------------------------- /docs/User_Guide/Basic_Usage.md: -------------------------------------------------------------------------------- 1 | # Basic Usage 2 | 3 | ## Two Versions of the GUI 4 | 5 | * You can select the Gui-Style in the Preferences 6 | * The Gui`s have a standard, manual and batch conversion mode 7 | * By switching the standard / manual mode in the new Gui-Style, you do not need to check / uncheck 8 | the standard checkbox 9 | 10 | ## Errors and Information 11 | * All Errors are written to a log window 12 | * A Counter of messages can be read in the main gui. If no error, occurred, there is no message 13 | * If you hide the log completely and nothing goes wrong, you don`t need the log viewer 14 | * If you are in batch-mode, a list of all the converted files is written to the log viewer 15 | * Look at the log viewer, if something unexpected had happend. If you need more information, 16 | go to the Discussion Forum on Sourceforge 17 | 18 | ## The preconfigured conversion sets 19 | 20 | * These are the preconfigured standard converters. All documents are Standalone-Versions of the document. 21 | * Make sure the Standard-Conversion Checkbox is marked. Otherwise you have to use the manual converter 22 | * The Batch-Conversion Checkbox has to be unchecked 23 | * Chose one From Format 24 | * Chose one To Format. The formats should not be the same 25 | 26 | ## Usage of the manual converter 27 | 28 | * The Standard – Checkbox has to be unchecked. 29 | * The Batch-Conversion Checkbox has to be unchecked 30 | * In the From-field you have to fill in the supported pandoc formats of 31 | the source format. A list of all From-formats is available via the ... Button at the end of the input field. 32 | * In the To-field you have to fill in the supported pandoc formats of the 33 | destination format. A list of all To-formats is available via the ... Button at the end of the input field. 34 | * In the Parameter field, all known pandoc parameters, separated via semicolon ';' can be used. A list of all options is available via the ... Button at the end of the input field. 35 | * For some formats the Parameter field can be left blank, for others it 36 | has to be filled. 37 | * To get a odt or epub file, you have to specify the name of the file. There is a working 38 | example for odt filled in already. The file will be saved in the same directory where the panconvert directory is saved, e.g. on MacOS it will be /Applications 39 | * The last parameter should not be closed with a ; 40 | * If you get a pandoc error, the syntax of the Parameter field is wrong. 41 | 42 | ## Batch Conversion 43 | 44 | * Both the Manual and the standard conversion work in batchmode. See the help sections above. 45 | * First you have to decide if you want to convert a filelist or a directory 46 | * A directory can be converted recursivly 47 | * Files can be added from different locations. Only one format conversion at a time 48 | * A Filefilter can reduce the types of the processed files. E.g. markdown;md; for all types of Markdown files. 49 | 50 | -------------------------------------------------------------------------------- /docs/User_Guide/Customizing_Panconvert.md: -------------------------------------------------------------------------------- 1 | # Customizing Panconvert 2 | 3 | ## General Settings 4 | 5 | * In the General Settings you can configure with which Converter Panconvert will start up. 6 | * Also you can configure if you will use the manual or the Standard Converter. 7 | * Here some Path-configuration can be done 8 | 9 | ## Size Settings 10 | Here you can force Panconvert to remember the size and position of Windows and Dialogs. 11 | 12 | * Main Window Size and Position 13 | * Log Window Size and Position 14 | * Dialog Positions -------------------------------------------------------------------------------- /docs/User_Guide/Install_Instructions.md: -------------------------------------------------------------------------------- 1 | # Installation instruction 2 | 3 | ## Before you beginn 4 | 5 | * Either install a [binary version](https://sourceforge.net/projects/panconvert/files/Newest/) of PanConvert or 6 | * Install all required components. See the Installation Checklist below. 7 | * You need to have [pandoc < 1.18](http://johnmacfarlane.net/pandoc/) installed. 8 | * The newest source code supports all pandoc versions 9 | * (Optional: Multimarkdown: for markdown to Lyx-Support) 10 | 11 | ## Installation Checklist 12 | Check which packets are already installed on your system. Normally Python3 exists on many supported platforms. On Linux somethimes QT5 is preinstalled. 13 | 14 | * Install Python3 15 | * Install QT5.3. Newer QT-Versions may be supported. Versions > 5.7 do not work! 16 | * Install Pyqt5. The newest version will work with QT5.3 17 | * Install Pandoc 18 | * Optional_Install: multimarkdown 19 | 20 | 21 | ## MacOS 22 | 23 | ## Windows 24 | 25 | ## Linux -------------------------------------------------------------------------------- /docs/User_Guide/Known_Problems.md: -------------------------------------------------------------------------------- 1 | # General Problems 2 | ## Path detection problems 3 | 4 | - Autodetection of the converters fail in the binary version of Panconvert 5 | - Sometimes, after the path has been filled in manually, Panconvert has to be restarted 6 | - The path problem only happens for the first initialisation of Panconvert or when the settings 7 | are manually deleted 8 | 9 | ## Binary problems 10 | 11 | - Windows: the binary version only works for 32bit systems 12 | - Linux: On older Systems there are needen glibs missing (The installed ones are outdated) 13 | 14 | # Manual Converter 15 | ## Options Field 16 | 17 | - The last parameter may not be endet with an ; 18 | - No Blanks may be used in parameters 19 | - Wrong spelling leeds to pandoc errors 20 | 21 | ## Batch Conversion 22 | of the Manual Converter 23 | 24 | - If you use binary files like docx, and you have textfiles with an binary extension, 25 | panconvert will fail 26 | - The file filter can not distingush between .md and md.html 27 | - If you used batchconversion with binary files, you have to move all non-binary 28 | files with extensions like .docx.html or docx.md 29 | 30 | # Update Problems 31 | If you encounter problems after an update: 32 | 33 | - There are known problems in the update process 34 | - See the Update help for more information 35 | 36 | -------------------------------------------------------------------------------- /docs/User_Guide/Pandoc_Help.md: -------------------------------------------------------------------------------- 1 | # Pandoc Help 2 | 3 | Detailed help you will find at [pandoc Hilfe](http://pandoc.org/MANUAL.html) 4 | 5 | 6 | ## Supported Formats: 7 | 8 | All through pandoc supported formats can be used in PanConvert 9 | 10 | To use all not explicitly listed formats of pandoc, you have to use the 11 | manual converter. 12 | -------------------------------------------------------------------------------- /docs/User_Guide/Update.md: -------------------------------------------------------------------------------- 1 | # Important Notes 2 | ## Update from previous versions 3 | If Panconvert 0.1.1 or above had been used, the previous settings have to be deleted, or Panconvert may crash: 4 | 5 | - On Windows, open registry editor go to HKEY_CURRENT_USER/Software and delete the folder Pandoc 6 | - On MacOS delete /Users//Library/Preferences/com.apaeffgen.PanConvert.plist 7 | - On Linux delete /home//.config/Pandoc/PanConvert.conf -------------------------------------------------------------------------------- /docs/User_Guide/basic_info.md: -------------------------------------------------------------------------------- 1 | # Before you begin 2 | 3 | - Install pandoc 4 | - Get the path of pandoc 5 | - Fill in the preference - path to pandoc 6 | 7 | 8 | ## Path to pandoc 9 | 10 | The program tries to detect where your pandoc executable is installed. 11 | If that fails, you can use the preferences dialog in the Edit – Menu to 12 | manually save the path to the executable. 13 | 14 | 15 | ## System Requirements 16 | 17 | The binaries are self-contained. Only [pandoc](http://johnmacfarlane.net/pandoc/installing.html) and optionally [multimarkdown](http://fletcherpenney.net/multimarkdown/download/) have to be installed 18 | 19 | For the source-code to be run, these additional Software-Packages have to be installed for running 20 | PanConvert. 21 | 22 | * Python3 23 | * QT5 24 | * PyQT5 25 | 26 | 27 | Some older Versions of Python3 or QT5 might not work -------------------------------------------------------------------------------- /docs/Xtras/requirements_mkdocs.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apaeffgen/PanConvert/2f87ba7980e1fd66e5330db22d4c73b649d90bda/docs/Xtras/requirements_mkdocs.txt -------------------------------------------------------------------------------- /docs/index.md: -------------------------------------------------------------------------------- 1 | ## What is Panconvert 2 | Panconvert is a GUI-Wrapper for the document converter [pandoc](https://pandoc.org) 3 | 4 | ## How to use Panconvert and Pandoc 5 | 6 | - For detailed help see [the User_Guide Section](User_Guide/Basic_Usage.md) 7 | - A [detailled installation Instruction](User_Guide/Install_Instructions.md) 8 | 9 | ## Features 10 | 11 | * Convert documents via a graphical user interface 12 | * Markdown, Latex, OPML, docx, EPUB … 13 | * All [Pandoc-Formats](https://pandoc.org/) are supported 14 | * Cross-Platform: Linux, MacOS, Windows 15 | * Batch conversion is possible 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /mkdocs.yml: -------------------------------------------------------------------------------- 1 | site_name: Panconvert Documentation 2 | site_url: http://panconvert.readthedocs.org 3 | repository_url: 4 | nav: 5 | - Introduction: index.md 6 | - User Guide: 7 | - Install Instructions: User_Guide/Install_Instructions.md 8 | - Basic Usage: User_Guide/Basic_Usage.md 9 | - Customizing: User_Guide/Customizing_Panconvert.md 10 | - Known Problems: User_Guide/Known_Problems.md 11 | - Pandoc Help: User_Guide/Pandoc_Help.md 12 | - Update: User_Guide/Update.md 13 | - Admin Guide: 14 | - Supported Platforms: Developer/Platforms.md 15 | - Version History: Developer/changelog.md 16 | - Build Instructions: Developer/Build_Instructions.md 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /packaging/Panconvert.spec: -------------------------------------------------------------------------------- 1 | # -*- mode: python ; coding: utf-8 -*- 2 | 3 | 4 | a = Analysis( 5 | ['/Users/apaeffgen/PROG/Python/PanConvert/Panconvert.py'], 6 | pathex=[], 7 | binaries=[], 8 | datas=[('source/language/Panconvert_de.qm', 'MacOS')], 9 | hiddenimports=[], 10 | hookspath=[], 11 | hooksconfig={}, 12 | runtime_hooks=[], 13 | excludes=[], 14 | noarchive=False, 15 | ) 16 | pyz = PYZ(a.pure) 17 | 18 | exe = EXE( 19 | pyz, 20 | a.scripts, 21 | [], 22 | exclude_binaries=True, 23 | name='Panconvert', 24 | debug=False, 25 | bootloader_ignore_signals=False, 26 | strip=False, 27 | upx=True, 28 | console=False, 29 | disable_windowed_traceback=False, 30 | argv_emulation=False, 31 | target_arch=None, 32 | codesign_identity=None, 33 | entitlements_file=None, 34 | ) 35 | coll = COLLECT( 36 | exe, 37 | a.binaries, 38 | a.datas, 39 | strip=False, 40 | upx=True, 41 | upx_exclude=[], 42 | name='Panconvert', 43 | ) 44 | app = BUNDLE( 45 | coll, 46 | name='Panconvert.app', 47 | icon=None, 48 | bundle_identifier=None, 49 | ) 50 | -------------------------------------------------------------------------------- /packaging/Panconvert_InstallBuilder_Linux.xml: -------------------------------------------------------------------------------- 1 | 2 | Panconvert 3 | Panconvert 4 | 0.2.9 5 | /Users/apaeffgen/PROG/Python/PanConvert/packaging/readme.md 6 | /Users/apaeffgen/PROG/Python/PanConvert/packaging/license.txt 7 | 1 8 | 9 | 10 | default 11 | Default Component 12 | 1 13 | 1 14 | 1 15 | 16 | 17 | 18 | ${installdir}/Panconvert_Linux64bit/Panconvert 19 | 20 | Panconvert 21 | 0 22 | ${installdir}/Panconvert_Linux64bit/ 23 | all 24 | 0 25 | 0 26 | ${installdir}/Panconvert_Win32/${product_fullname}.exe 27 | 28 | 29 | ${installdir}/Panconvert_Win32 30 | 31 | 32 | 33 | 34 | Program Files 35 | ${installdir} 36 | programfiles 37 | all 38 | 39 | 40 | Uninstall 41 | ${installdir}/${uninstallerName} 42 | 43 | Uninstall ${product_fullname} 44 | ${installdir} 45 | all 46 | 0 47 | 0 48 | ${installdir}/${uninstallerName}.exe 49 | 50 | 51 | ${installdir} 52 | 53 | 54 | 55 | 56 | Program Files 57 | ${installdir} 58 | programfileslinux 59 | linux-x64 60 | 61 | 62 | /Users/apaeffgen/PROG/Python/PanConvert/packaging/C:/Users/apaeffgen/PROG/Python/PanConvert/C:/Panconvert_Binaries/dist/Panconvert_Linux64bit 63 | 64 | 65 | matches 66 | * 67 | 68 | 69 | 70 | 71 | 72 | 73 | Program Files 74 | ${installdir} 75 | programfileswindows 76 | windows 77 | 78 | 79 | /Users/apaeffgen/PROG/Python/PanConvert/packaging/C:/Users/apaeffgen/PROG/Python/PanConvert/C:/Panconvert_Binaries/dist/Panconvert_Win32 80 | 81 | 82 | matches 83 | * 84 | 85 | 86 | 87 | 88 | /Users/apaeffgen/PROG/Python/PanConvert/packaging/C:/Users/apaeffgen/PROG/Python/PanConvert/C:/Program Files/Pandoc/pandoc.exe 89 | 90 | 91 | 92 | 93 | Program Files 94 | ${installdir} 95 | programfilesosx 96 | osx 97 | 98 | 99 | /Users/apaeffgen/PROG/Python/PanConvert/packaging/C:/Users/apaeffgen/PROG/Python/PanConvert/dist/Panconvert.app 100 | 101 | 102 | /Users/apaeffgen/PROG/Python/PanConvert/packaging/C:/opt/homebrew/Cellar/pandoc/3.1.8/bin/pandoc 103 | 104 | 105 | 106 | 107 | 108 | 109 | Uninstall ${product_fullname} 110 | Uninstall ${product_fullname} 111 | 0 112 | 0 113 | ${installdir}/${uninstallerName}.exe 114 | 115 | 116 | ${installdir}/ 117 | 118 | 119 | 120 | Panconvert_0.2.9 121 | 0 122 | 0 123 | ${installdir}/Panconvert_Win32/${product_fullname}.exe 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | ${installdir} 134 | Creating Panconvert-Shortcuts 135 | 136 | 137 | 138 | 139 | Panconvert 140 | linux-x64 141 | 0 142 | 0 143 | ${installdir}/Panconvert_Linux64bit/${product_fullname} 144 | 145 | 146 | 147 | 148 | 149 | 1 150 | 1 151 | Andreas Paeffgen 152 | 153 | 154 | installdir 155 | Installer.Parameter.installdir.description 156 | Installer.Parameter.installdir.explanation 157 | 158 | ${platform_install_prefix}/${product_shortname} 159 | 0 160 | prefix 161 | 1 162 | 0 163 | 30 164 | 165 | 166 | 167 | 168 | -------------------------------------------------------------------------------- /packaging/Panconvert_InstallBuilder_MacOS.xml: -------------------------------------------------------------------------------- 1 | 2 | Panconvert 3 | Panconvert 4 | 0.2.9 5 | /Users/apaeffgen/PROG/Python/PanConvert/readme.md 6 | /Users/apaeffgen/PROG/Python/PanConvert/docs/license.txt 7 | 1 8 | 9 | 10 | default 11 | Default Component 12 | 1 13 | 1 14 | 1 15 | 16 | 17 | Program Files 18 | ${installdir} 19 | programfiles 20 | all 21 | 22 | 23 | Uninstall 24 | ${installdir}/${uninstallerName} 25 | 26 | Uninstall ${product_fullname} 27 | ${installdir} 28 | all 29 | 0 30 | 0 31 | ${installdir}/${uninstallerName}.exe 32 | 33 | 34 | ${installdir} 35 | 36 | 37 | 38 | 39 | Program Files 40 | ${installdir} 41 | programfileslinux 42 | linux-x64 43 | 44 | 45 | Program Files 46 | ${installdir} 47 | programfileswindows 48 | windows 49 | 50 | 51 | Program Files 52 | ${installdir} 53 | programfilesosx 54 | osx 55 | 56 | 57 | /Users/apaeffgen/PROG/Python/PanConvert/dist/Panconvert.app 58 | 59 | 60 | /opt/homebrew/Cellar/pandoc/3.1.8/etc 61 | 62 | 63 | /opt/homebrew/Cellar/pandoc/3.1.8/share 64 | 65 | 66 | /opt/homebrew/Cellar/pandoc/3.1.8/bin/pandoc 67 | 68 | 69 | 70 | 71 | 72 | 73 | Uninstall ${product_fullname} 74 | Uninstall ${product_fullname} 75 | 0 76 | 0 77 | ${installdir}/${uninstallerName}.exe 78 | 79 | 80 | ${installdir}/ 81 | 82 | 83 | 84 | Panconvert_0.2.9 85 | 0 86 | 0 87 | ${installdir}/Panconvert_Win32/${product_fullname}.exe 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | ${installdir} 98 | Creating Panconvert-Shortcuts 99 | 100 | 101 | 102 | 103 | Panconvert 104 | linux-x64 105 | 0 106 | 0 107 | ${installdir}/Panconvert_Linux64bit/${product_fullname} 108 | 109 | 110 | 111 | 112 | 113 | 1 114 | 1 115 | Andreas Paeffgen 116 | 117 | 118 | installdir 119 | Installer.Parameter.installdir.description 120 | Installer.Parameter.installdir.explanation 121 | 122 | ${platform_install_prefix}/${product_shortname} 123 | 0 124 | prefix 125 | 1 126 | 0 127 | 30 128 | 129 | 130 | 131 | 132 | -------------------------------------------------------------------------------- /packaging/Panconvert_InstallBuilder_Windows.xml: -------------------------------------------------------------------------------- 1 | 2 | Panconvert 3 | Panconvert 4 | 0.2.9 5 | C:/Users/apaeffgen/PROG/Python/PanConvert/readme.md 6 | C:\Users\apaeffgen\PROG\Python\PanConvert\docs\license.txt 7 | 1 8 | 9 | 10 | default 11 | Default Component 12 | 1 13 | 1 14 | 1 15 | 16 | 17 | 18 | ${installdir}/Panconvert_Linux64bit/Panconvert 19 | 20 | Panconvert 21 | 0 22 | ${installdir}/Panconvert_Linux64bit/ 23 | all 24 | 0 25 | 0 26 | ${installdir}/Panconvert_Win32/${product_fullname}.exe 27 | 28 | 29 | ${installdir}/Panconvert_Win32 30 | 31 | 32 | 33 | 34 | Program Files 35 | ${installdir} 36 | programfiles 37 | all 38 | 39 | 40 | Uninstall 41 | ${installdir}/${uninstallerName} 42 | 43 | Uninstall ${product_fullname} 44 | ${installdir} 45 | all 46 | 0 47 | 0 48 | ${installdir}/${uninstallerName}.exe 49 | 50 | 51 | ${installdir} 52 | 53 | 54 | 55 | 56 | Program Files 57 | ${installdir} 58 | programfileslinux 59 | linux-x64 60 | 61 | 62 | C:/Users/apaeffgen/PROG/Python/PanConvert/C:/Panconvert_Binaries/dist/Panconvert_Linux64bit 63 | 64 | 65 | matches 66 | * 67 | 68 | 69 | 70 | 71 | 72 | 73 | Program Files 74 | ${installdir} 75 | programfileswindows 76 | windows 77 | 78 | 79 | C:/Users/apaeffgen/PROG/Python/PanConvert/C:/Panconvert_Binaries/dist/Panconvert_Win32 80 | 81 | 82 | matches 83 | * 84 | 85 | 86 | 87 | 88 | C:/Users/apaeffgen/PROG/Python/PanConvert/C:/Program Files/Pandoc/pandoc.exe 89 | 90 | 91 | 92 | 93 | Program Files 94 | ${installdir} 95 | programfilesosx 96 | osx 97 | 98 | 99 | C:/Users/apaeffgen/PROG/Python/PanConvert/dist/Panconvert.app 100 | 101 | 102 | C:/opt/homebrew/Cellar/pandoc/3.1.8/bin/pandoc 103 | 104 | 105 | 106 | 107 | 108 | 109 | Uninstall ${product_fullname} 110 | Uninstall ${product_fullname} 111 | 0 112 | 0 113 | ${installdir}/${uninstallerName}.exe 114 | 115 | 116 | ${installdir}/ 117 | 118 | 119 | 120 | Panconvert_0.2.9 121 | 0 122 | 0 123 | ${installdir}/Panconvert_Win32/${product_fullname}.exe 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | ${installdir} 134 | Creating Panconvert-Shortcuts 135 | 136 | 137 | 138 | 139 | Panconvert 140 | linux-x64 141 | 0 142 | 0 143 | ${installdir}/Panconvert_Linux64bit/${product_fullname} 144 | 145 | 146 | 147 | 148 | 149 | 1 150 | 1 151 | Andreas Paeffgen 152 | 153 | 154 | installdir 155 | Installer.Parameter.installdir.description 156 | Installer.Parameter.installdir.explanation 157 | 158 | ${platform_install_prefix}/${product_shortname} 159 | 0 160 | prefix 161 | 1 162 | 0 163 | 30 164 | 165 | 166 | 167 | 168 | -------------------------------------------------------------------------------- /packaging/Panconvert_PKGBuilder.pkgproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PROJECT 6 | 7 | PACKAGE_FILES 8 | 9 | DEFAULT_INSTALL_LOCATION 10 | / 11 | HIERARCHY 12 | 13 | CHILDREN 14 | 15 | 16 | CHILDREN 17 | 18 | 19 | BUNDLE_CAN_DOWNGRADE 20 | 21 | BUNDLE_POSTINSTALL_PATH 22 | 23 | PATH_TYPE 24 | 0 25 | 26 | BUNDLE_PREINSTALL_PATH 27 | 28 | PATH_TYPE 29 | 0 30 | 31 | CHILDREN 32 | 33 | GID 34 | 80 35 | PATH 36 | /Users/apaeffgen/PROG/Python/PanConvert/dist/Panconvert.app 37 | PATH_TYPE 38 | 0 39 | PERMISSIONS 40 | 493 41 | TYPE 42 | 3 43 | UID 44 | 0 45 | 46 | 47 | GID 48 | 80 49 | PATH 50 | Applications 51 | PATH_TYPE 52 | 0 53 | PERMISSIONS 54 | 509 55 | TYPE 56 | 1 57 | UID 58 | 0 59 | 60 | 61 | CHILDREN 62 | 63 | 64 | CHILDREN 65 | 66 | GID 67 | 80 68 | PATH 69 | Application Support 70 | PATH_TYPE 71 | 0 72 | PERMISSIONS 73 | 493 74 | TYPE 75 | 1 76 | UID 77 | 0 78 | 79 | 80 | CHILDREN 81 | 82 | GID 83 | 0 84 | PATH 85 | Automator 86 | PATH_TYPE 87 | 0 88 | PERMISSIONS 89 | 493 90 | TYPE 91 | 1 92 | UID 93 | 0 94 | 95 | 96 | CHILDREN 97 | 98 | GID 99 | 0 100 | PATH 101 | Documentation 102 | PATH_TYPE 103 | 0 104 | PERMISSIONS 105 | 493 106 | TYPE 107 | 1 108 | UID 109 | 0 110 | 111 | 112 | CHILDREN 113 | 114 | GID 115 | 0 116 | PATH 117 | Extensions 118 | PATH_TYPE 119 | 0 120 | PERMISSIONS 121 | 493 122 | TYPE 123 | 1 124 | UID 125 | 0 126 | 127 | 128 | CHILDREN 129 | 130 | GID 131 | 0 132 | PATH 133 | Filesystems 134 | PATH_TYPE 135 | 0 136 | PERMISSIONS 137 | 493 138 | TYPE 139 | 1 140 | UID 141 | 0 142 | 143 | 144 | CHILDREN 145 | 146 | GID 147 | 0 148 | PATH 149 | Frameworks 150 | PATH_TYPE 151 | 0 152 | PERMISSIONS 153 | 493 154 | TYPE 155 | 1 156 | UID 157 | 0 158 | 159 | 160 | CHILDREN 161 | 162 | GID 163 | 0 164 | PATH 165 | Input Methods 166 | PATH_TYPE 167 | 0 168 | PERMISSIONS 169 | 493 170 | TYPE 171 | 1 172 | UID 173 | 0 174 | 175 | 176 | CHILDREN 177 | 178 | GID 179 | 0 180 | PATH 181 | Internet Plug-Ins 182 | PATH_TYPE 183 | 0 184 | PERMISSIONS 185 | 493 186 | TYPE 187 | 1 188 | UID 189 | 0 190 | 191 | 192 | CHILDREN 193 | 194 | GID 195 | 0 196 | PATH 197 | Keyboard Layouts 198 | PATH_TYPE 199 | 0 200 | PERMISSIONS 201 | 493 202 | TYPE 203 | 1 204 | UID 205 | 0 206 | 207 | 208 | CHILDREN 209 | 210 | GID 211 | 0 212 | PATH 213 | LaunchAgents 214 | PATH_TYPE 215 | 0 216 | PERMISSIONS 217 | 493 218 | TYPE 219 | 1 220 | UID 221 | 0 222 | 223 | 224 | CHILDREN 225 | 226 | GID 227 | 0 228 | PATH 229 | LaunchDaemons 230 | PATH_TYPE 231 | 0 232 | PERMISSIONS 233 | 493 234 | TYPE 235 | 1 236 | UID 237 | 0 238 | 239 | 240 | CHILDREN 241 | 242 | GID 243 | 0 244 | PATH 245 | PreferencePanes 246 | PATH_TYPE 247 | 0 248 | PERMISSIONS 249 | 493 250 | TYPE 251 | 1 252 | UID 253 | 0 254 | 255 | 256 | CHILDREN 257 | 258 | GID 259 | 0 260 | PATH 261 | Preferences 262 | PATH_TYPE 263 | 0 264 | PERMISSIONS 265 | 493 266 | TYPE 267 | 1 268 | UID 269 | 0 270 | 271 | 272 | CHILDREN 273 | 274 | GID 275 | 80 276 | PATH 277 | Printers 278 | PATH_TYPE 279 | 0 280 | PERMISSIONS 281 | 493 282 | TYPE 283 | 1 284 | UID 285 | 0 286 | 287 | 288 | CHILDREN 289 | 290 | GID 291 | 0 292 | PATH 293 | PrivilegedHelperTools 294 | PATH_TYPE 295 | 0 296 | PERMISSIONS 297 | 1005 298 | TYPE 299 | 1 300 | UID 301 | 0 302 | 303 | 304 | CHILDREN 305 | 306 | GID 307 | 0 308 | PATH 309 | QuickLook 310 | PATH_TYPE 311 | 0 312 | PERMISSIONS 313 | 493 314 | TYPE 315 | 1 316 | UID 317 | 0 318 | 319 | 320 | CHILDREN 321 | 322 | GID 323 | 0 324 | PATH 325 | QuickTime 326 | PATH_TYPE 327 | 0 328 | PERMISSIONS 329 | 493 330 | TYPE 331 | 1 332 | UID 333 | 0 334 | 335 | 336 | CHILDREN 337 | 338 | GID 339 | 0 340 | PATH 341 | Screen Savers 342 | PATH_TYPE 343 | 0 344 | PERMISSIONS 345 | 493 346 | TYPE 347 | 1 348 | UID 349 | 0 350 | 351 | 352 | CHILDREN 353 | 354 | GID 355 | 0 356 | PATH 357 | Scripts 358 | PATH_TYPE 359 | 0 360 | PERMISSIONS 361 | 493 362 | TYPE 363 | 1 364 | UID 365 | 0 366 | 367 | 368 | CHILDREN 369 | 370 | GID 371 | 0 372 | PATH 373 | Services 374 | PATH_TYPE 375 | 0 376 | PERMISSIONS 377 | 493 378 | TYPE 379 | 1 380 | UID 381 | 0 382 | 383 | 384 | CHILDREN 385 | 386 | GID 387 | 0 388 | PATH 389 | Widgets 390 | PATH_TYPE 391 | 0 392 | PERMISSIONS 393 | 493 394 | TYPE 395 | 1 396 | UID 397 | 0 398 | 399 | 400 | GID 401 | 0 402 | PATH 403 | Library 404 | PATH_TYPE 405 | 0 406 | PERMISSIONS 407 | 493 408 | TYPE 409 | 1 410 | UID 411 | 0 412 | 413 | 414 | CHILDREN 415 | 416 | 417 | CHILDREN 418 | 419 | GID 420 | 0 421 | PATH 422 | Shared 423 | PATH_TYPE 424 | 0 425 | PERMISSIONS 426 | 1023 427 | TYPE 428 | 1 429 | UID 430 | 0 431 | 432 | 433 | GID 434 | 80 435 | PATH 436 | Users 437 | PATH_TYPE 438 | 0 439 | PERMISSIONS 440 | 493 441 | TYPE 442 | 1 443 | UID 444 | 0 445 | 446 | 447 | GID 448 | 0 449 | PATH 450 | / 451 | PATH_TYPE 452 | 0 453 | PERMISSIONS 454 | 493 455 | TYPE 456 | 1 457 | UID 458 | 0 459 | 460 | PAYLOAD_TYPE 461 | 0 462 | PRESERVE_EXTENDED_ATTRIBUTES 463 | 464 | SHOW_INVISIBLE 465 | 466 | SPLIT_FORKS 467 | 468 | TREAT_MISSING_FILES_AS_WARNING 469 | 470 | VERSION 471 | 5 472 | 473 | PACKAGE_SETTINGS 474 | 475 | AUTHENTICATION 476 | 1 477 | CONCLUSION_ACTION 478 | 0 479 | FOLLOW_SYMBOLIC_LINKS 480 | 481 | IDENTIFIER 482 | com.mygreatcompany.pkg.Panconvert 483 | LOCATION 484 | 0 485 | NAME 486 | 487 | OVERWRITE_PERMISSIONS 488 | 489 | PAYLOAD_SIZE 490 | -1 491 | REFERENCE_PATH 492 | 493 | RELOCATABLE 494 | 495 | USE_HFS+_COMPRESSION 496 | 497 | VERSION 498 | 1.0 499 | 500 | PROJECT_COMMENTS 501 | 502 | NOTES 503 | 504 | 505 | 506 | PROJECT_SETTINGS 507 | 508 | BUILD_PATH 509 | 510 | PATH 511 | build 512 | PATH_TYPE 513 | 1 514 | 515 | EXCLUDED_FILES 516 | 517 | 518 | PATTERNS_ARRAY 519 | 520 | 521 | REGULAR_EXPRESSION 522 | 523 | STRING 524 | .DS_Store 525 | TYPE 526 | 0 527 | 528 | 529 | PROTECTED 530 | 531 | PROXY_NAME 532 | Remove .DS_Store files 533 | PROXY_TOOLTIP 534 | Remove ".DS_Store" files created by the Finder. 535 | STATE 536 | 537 | 538 | 539 | PATTERNS_ARRAY 540 | 541 | 542 | REGULAR_EXPRESSION 543 | 544 | STRING 545 | .pbdevelopment 546 | TYPE 547 | 0 548 | 549 | 550 | PROTECTED 551 | 552 | PROXY_NAME 553 | Remove .pbdevelopment files 554 | PROXY_TOOLTIP 555 | Remove ".pbdevelopment" files created by ProjectBuilder or Xcode. 556 | STATE 557 | 558 | 559 | 560 | PATTERNS_ARRAY 561 | 562 | 563 | REGULAR_EXPRESSION 564 | 565 | STRING 566 | CVS 567 | TYPE 568 | 1 569 | 570 | 571 | REGULAR_EXPRESSION 572 | 573 | STRING 574 | .cvsignore 575 | TYPE 576 | 0 577 | 578 | 579 | REGULAR_EXPRESSION 580 | 581 | STRING 582 | .cvspass 583 | TYPE 584 | 0 585 | 586 | 587 | REGULAR_EXPRESSION 588 | 589 | STRING 590 | .svn 591 | TYPE 592 | 1 593 | 594 | 595 | REGULAR_EXPRESSION 596 | 597 | STRING 598 | .git 599 | TYPE 600 | 1 601 | 602 | 603 | REGULAR_EXPRESSION 604 | 605 | STRING 606 | .gitignore 607 | TYPE 608 | 0 609 | 610 | 611 | PROTECTED 612 | 613 | PROXY_NAME 614 | Remove SCM metadata 615 | PROXY_TOOLTIP 616 | Remove helper files and folders used by the CVS, SVN or Git Source Code Management systems. 617 | STATE 618 | 619 | 620 | 621 | PATTERNS_ARRAY 622 | 623 | 624 | REGULAR_EXPRESSION 625 | 626 | STRING 627 | classes.nib 628 | TYPE 629 | 0 630 | 631 | 632 | REGULAR_EXPRESSION 633 | 634 | STRING 635 | designable.db 636 | TYPE 637 | 0 638 | 639 | 640 | REGULAR_EXPRESSION 641 | 642 | STRING 643 | info.nib 644 | TYPE 645 | 0 646 | 647 | 648 | PROTECTED 649 | 650 | PROXY_NAME 651 | Optimize nib files 652 | PROXY_TOOLTIP 653 | Remove "classes.nib", "info.nib" and "designable.nib" files within .nib bundles. 654 | STATE 655 | 656 | 657 | 658 | PATTERNS_ARRAY 659 | 660 | 661 | REGULAR_EXPRESSION 662 | 663 | STRING 664 | Resources Disabled 665 | TYPE 666 | 1 667 | 668 | 669 | PROTECTED 670 | 671 | PROXY_NAME 672 | Remove Resources Disabled folders 673 | PROXY_TOOLTIP 674 | Remove "Resources Disabled" folders. 675 | STATE 676 | 677 | 678 | 679 | SEPARATOR 680 | 681 | 682 | 683 | NAME 684 | Panconvert 685 | PAYLOAD_ONLY 686 | 687 | REFERENCE_FOLDER_PATH 688 | /Applications/InstallBuilder Enterprise 23.10.1/output 689 | 690 | 691 | TYPE 692 | 1 693 | VERSION 694 | 2 695 | 696 | 697 | -------------------------------------------------------------------------------- /packaging/Readme_first.md: -------------------------------------------------------------------------------- 1 | ## Filelist Overview 2 | 3 | - In the Folder Newest there are all actual versions of Panconvert 4 | - In the Xtras_Archive there are older versions 5 | - If you have problems with the newest version, try one of the older versions instead. Or use the source code. 6 | 7 | ## Windows Binary 8 | 9 | - There is an installer and a zip-file provided 10 | - If you use the zip-file, extract it wherever you want and doubleclick Panconvert.exe in the main folder. 11 | - The installer will guide you through the process 12 | 13 | ## Mac Binary 14 | 15 | ### Installer-Version 16 | 17 | - Unzip the Installer-Package 18 | - Doubble-Click on the Installer 19 | - All MacOS Versions and Intel+M1/2 should work 20 | - Pandoc is bundled with the app, but you can use your own version 21 | - Panconvert is installed in a folder called Pandoc in the application folder. 22 | 23 | ### DMG-Version 24 | 25 | - Mount the dmg-Image 26 | - Move Panconvert.app to the application folder 27 | - Start the app like any other MacOS application 28 | 29 | 30 | ## Linux Binary 31 | 32 | Attention: Because there are so many flavours of linux with a lot of different versions of the basic system, it can be, 33 | that the binary will not start. Also because of the hassle, in future releases no binary versions will be produced but testet. 34 | 35 | - So use the the source code version if you run into troubles with the old binaries. 36 | - Mainly glibc versions could be to old or to new. But when something goes wrong, your are in the wild. 37 | 38 | ## To Install from Source 39 | 40 | ### Before you beginn 41 | 42 | * Install all required components. See the Installation Checklist below. 43 | * The newest source code supports all pandoc versions 44 | * (Optional: Multimarkdown: for markdown to Lyx-Support) 45 | 46 | ### Installation Checklist 47 | Check which packets are already installed on your system. Normally Python3 exists on many supported platforms. On Linux somethimes QT5 is preinstalled. 48 | 49 | * Install Python3 50 | * Install QT5.11. Other versions of QT may or may not work 51 | * Install Pyqt5.11.3 52 | * Install Pandoc 53 | * Optional_Install: multimarkdown 54 | * See also http://panconvert.readthedocks.io 55 | -------------------------------------------------------------------------------- /readme.md: -------------------------------------------------------------------------------- 1 | # Readme first 2 | ## Help and further information 3 | At the [official Website](https://panconvert.sourceforge.net) you will find more detailed information. 4 | There is help available at http://panconvert.sourceforge.net/help.html 5 | 6 | ## Installation 7 | On Windows and Mac the [automated installer](https://sourceforge.net/projects/panconvert/) walks you through the installation procedure 8 | and copies a bundled pandoc version with pandoc and an uninstaller. So you do not need to install pandoc yourself. 9 | You will find the binaries [here](https://sourceforge.net/projects/panconvert/) 10 | 11 | On Linux please read the extended installation instruction. 12 | 13 | ## Usage 14 | In the preference settings you can specify the path of your own pandoc, if you do not want to use the bundled version. 15 | The help, see above, can be used also inside the started Gui. 16 | 17 | ## Update from previous versions 18 | If Panconvert previously had been used, the previous settings may have to be deleted, or Panconvert may crash: 19 | 20 | - On Windows, open registry editor go to HKEY_CURRENT_USER/Software and delete the folder Pandoc 21 | - On MacOS delete /Users//Library/Preferences/com.apaeffgen.PanConvert.plist 22 | - On Linux delete /home//.config/Pandoc/PanConvert.conf 23 | 24 | ## Known Problems 25 | Not working is python2, QT4 and pyqt4. There can be some issues with older or newer versions of QT5 and pyqt5. QT5.11.0 to 26 | 15 is tested for the actual source code, and is working. 27 | 28 | Also some pandoc versions may make some problems, due to changed behaviour of pandoc or some faults in pandonvert. 29 | If you find a bug / problem, submit a bug-report to the issue-tracker of github. 30 | 31 | ## Extended installation instructions for running the source code or running on Linux 32 | 33 | Running the program you must have installed the following additional software-packages: 34 | 35 | - pandoc (all newer versions are supported, tested with pandoc 3.1.8 ) 36 | - python3 (Be awere, that the newest python version may break something) 37 | - QT5 38 | - pyqt5 39 | 40 | On Linux most actual distributions come preinstalled with the last 3 packages. Package-Managers allow to install pandoc. 41 | 42 | On Windows you have to manually install all the packages by hand. See all the links below. 43 | 44 | On MacOS homebrew can be used to install python3, QT5 and pyqt5. Pandoc has to be downloaded from the pandoc-homepage. 45 | 46 | - http://johnmacfarlane.net/pandoc/ 47 | - https://www.python.org/downloads/ 48 | - http://qt-project.org/downloads 49 | - http://www.riverbankcomputing.co.uk/software/pyqt/download5 50 | - http://brew.sh 51 | 52 | If all the dependencies are properly installed, you can run the program: 53 | On the commandline you have to first cd into the appropriate directory. 54 | 55 | - on windows by double-clicking on Panconvert.py 56 | - on Linux by starting the commandline: python3 Panconvert.py 57 | - on MaOS by opening the terminal and typing python3 Panconvert.py 58 | 59 | ## License 60 | 61 | The software is licensed under the GNU General Public License. -------------------------------------------------------------------------------- /source/__init__.py: -------------------------------------------------------------------------------- 1 | __author__ = 'apaeffgen' 2 | # _*_ coding: utf-8 _*_ 3 | -------------------------------------------------------------------------------- /source/converter/__init__.py: -------------------------------------------------------------------------------- 1 | __author__ = 'apaeffgen' 2 | # _*_ coding: utf-8 _*_ 3 | -------------------------------------------------------------------------------- /source/converter/batch_converter.py: -------------------------------------------------------------------------------- 1 | #!/usr/local/bin/python3 2 | 3 | 4 | __author__ = 'apaeffgen' 5 | # -*- coding: utf-8 -*- 6 | 7 | # This file is part of Panconvert. 8 | # 9 | # Panconvert is free software: you can redistribute it and/or modify 10 | # it under the terms of the GNU General Public License as published by 11 | # the Free Software Foundation, either version 3 of the License, or 12 | # (at your option) any later version. 13 | # 14 | # Panconvert is distributed in the hope that it will be useful, 15 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | # GNU General Public License for more details. 18 | # 19 | # You should have received a copy of the GNU General Public License 20 | # along with Panconvert. If not, see . 21 | 22 | import fnmatch, glob 23 | from source.helpers.interface_pandoc import * 24 | 25 | settings = QSettings('Pandoc', 'PanConvert') 26 | path_pandoc = settings.value('path_pandoc') 27 | batch_settings = QSettings('Pandoc', 'PanConvert') 28 | 29 | 30 | global openfiles, filelist 31 | 32 | 33 | def batch_convert_manual(openfile,FromFormat,ToFormat,extra_args): 34 | # ReturnValues: OpenedText, ToFormat, FromFormat, ExtraArguments (divided by blanks, if empty, use '') 35 | batch_open_path_output = batch_settings.value('batch_open_path_output') 36 | path_pandoc = settings.value('path_pandoc', '') 37 | try: 38 | os.path.isfile(path_pandoc) 39 | 40 | filename, file_extension = os.path.splitext(openfile) 41 | if batch_open_path_output == '': 42 | args = [path_pandoc, '--from=' + FromFormat, '--to=' + ToFormat, openfile, '--output=' + filename + '.' + ToFormat] 43 | else: 44 | outputfile = os.path.basename(filename) 45 | args = [path_pandoc, '--from=' + FromFormat, '--to=' + ToFormat, openfile, '--output=' + batch_open_path_output + '/' + outputfile + '.' + ToFormat] 46 | if extra_args != '' : 47 | extra_args = extra_args.split(';') 48 | for arg in extra_args: 49 | args.append(arg) 50 | 51 | output = error_unknown() 52 | 53 | p = subprocess.Popen( 54 | args, 55 | stdin=subprocess.PIPE, 56 | stdout=subprocess.PIPE, 57 | stderr=subprocess.PIPE) 58 | 59 | error1 = p.communicate(output.encode('utf-8')) 60 | 61 | if p.returncode != 0: 62 | result = '' 63 | message = 'An Error occurred. {}'.format(error1) 64 | 65 | else: 66 | message_tmp = message_file_converted() 67 | message = message_tmp + openfile + '\n' 68 | 69 | return message 70 | 71 | except OSError: 72 | message = error_converter_path() 73 | return message 74 | 75 | 76 | def create_filelist(directory): 77 | 78 | settings = QSettings('Pandoc', 'PanConvert') 79 | filefilter = settings.value('batch_convert_filter','') 80 | 81 | matches = [] 82 | for root, dirnames, filenames in os.walk(directory): 83 | for filename in fnmatch.filter(filenames, '*.*'): 84 | if filename != '.DS_Store': 85 | matches.append(os.path.join(root, filename)) 86 | 87 | filter = filefilter.split(';') 88 | matching = [] 89 | 90 | for filteritem in filter: 91 | 92 | matching_filter = [s for s in matches if filteritem in s] 93 | for i in matching_filter: 94 | matching.append(i) 95 | 96 | if len(matching) == 0: 97 | 98 | message = error_file_selection() 99 | else: 100 | message_tmp = message_file_selection() 101 | message = message_tmp + filefilter 102 | 103 | 104 | return matching, message 105 | 106 | 107 | def create_simplefilelist(): 108 | settings = QSettings('Pandoc', 'PanConvert') 109 | batch_settings = QSettings('Pandoc', 'PanConvert') 110 | batch_open_path = batch_settings.value('batch_open_path') 111 | filefilter = settings.value('batch_convert_filter','') 112 | message = '' 113 | 114 | filelist = glob.glob(batch_open_path + '/*') 115 | filter = filefilter.split(';') 116 | 117 | matching = [] 118 | 119 | for filteritem in filter: 120 | matching_filter = [s for s in filelist if filteritem in s] 121 | for i in matching_filter: 122 | matching.append(i) 123 | 124 | if len(matching) == 0: 125 | message = error_file_selection() 126 | 127 | return matching, message -------------------------------------------------------------------------------- /source/converter/lyx_converter.py: -------------------------------------------------------------------------------- 1 | #!/usr/local/bin/python3 2 | __author__ = 'apaeffgen' 3 | # -*- coding: utf-8 -*- 4 | 5 | # This file is part of Panconvert. 6 | # 7 | # Panconvert is free software: you can redistribute it and/or modify 8 | # it under the terms of the GNU General Public License as published by 9 | # the Free Software Foundation, either version 3 of the License, or 10 | # (at your option) any later version. 11 | # 12 | # Panconvert is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU General Public License 18 | # along with Panconvert. If not, see . 19 | 20 | import os 21 | import subprocess 22 | 23 | from PyQt5.QtCore import QSettings 24 | 25 | from source.helpers.interface_pandoc import * 26 | 27 | settings = QSettings('Pandoc', 'PanConvert') 28 | path_pandoc = settings.value('path_pandoc') 29 | 30 | def convert_markdown2lyx(text): 31 | settings = QSettings('Pandoc', 'PanConvert') 32 | path_multimarkdown = settings.value('path_multimarkdown','') 33 | 34 | if os.path.isfile(path_multimarkdown): 35 | 36 | args = [path_multimarkdown, '--to=lyx'] 37 | 38 | p = subprocess.Popen( 39 | args, 40 | stdin=subprocess.PIPE, 41 | stdout=subprocess.PIPE) 42 | 43 | return p.communicate(text.encode('utf-8'))[0].decode('utf-8') 44 | 45 | def batch_convert_markdown2lyx(openfile): 46 | 47 | settings = QSettings('Pandoc', 'PanConvert') 48 | path_multimarkdown = settings.value('path_multimarkdown','') 49 | batch_settings = QSettings('Pandoc', 'PanConvert') 50 | batch_open_path_output = batch_settings.value('batch_open_path_output') 51 | 52 | if os.path.isfile(path_multimarkdown): 53 | 54 | filename, file_extension = os.path.splitext(openfile) 55 | 56 | if batch_open_path_output == '': 57 | args = [path_multimarkdown, openfile, '--to=' + 'lyx', '--output=' + filename + '.' + 'lyx'] 58 | 59 | else: 60 | outputfile = os.path.basename(filename) 61 | args = [path_multimarkdown, openfile, '--to=' + 'lyx', '--output=' + batch_open_path_output + '/' + outputfile + '.' + 'lyx'] 62 | 63 | p = subprocess.Popen( 64 | args, 65 | stdin=subprocess.PIPE, 66 | stdout=subprocess.PIPE, 67 | stderr=subprocess.PIPE) 68 | #TODO# WRITE ERROR RETURN CODES 69 | return p.communicate(openfile.encode('utf-8'))[0].decode('utf-8') -------------------------------------------------------------------------------- /source/converter/manual_converter.py: -------------------------------------------------------------------------------- 1 | #!/usr/local/bin/python3 2 | __author__ = 'apaeffgen' 3 | # -*- coding: utf-8 -*- 4 | 5 | # This file is part of Panconvert. 6 | # 7 | # Panconvert is free software: you can redistribute it and/or modify 8 | # it under the terms of the GNU General Public License as published by 9 | # the Free Software Foundation, either version 3 of the License, or 10 | # (at your option) any later version. 11 | # 12 | # Panconvert is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU General Public License 18 | # along with Panconvert. If not, see . 19 | 20 | import subprocess 21 | 22 | from source.language.messages import * 23 | 24 | settings = QSettings('Pandoc', 'PanConvert') 25 | 26 | def convert_universal(text, ToFormat, FromFormat, extra_args): 27 | path_pandoc = settings.value('path_pandoc') 28 | try: 29 | os.path.isfile(path_pandoc) 30 | 31 | args = [path_pandoc, '--from=' + FromFormat, '--to=' + ToFormat] 32 | 33 | output = '' 34 | if extra_args != '' : 35 | extra_args = extra_args.split(';') 36 | for arg in extra_args: 37 | args.append(arg) 38 | 39 | p = subprocess.Popen( 40 | args, 41 | stdin=subprocess.PIPE, 42 | stdout=subprocess.PIPE, 43 | stderr=subprocess.PIPE) 44 | 45 | output1, error1 = p.communicate(text.encode('utf-8')) 46 | 47 | try: 48 | output = output1.decode('utf-8') 49 | error = error1.decode('utf-8') 50 | 51 | if p.returncode != 0: 52 | QtWidgets.QMessageBox.warning(None, 'Error-Message', 53 | 'An Error occurred.

{}'.format(error)) 54 | else: 55 | 56 | if output == '': 57 | output = error_no_output() 58 | 59 | 60 | except: 61 | error_fatal() 62 | 63 | return output 64 | 65 | except OSError: 66 | error_converter_path() 67 | 68 | def convert_binary(openfile,ToFormat,FromFormat,extra_args): 69 | path_pandoc = settings.value('path_pandoc') 70 | try: 71 | os.path.isfile(path_pandoc) 72 | 73 | args = [path_pandoc, '--from=' + FromFormat, '--to=' + ToFormat, openfile] 74 | 75 | if extra_args != '' : 76 | extra_args = extra_args.split(';') 77 | for arg in extra_args: 78 | args.append(arg) 79 | 80 | output = error_unknown() 81 | 82 | p = subprocess.Popen( 83 | args, 84 | stdin=subprocess.PIPE, 85 | stdout=subprocess.PIPE, 86 | stderr=subprocess.PIPE) 87 | 88 | output1, error1 = p.communicate(output.encode('utf-8')) 89 | 90 | try: 91 | output = output1.decode('utf-8') 92 | error = error1.decode('utf-8') 93 | 94 | if p.returncode != 0: 95 | QtWidgets.QMessageBox.warning(None, 'Error-Message', 96 | 'An Error occurred.

{}'.format(error)) 97 | else: 98 | if output != '': 99 | return output 100 | else: 101 | message = error_no_output() 102 | return message 103 | 104 | except: 105 | error_fatal() 106 | 107 | return output 108 | 109 | except OSError: 110 | error_converter_path() 111 | -------------------------------------------------------------------------------- /source/dialogs/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apaeffgen/PanConvert/2f87ba7980e1fd66e5330db22d4c73b649d90bda/source/dialogs/__init__.py -------------------------------------------------------------------------------- /source/dialogs/dialog_batch.py: -------------------------------------------------------------------------------- 1 | #!/usr/local/bin/python3 2 | __author__ = 'apaeffgen' 3 | # -*- coding: utf-8 -*- 4 | 5 | # This file is part of Panconvert. 6 | # 7 | # Panconvert is free software: you can redistribute it and/or modify 8 | # it under the terms of the GNU General Public License as published by 9 | # the Free Software Foundation, either version 3 of the License, or 10 | # (at your option) any later version. 11 | # 12 | # Panconvert is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU General Public License 18 | # along with Panconvert. If not, see . 19 | 20 | from PyQt5 import QtWidgets 21 | from PyQt5 import QtCore 22 | from PyQt5.QtCore import QSettings 23 | from PyQt5.QtCore import QPoint, QSize 24 | from source.gui.panconvert_dialog_batch import Ui_DialogBatch 25 | from distutils.util import strtobool as str2bool 26 | import platform 27 | 28 | global openfiles, batch_open_path 29 | 30 | def strtobool(input): 31 | """ 32 | safe strtobool : if input is a boolean 33 | it return the input 34 | """ 35 | if isinstance(input,bool): 36 | return input 37 | return str2bool(input) 38 | 39 | class BatchDialog(QtWidgets.QDialog): 40 | 41 | def __init__(self, parent=None): 42 | 43 | global batch_open_path, openfile, batch_open_path_output 44 | 45 | QtWidgets.QWidget.__init__(self, parent) 46 | self.ui = Ui_DialogBatch() 47 | self.ui.setupUi(self) 48 | self.ui.ButtonSave.clicked.connect(self.batch_settings) 49 | self.ui.ButtonCancel.clicked.connect(self.closeEvent) 50 | self.ui.Button_Open_Path.clicked.connect(self.directory_dialog) 51 | self.ui.Button_Open_Path_Output.clicked.connect(self.directory_dialog_Output) 52 | 53 | 54 | #Initialize Settings 55 | batch_settings = QSettings('Pandoc', 'PanConvert') 56 | settings = QSettings('Pandoc', 'PanConvert') 57 | 58 | self.resize(settings.value("Batch_size", QSize(270, 225))) 59 | self.move(settings.value("Batch_pos", QPoint(50, 50))) 60 | 61 | # Path Settings 62 | batch_open_path = batch_settings.value('batch_open_path') 63 | self.ui.OpenPath.insert(batch_open_path) 64 | batch_open_path_output = batch_settings.value('batch_open_path_output') 65 | self.ui.OpenPath_Output.insert(batch_open_path_output) 66 | 67 | # Filter Settings 68 | batch_convert_filter = batch_settings.value('batch_convert_filter') 69 | self.ui.Filter.insert(batch_convert_filter) 70 | 71 | 72 | #Parameter Settings 73 | 74 | parameterBatchconvertDirectory = batch_settings.value('batch_convert_directory', True) 75 | parameterBatchconvertFiles = batch_settings.value('batch_convert_files', False) 76 | parameterBatchconvertRecursive = batch_settings.value('batch_convert_recursive', True) 77 | 78 | 79 | 80 | if batch_settings.value('batch_convert_directory') is not None: 81 | if platform.system() == 'Darwin': 82 | self.ui.ParameterBatchconvertDirectory.setChecked(parameterBatchconvertDirectory) 83 | self.ui.ParameterBatchconvertFiles.setChecked(parameterBatchconvertFiles) 84 | self.ui.ParameterBatchconvertRecursive.setChecked(parameterBatchconvertRecursive) 85 | else: 86 | self.ui.ParameterBatchconvertDirectory.setChecked(strtobool(parameterBatchconvertDirectory)) 87 | self.ui.ParameterBatchconvertFiles.setChecked(strtobool(parameterBatchconvertFiles)) 88 | self.ui.ParameterBatchconvertRecursive.setChecked(strtobool(parameterBatchconvertRecursive)) 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | def closeEvent(self, event): 97 | 98 | settings = QSettings('Pandoc', 'PanConvert') 99 | Dialog_Size = settings.value('Dialog_Size') 100 | if Dialog_Size is True or Dialog_Size == 'true': 101 | settings.setValue("Batch_size", self.size()) 102 | settings.setValue("Batch_pos", self.pos()) 103 | 104 | 105 | settings.sync() 106 | settings.status() 107 | BatchDialog.close(self) 108 | 109 | def batch_settings(self): 110 | global batch_open_path, openfiles, batch_open_path_output 111 | 112 | batch_settings = QSettings('Pandoc', 'PanConvert') 113 | batch_settings.setValue('batch_convert_directory', self.ui.ParameterBatchconvertDirectory.isChecked()) 114 | batch_settings.setValue('batch_convert_files', self.ui.ParameterBatchconvertFiles.isChecked()) 115 | batch_settings.setValue('batch_convert_recursive', self.ui.ParameterBatchconvertRecursive.isChecked()) 116 | batch_settings.setValue('batch_open_path', self.ui.OpenPath.text()) 117 | batch_settings.setValue('batch_open_path_output', self.ui.OpenPath_Output.text()) 118 | batch_settings.setValue('batch_convert_filter', self.ui.Filter.text()) 119 | batch_settings.sync() 120 | batch_settings.status() 121 | 122 | BatchDialog.close(self) 123 | 124 | def directory_dialog(self): 125 | 126 | global data, openfiles, batch_open_path 127 | self.ui.OpenPath.clear() 128 | 129 | fd = QtWidgets.QFileDialog(self) 130 | 131 | if batch_open_path == '': 132 | fd.setDirectory(QtCore.QDir.homePath()) 133 | else: 134 | fd.setDirectory(batch_open_path) 135 | 136 | batch_directory = fd.getExistingDirectory() 137 | self.ui.OpenPath.insert(batch_directory) 138 | 139 | def directory_dialog_Output(self): 140 | 141 | global data, openfiles, batch_open_path_output 142 | self.ui.OpenPath_Output.clear() 143 | 144 | fd = QtWidgets.QFileDialog(self) 145 | 146 | if batch_open_path_output == '': 147 | fd.setDirectory(QtCore.QDir.homePath()) 148 | else: 149 | fd.setDirectory(batch_open_path_output) 150 | 151 | batch_directory = fd.getExistingDirectory() 152 | self.ui.OpenPath_Output.insert(batch_directory) 153 | 154 | 155 | 156 | 157 | 158 | 159 | if __name__ == "__main__": 160 | import sys 161 | 162 | app = QtWidgets.QApplication(sys.argv) 163 | myapp = BatchDialog() 164 | myapp.show() 165 | myapp.exec_() -------------------------------------------------------------------------------- /source/dialogs/dialog_fromformat.py: -------------------------------------------------------------------------------- 1 | #!/usr/local/bin/python3 2 | __author__ = 'apaeffgen' 3 | # -*- coding: utf-8 -*- 4 | 5 | # This file is part of Panconvert. 6 | # 7 | # Panconvert is free software: you can redistribute it and/or modify 8 | # it under the terms of the GNU General Public License as published by 9 | # the Free Software Foundation, either version 3 of the License, or 10 | # (at your option) any later version. 11 | # 12 | # Panconvert is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU General Public License 18 | # along with Panconvert. If not, see . 19 | 20 | from source.helpers.interface_pandoc import get_pandoc_formats, get_path_pandoc 21 | from source.gui.panconvert_diag_fromformat import Ui_From_Format_Dialog 22 | from source.language.messages import * 23 | 24 | 25 | class FromFormatDialog(QtWidgets.QDialog): 26 | 27 | def __init__(self, parent=None): 28 | 29 | QtWidgets.QWidget.__init__(self, parent) 30 | self.ui = Ui_From_Format_Dialog() 31 | self.ui.setupUi(self) 32 | #self.ui.ButtonInfo.clicked.connect(self.info) 33 | self.ui.ButtonCancel.clicked.connect(self.closeEvent) 34 | #self.ui.ButtonMoreInfo.clicked.connect(self.moreinfo) 35 | 36 | #Initialize Settings 37 | settings = QSettings('Pandoc', 'PanConvert') 38 | path_pandoc = settings.value('path_pandoc','') 39 | 40 | self.resize(settings.value("FromFormat_size", QSize(270, 225))) 41 | self.move(settings.value("FromFormat_pos", QPoint(50, 50))) 42 | 43 | if not os.path.isfile(path_pandoc): 44 | path_pandoc = get_path_pandoc() 45 | path_pandoc = settings.value('path_pandoc') 46 | 47 | if os.path.isfile(path_pandoc): 48 | formats = get_pandoc_formats() 49 | fromformats = formats[0] 50 | data = '
'.join(fromformats) 51 | self.ui.textBrowser.setHtml(data) 52 | else: 53 | message = error_converter_path() 54 | return message 55 | 56 | def closeEvent(self, event): 57 | 58 | settings = QSettings('Pandoc', 'PanConvert') 59 | Dialog_Size = settings.value('Dialog_Size') 60 | if Dialog_Size is True or Dialog_Size == 'true': 61 | settings.setValue("FromFormat_size", self.size()) 62 | settings.setValue("FromFormat_pos", self.pos()) 63 | 64 | 65 | settings.sync() 66 | settings.status() 67 | FromFormatDialog.close(self) 68 | 69 | def info(self): 70 | formats = get_pandoc_formats() 71 | fromformats = formats[0] 72 | data = '
'.join(fromformats) 73 | self.ui.textBrowser.setHtml(data) 74 | 75 | def moreinfo(self): 76 | website = 'http://pandoc.org/README.html' 77 | self.ui.textBrowser.load(QtCore.QUrl(website)) 78 | 79 | def back(self): 80 | back = 'href="javascript:history.go(-1)' 81 | self.ui.textBrowser.load(QtCore.QUrl(back)) -------------------------------------------------------------------------------- /source/dialogs/dialog_help.py: -------------------------------------------------------------------------------- 1 | #!/usr/local/bin/python3 2 | __author__ = 'apaeffgen' 3 | # -*- coding: utf-8 -*- 4 | 5 | # This file is part of Panconvert. 6 | # 7 | # Panconvert is free software: you can redistribute it and/or modify 8 | # it under the terms of the GNU General Public License as published by 9 | # the Free Software Foundation, either version 3 of the License, or 10 | # (at your option) any later version. 11 | # 12 | # Panconvert is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU General Public License 18 | # along with Panconvert. If not, see . 19 | 20 | from PyQt5 import QtWidgets 21 | from PyQt5 import QtCore 22 | from PyQt5.QtCore import QSettings 23 | from PyQt5.QtCore import QPoint, QSize 24 | from source.gui.panconvert_diag_help import Ui_Information_Dialog 25 | #from source.converter.interface_pandoc import get_pandoc_options 26 | 27 | class HelpDialog(QtWidgets.QDialog): 28 | 29 | def __init__(self, parent=None): 30 | 31 | QtWidgets.QWidget.__init__(self, parent) 32 | self.ui = Ui_Information_Dialog() 33 | self.ui.setupUi(self) 34 | self.ui.ButtonHelpPanconvert.clicked.connect(self.helpPanconvert) 35 | self.ui.ButtonCancel.clicked.connect(self.closeEvent) 36 | self.ui.ButtonHelpPandoc.clicked.connect(self.helpPandoc) 37 | self.ui.ButtonBackward.clicked.connect(self.back) 38 | self.ui.ButtonForward.clicked.connect(self.forward) 39 | 40 | website = 'http://panconvert.readthedocs.io' 41 | self.ui.textBrowser.load(QtCore.QUrl(website)) 42 | 43 | #Initialize Settings 44 | settings = QSettings('Pandoc', 'PanConvert') 45 | 46 | self.resize(settings.value("Help_size", QSize(270, 225))) 47 | self.move(settings.value("Help_pos", QPoint(50, 50))) 48 | 49 | def closeEvent(self, event): 50 | 51 | settings = QSettings('Pandoc', 'PanConvert') 52 | Dialog_Size = settings.value('Dialog_Size') 53 | if Dialog_Size is True or Dialog_Size == 'true': 54 | settings.setValue("Help_size", self.size()) 55 | settings.setValue("Help_pos", self.pos()) 56 | 57 | 58 | settings.sync() 59 | settings.status() 60 | 61 | HelpDialog.close(self) 62 | 63 | def helpPanconvert(self): 64 | website = 'http://panconvert.readthedocs.io' 65 | self.ui.textBrowser.load(QtCore.QUrl(website)) 66 | 67 | def helpPandoc(self): 68 | website = 'http://pandoc.org/README.html' 69 | self.ui.textBrowser.load(QtCore.QUrl(website)) 70 | 71 | def back(self): 72 | page = self.ui.textBrowser.page() 73 | history = page.history() 74 | history.back() 75 | 76 | 77 | def forward(self): 78 | page = self.ui.textBrowser.page() 79 | history = page.history() 80 | history.forward() 81 | -------------------------------------------------------------------------------- /source/dialogs/dialog_openuri.py: -------------------------------------------------------------------------------- 1 | #!/usr/local/bin/python3 2 | __author__ = 'apaeffgen' 3 | # -*- coding: utf-8 -*- 4 | 5 | # This file is part of Panconvert. 6 | # 7 | # Panconvert is free software: you can redistribute it and/or modify 8 | # it under the terms of the GNU General Public License as published by 9 | # the Free Software Foundation, either version 3 of the License, or 10 | # (at your option) any later version. 11 | # 12 | # Panconvert is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU General Public License 18 | # along with Panconvert. If not, see . 19 | 20 | from source.gui.panconvert_diag_openuri import Ui_DialogOpenURI 21 | from source.language.messages import * 22 | from source.main_gui import * 23 | import builtins 24 | import codecs 25 | from os.path import isfile 26 | 27 | 28 | 29 | class OpenURIDialog(QtWidgets.QDialog): 30 | global uri 31 | 32 | def __init__(self, parent=None): 33 | QtWidgets.QWidget.__init__(self, parent) 34 | self.ui = Ui_DialogOpenURI() 35 | self.ui.setupUi(self) 36 | self.ui.ButtonOpenURI.clicked.connect(self.openuri) 37 | self.ui.ButtonCancel.clicked.connect(self.closeEvent) 38 | self.ui.CheckBoxStayOnTop.stateChanged.connect(self.stayOnTop) 39 | 40 | #Initialize Settings 41 | settings = QSettings('Pandoc', 'PanConvert') 42 | 43 | self.resize(settings.value("OpenURI_size", QSize(270, 225))) 44 | self.move(settings.value("OpenURI_pos", QPoint(50, 50))) 45 | uri = '' 46 | 47 | 48 | def stayOnTop(self): 49 | if self.ui.CheckBoxStayOnTop.isChecked(): 50 | self.setWindowFlags( 51 | self.windowFlags() & ~QtCore.Qt.WindowStaysOnTopHint) 52 | else: 53 | self.setWindowFlags( 54 | self.windowFlags() | QtCore.Qt.WindowStaysOnTopHint) 55 | self.show() 56 | 57 | def closeEvent(self, event): 58 | settings = QSettings('Pandoc', 'PanConvert') 59 | Dialog_Size = settings.value('Dialog_Size') 60 | if Dialog_Size is True or Dialog_Size == 'true': 61 | settings.setValue("OpenURI_size", self.size()) 62 | settings.setValue("OpenURI_pos", self.pos()) 63 | 64 | settings.sync() 65 | settings.status() 66 | OpenURIDialog.close(self) 67 | 68 | def openuri(self): 69 | uri = self.ui.URI.toPlainText() 70 | builtins.uri = uri 71 | OpenURIDialog.close(self) -------------------------------------------------------------------------------- /source/dialogs/dialog_options.py: -------------------------------------------------------------------------------- 1 | #!/usr/local/bin/python3 2 | __author__ = 'apaeffgen' 3 | # -*- coding: utf-8 -*- 4 | 5 | # This file is part of Panconvert. 6 | # 7 | # Panconvert is free software: you can redistribute it and/or modify 8 | # it under the terms of the GNU General Public License as published by 9 | # the Free Software Foundation, either version 3 of the License, or 10 | # (at your option) any later version. 11 | # 12 | # Panconvert is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU General Public License 18 | # along with Panconvert. If not, see . 19 | 20 | from source.helpers.interface_pandoc import get_pandoc_options, get_path_pandoc 21 | from source.gui.panconvert_diag_info import Ui_Information_Dialog 22 | from source.language.messages import * 23 | 24 | 25 | class InfoDialog(QtWidgets.QDialog): 26 | 27 | def __init__(self, parent=None): 28 | 29 | QtWidgets.QWidget.__init__(self, parent) 30 | self.ui = Ui_Information_Dialog() 31 | self.ui.setupUi(self) 32 | self.ui.ButtonInfo.clicked.connect(self.info) 33 | self.ui.ButtonCancel.clicked.connect(self.closeEvent) 34 | self.ui.ButtonMoreInfo.clicked.connect(self.moreinfo) 35 | 36 | #Initialize Settings 37 | settings = QSettings('Pandoc', 'PanConvert') 38 | path_pandoc = settings.value('path_pandoc','') 39 | 40 | self.resize(settings.value("Option_size", QSize(270, 225))) 41 | self.move(settings.value("Option_pos", QPoint(50, 50))) 42 | 43 | if not os.path.isfile(path_pandoc): 44 | path_pandoc = get_path_pandoc() 45 | path_pandoc = settings.value('path_pandoc') 46 | 47 | if os.path.isfile(path_pandoc): 48 | options = get_pandoc_options() 49 | data = '
' + '
'.join(options) + '
' 50 | self.ui.textBrowser.setHtml(data) 51 | else: 52 | message = error_converter_path() 53 | self.ui.textBrowser.setHtml(message) 54 | 55 | 56 | def closeEvent(self, event): 57 | 58 | settings = QSettings('Pandoc', 'PanConvert') 59 | Dialog_Size = settings.value('Dialog_Size') 60 | if Dialog_Size is True or Dialog_Size == 'true': 61 | settings.setValue("Option_size", self.size()) 62 | settings.setValue("Option_pos", self.pos()) 63 | 64 | 65 | settings.sync() 66 | settings.status() 67 | InfoDialog.close(self) 68 | 69 | def info(self): 70 | options = get_pandoc_options() 71 | data = '
' + '
'.join(options) + '
' 72 | self.ui.textBrowser.setHtml(data) 73 | 74 | def moreinfo(self): 75 | website = 'http://pandoc.org/README.html' 76 | self.ui.textBrowser.load(QtCore.QUrl(website)) 77 | 78 | def back(self): 79 | back = 'href="javascript:history.go(-1)' 80 | self.ui.textBrowser.load(QtCore.QUrl(back)) -------------------------------------------------------------------------------- /source/dialogs/dialog_preferences.py: -------------------------------------------------------------------------------- 1 | #!/usr/local/bin/python3 2 | __author__ = 'apaeffgen' 3 | # -*- coding: utf-8 -*- 4 | 5 | # This file is part of Panconvert. 6 | # 7 | # Panconvert is free software: you can redistribute it and/or modify 8 | # it under the terms of the GNU General Public License as published by 9 | # the Free Software Foundation, either version 3 of the License, or 10 | # (at your option) any later version. 11 | # 12 | # Panconvert is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU General Public License 18 | # along with Panconvert. If not, see . 19 | 20 | from PyQt5 import QtWidgets 21 | from PyQt5.QtCore import QSettings 22 | from PyQt5 import QtCore 23 | from PyQt5.QtCore import QPoint, QSize 24 | from source.gui.panconvert_diag_prefpane import Ui_DialogPreferences 25 | from distutils.util import strtobool as str2bool 26 | import platform, os 27 | 28 | global path_pandoc, path_dialog 29 | 30 | def strtobool(input): 31 | """ 32 | safe strtobool : if input is a boolean 33 | it return the input 34 | """ 35 | if isinstance(input,bool): 36 | return input 37 | return str2bool(input) 38 | 39 | # dictionary for all the languages that have translations 40 | lang = {} 41 | lang['en'] = 'English' 42 | lang['de'] = 'Deutsch' 43 | lang['es'] = 'Español' 44 | lang['fr'] = 'Français' 45 | 46 | 47 | class PreferenceDialog(QtWidgets.QDialog): 48 | 49 | global path_pandoc, path_dialog 50 | 51 | def __init__(self, parent=None): 52 | 53 | QtWidgets.QWidget.__init__(self, parent) 54 | self.ui = Ui_DialogPreferences() 55 | self.ui.setupUi(self) 56 | self.ui.ButtonSave.clicked.connect(self.settings) 57 | self.ui.ButtonSave_2.clicked.connect(self.settings) 58 | self.ui.ButtonCancel.clicked.connect(self.cancel_dialog) 59 | self.ui.ButtonCancel_2.clicked.connect(self.cancel_dialog) 60 | self.ui.ButtonPandocPath.clicked.connect(self.DirectoryPandoc) 61 | self.ui.ButtonMarkdownPath.clicked.connect(self.DirectoryMarkdown) 62 | self.ui.ButtonOpenSavePath.clicked.connect(self.DirectoryOpenSave) 63 | 64 | #Initialize Settings 65 | settings = QSettings('Pandoc', 'PanConvert') 66 | 67 | #Language Settings 68 | for longLang in lang.values(): 69 | self.ui.comboBoxLanguageSelector.addItem(longLang) 70 | default_language = settings.value('default_language') 71 | self.ui.comboBoxLanguageSelector.setCurrentText(default_language) 72 | self.ui.comboBoxLanguageSelector.currentIndexChanged.connect(self.SetLanguage) 73 | 74 | #Checkbox Size of Main Window and DockWindow 75 | Window_Size = settings.value('Window_Size', True) 76 | Dock_Size = settings.value('Dock_Size', True) 77 | Dialog_Size = settings.value('Dialog_Size', True) 78 | Hide_Batch = settings.value('Hide_Batch', True) 79 | 80 | #Checkbox Gui Old / New / BatchMode 81 | Button_OldGui = settings.value('Button_OldGui', False) 82 | Button_NewGui = settings.value('Button_NewGui', True) 83 | 84 | 85 | #Standard Tab of the New Gui 86 | Tab_StandardConverter = settings.value('Tab_StandardConverter', True) 87 | Tab_ManualConverter = settings.value('Tab_ManualConverter', False) 88 | Tab_BatchConverter = settings.value('Tab_BatchConverter', False) 89 | 90 | #Size of Dialog Windows 91 | self.resize(settings.value("Preference_size", QSize(270, 225))) 92 | self.move(settings.value("Preference_pos", QPoint(50, 50))) 93 | 94 | #Paths and Parameters 95 | path_pandoc = settings.value('path_pandoc') 96 | self.ui.Pandoc_Path.insert(path_pandoc) 97 | path_multimarkdown = settings.value('path_multimarkdown') 98 | self.ui.Markdown_Path.insert(path_multimarkdown) 99 | path_dialog = settings.value('path_dialog') 100 | self.ui.Dialog_Path.insert(path_dialog) 101 | 102 | fromParameter = settings.value('fromParameter') 103 | self.ui.FromParameter.insert(fromParameter) 104 | toParameter = settings.value('toParameter') 105 | self.ui.ToParameter.insert(toParameter) 106 | xtraParameter = settings.value('xtraParameter') 107 | self.ui.XtraParameter.insert(xtraParameter) 108 | 109 | #Buffer Save Parameters 110 | BufferSaveSuffix = settings.value('BufferSaveSuffix') 111 | self.ui.BufferSaveSuffix.insert(BufferSaveSuffix) 112 | BufferSaveName = settings.value('BufferSaveName') 113 | self.ui.BufferSaveName.insert(BufferSaveName) 114 | 115 | #Checkboxes 116 | Standard_Conversion = settings.value('Standard_Conversion', False) 117 | Batch_Conversion = settings.value('Batch_Conversion', False) 118 | From_Markdown = settings.value('From_Markdown', False) 119 | From_Html = settings.value('From_Html', False) 120 | From_Latex = settings.value('From_Latex', False) 121 | From_Opml = settings.value('From_Opml', False) 122 | 123 | 124 | To_Markdown = settings.value('To_Markdown', False) 125 | To_Html = settings.value('To_Html', False) 126 | To_Latex = settings.value('To_Latex', False) 127 | To_Opml = settings.value('To_Opml', False) 128 | To_Lyx = settings.value('To_Lyx', False) 129 | To_Epub = settings.value('To_Epub', False) 130 | 131 | 132 | if settings.value('From_Markdown') is not None: 133 | if platform.system() == 'Darwin': 134 | self.ui.ButtonFromMarkdown.setChecked(From_Markdown) 135 | self.ui.ButtonFromHtml.setChecked(From_Html) 136 | self.ui.ButtonFromLatex.setChecked(From_Latex) 137 | self.ui.ButtonFromOpml.setChecked(From_Opml) 138 | self.ui.ButtonToMarkdown.setChecked(To_Markdown) 139 | self.ui.ButtonToHtml.setChecked(To_Html) 140 | self.ui.ButtonToLatex.setChecked(To_Latex) 141 | self.ui.ButtonToOpml.setChecked(To_Opml) 142 | self.ui.ButtonToLyx.setChecked(To_Lyx) 143 | self.ui.ButtonToEpub.setChecked(To_Epub) 144 | self.ui.StandardConversion.setChecked(Standard_Conversion) 145 | self.ui.BatchConversion.setChecked(Batch_Conversion) 146 | self.ui.Window_Size.setChecked(Window_Size) 147 | self.ui.Dock_Size.setChecked(Dock_Size) 148 | self.ui.Dialog_Size.setChecked(Dialog_Size) 149 | self.ui.Button_OldGui.setChecked(Button_OldGui) 150 | self.ui.Button_NewGui.setChecked(Button_NewGui) 151 | self.ui.Tab_StandardConverter.setChecked(Tab_StandardConverter) 152 | self.ui.Tab_ManualConverter.setChecked(Tab_ManualConverter) 153 | self.ui.Hide_Batch.setChecked(Hide_Batch) 154 | 155 | else: 156 | self.ui.ButtonFromMarkdown.setChecked(strtobool(From_Markdown)) 157 | self.ui.ButtonFromHtml.setChecked(strtobool(From_Html)) 158 | self.ui.ButtonFromLatex.setChecked(strtobool(From_Latex)) 159 | self.ui.ButtonFromOpml.setChecked(strtobool(From_Opml)) 160 | self.ui.ButtonToMarkdown.setChecked(strtobool(To_Markdown)) 161 | self.ui.ButtonToHtml.setChecked(strtobool(To_Html)) 162 | self.ui.ButtonToLatex.setChecked(strtobool(To_Latex)) 163 | self.ui.ButtonToOpml.setChecked(strtobool(To_Opml)) 164 | self.ui.ButtonToLyx.setChecked(strtobool(To_Lyx)) 165 | self.ui.ButtonToEpub.setChecked(strtobool(To_Epub)) 166 | self.ui.StandardConversion.setChecked(strtobool(Standard_Conversion)) 167 | self.ui.BatchConversion.setChecked(strtobool(Batch_Conversion)) 168 | self.ui.Window_Size.setChecked(strtobool(Window_Size)) 169 | self.ui.Dock_Size.setChecked(strtobool(Dock_Size)) 170 | self.ui.Dialog_Size.setChecked(strtobool(Dialog_Size)) 171 | self.ui.Button_OldGui.setChecked(strtobool(Button_OldGui)) 172 | self.ui.Button_NewGui.setChecked(strtobool(Button_NewGui)) 173 | self.ui.Tab_StandardConverter.setChecked(strtobool(Tab_StandardConverter)) 174 | self.ui.Tab_ManualConverter.setChecked(strtobool(Tab_ManualConverter)) 175 | self.ui.Hide_Batch.setChecked(strtobool(Hide_Batch)) 176 | 177 | def cancel_dialog(self): 178 | PreferenceDialog.close(self) 179 | 180 | def settings(self): 181 | 182 | settings = QSettings('Pandoc', 'PanConvert') 183 | 184 | settings.setValue('Window_Size', self.ui.Window_Size.isChecked()) 185 | settings.setValue('Dock_Size', self.ui.Dock_Size.isChecked()) 186 | settings.setValue('Dialog_Size', self.ui.Dialog_Size.isChecked()) 187 | settings.setValue('Hide_Batch', self.ui.Hide_Batch.isChecked()) 188 | 189 | settings.setValue('Button_OldGui', self.ui.Button_OldGui.isChecked()) 190 | settings.setValue('Button_NewGui', self.ui.Button_NewGui.isChecked()) 191 | settings.setValue('Tab_StandardConverter', self.ui.Tab_StandardConverter.isChecked()) 192 | settings.setValue('Tab_ManualConverter', self.ui.Tab_ManualConverter.isChecked()) 193 | 194 | settings.setValue('path_pandoc', self.ui.Pandoc_Path.text()) 195 | settings.setValue('path_multimarkdown', self.ui.Markdown_Path.text()) 196 | settings.setValue('path_dialog', self.ui.Dialog_Path.text()) 197 | 198 | settings.setValue('BufferSaveSuffix', self.ui.BufferSaveSuffix.text()) 199 | settings.setValue('BufferSaveName', self.ui.BufferSaveName.text()) 200 | 201 | settings.setValue('fromParameter', self.ui.FromParameter.text()) 202 | settings.setValue('toParameter', self.ui.ToParameter.text()) 203 | settings.setValue('xtraParameter', self.ui.XtraParameter.text()) 204 | 205 | settings.setValue('Standard_Conversion', self.ui.StandardConversion.isChecked()) 206 | settings.setValue('Batch_Conversion', self.ui.BatchConversion.isChecked()) 207 | 208 | 209 | settings.setValue('From_Markdown', self.ui.ButtonFromMarkdown.isChecked()) 210 | settings.setValue('From_Html', self.ui.ButtonFromHtml.isChecked()) 211 | settings.setValue('From_Latex', self.ui.ButtonFromLatex.isChecked()) 212 | settings.setValue('From_Opml', self.ui.ButtonFromOpml.isChecked()) 213 | 214 | settings.setValue('To_Markdown', self.ui.ButtonToMarkdown.isChecked()) 215 | settings.setValue('To_Html', self.ui.ButtonToHtml.isChecked()) 216 | settings.setValue('To_Latex', self.ui.ButtonToLatex.isChecked()) 217 | settings.setValue('To_Opml', self.ui.ButtonToOpml.isChecked()) 218 | settings.setValue('To_Lyx', self.ui.ButtonToLyx.isChecked()) 219 | settings.setValue('To_Epub', self.ui.ButtonToEpub.isChecked()) 220 | 221 | Dialog_Size = settings.value('Dialog_Size') 222 | if Dialog_Size is True or Dialog_Size == 'true': 223 | settings.setValue("Preference_size", self.size()) 224 | settings.setValue("Preference_pos", self.pos()) 225 | 226 | settings.sync() 227 | settings.status() 228 | 229 | PreferenceDialog.close(self) 230 | 231 | def DirectoryPandoc(self): 232 | self.ui.Pandoc_Path.clear() 233 | fd = QtWidgets.QFileDialog(self) 234 | fd.setDirectory(QtCore.QDir.homePath()) 235 | PandocDirectory = fd.getExistingDirectory() 236 | self.ui.Pandoc_Path.insert(PandocDirectory) 237 | 238 | def DirectoryMarkdown(self): 239 | self.ui.Markdown_Path.clear() 240 | fd = QtWidgets.QFileDialog(self) 241 | fd.setDirectory(QtCore.QDir.homePath()) 242 | MarkdownDirectory = fd.getExistingDirectory() 243 | self.ui.Markdown_Path.insert(MarkdownDirectory) 244 | 245 | def DirectoryOpenSave(self): 246 | self.ui.Dialog_Path.clear() 247 | fd = QtWidgets.QFileDialog(self) 248 | fd.setDirectory(QtCore.QDir.homePath()) 249 | OpenSaveDirectory = fd.getExistingDirectory() 250 | self.ui.Dialog_Path.insert(OpenSaveDirectory) 251 | 252 | def SetLanguage(self): 253 | settings = QSettings('Pandoc', 'PanConvert') 254 | Longname = self.ui.comboBoxLanguageSelector.currentText() 255 | # asserting one code per language 256 | codeLang = [key for key, value in lang.items() if value == Longname][0] 257 | settings.setValue('default_language', codeLang) 258 | settings.sync() 259 | settings.status() 260 | 261 | 262 | if __name__ == "__main__": 263 | import sys 264 | 265 | app = QtWidgets.QApplication(sys.argv) 266 | myapp = PreferenceDialog() 267 | myapp.show() 268 | myapp.exec_() 269 | -------------------------------------------------------------------------------- /source/dialogs/dialog_toformat.py: -------------------------------------------------------------------------------- 1 | #!/usr/local/bin/python3 2 | __author__ = 'apaeffgen' 3 | # -*- coding: utf-8 -*- 4 | 5 | # This file is part of Panconvert. 6 | # 7 | # Panconvert is free software: you can redistribute it and/or modify 8 | # it under the terms of the GNU General Public License as published by 9 | # the Free Software Foundation, either version 3 of the License, or 10 | # (at your option) any later version. 11 | # 12 | # Panconvert is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU General Public License 18 | # along with Panconvert. If not, see . 19 | 20 | from source.helpers.interface_pandoc import get_pandoc_formats 21 | from source.gui.panconvert_diag_toformat import Ui_To_Format_Dialog 22 | from source.language.messages import * 23 | 24 | 25 | class ToFormatDialog(QtWidgets.QDialog): 26 | 27 | def __init__(self, parent=None): 28 | 29 | QtWidgets.QWidget.__init__(self, parent) 30 | self.ui = Ui_To_Format_Dialog() 31 | self.ui.setupUi(self) 32 | #self.ui.ButtonInfo.clicked.connect(self.info) 33 | self.ui.ButtonCancel.clicked.connect(self.closeEvent) 34 | #self.ui.ButtonMoreInfo.clicked.connect(self.moreinfo) 35 | 36 | #Initialize Settings 37 | settings = QSettings('Pandoc', 'PanConvert') 38 | path_pandoc = settings.value('path_pandoc','') 39 | 40 | self.resize(settings.value("ToFormat_size", QSize(270, 225))) 41 | self.move(settings.value("ToFormat_pos", QPoint(50, 50))) 42 | 43 | if os.path.isfile(path_pandoc): 44 | formats = get_pandoc_formats() 45 | toformats = formats[1] 46 | data = '
'.join(toformats) 47 | self.ui.textBrowser.setHtml(data) 48 | else: 49 | message = error_converter_path() 50 | self.ui.textBrowser.setHtml(message) 51 | 52 | 53 | def closeEvent(self, event): 54 | 55 | settings = QSettings('Pandoc', 'PanConvert') 56 | Dialog_Size = settings.value('Dialog_Size') 57 | if Dialog_Size is True or Dialog_Size == 'true': 58 | settings.setValue("ToFormat_size", self.size()) 59 | settings.setValue("ToFormat_pos", self.pos()) 60 | 61 | 62 | settings.sync() 63 | settings.status() 64 | ToFormatDialog.close(self) 65 | 66 | def info(self): 67 | formats = get_pandoc_formats() 68 | toformats = formats[1] 69 | data = '
'.join(toformats) 70 | self.ui.textBrowser.setHtml(data) 71 | 72 | def moreinfo(self): 73 | website = 'http://pandoc.org/README.html' 74 | self.ui.textBrowser.load(QtCore.QUrl(website)) 75 | 76 | def back(self): 77 | back = 'href="javascript:history.go(-1)' 78 | self.ui.textBrowser.load(QtCore.QUrl(back)) -------------------------------------------------------------------------------- /source/gui/__init__.py: -------------------------------------------------------------------------------- 1 | __author__ = 'apaeffgen' 2 | # _*_ coding: utf-8 _*_ 3 | -------------------------------------------------------------------------------- /source/gui/icons.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | icons/open_uri.png 4 | icons/freferences 5 | icons/help.png 6 | icons/preferences 7 | icons/opml 8 | icons/save_as 9 | icons/export_latex 10 | icons/export 11 | icons/close 12 | icons/open 13 | icons/new 14 | icons/save 15 | 16 | 17 | -------------------------------------------------------------------------------- /source/gui/icons/close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apaeffgen/PanConvert/2f87ba7980e1fd66e5330db22d4c73b649d90bda/source/gui/icons/close.png -------------------------------------------------------------------------------- /source/gui/icons/export: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apaeffgen/PanConvert/2f87ba7980e1fd66e5330db22d4c73b649d90bda/source/gui/icons/export -------------------------------------------------------------------------------- /source/gui/icons/export_latex: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apaeffgen/PanConvert/2f87ba7980e1fd66e5330db22d4c73b649d90bda/source/gui/icons/export_latex -------------------------------------------------------------------------------- /source/gui/icons/freferences: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apaeffgen/PanConvert/2f87ba7980e1fd66e5330db22d4c73b649d90bda/source/gui/icons/freferences -------------------------------------------------------------------------------- /source/gui/icons/help.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apaeffgen/PanConvert/2f87ba7980e1fd66e5330db22d4c73b649d90bda/source/gui/icons/help.png -------------------------------------------------------------------------------- /source/gui/icons/icon.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apaeffgen/PanConvert/2f87ba7980e1fd66e5330db22d4c73b649d90bda/source/gui/icons/icon.icns -------------------------------------------------------------------------------- /source/gui/icons/new.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apaeffgen/PanConvert/2f87ba7980e1fd66e5330db22d4c73b649d90bda/source/gui/icons/new.icns -------------------------------------------------------------------------------- /source/gui/icons/open: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apaeffgen/PanConvert/2f87ba7980e1fd66e5330db22d4c73b649d90bda/source/gui/icons/open -------------------------------------------------------------------------------- /source/gui/icons/opml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apaeffgen/PanConvert/2f87ba7980e1fd66e5330db22d4c73b649d90bda/source/gui/icons/opml -------------------------------------------------------------------------------- /source/gui/icons/preferences: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apaeffgen/PanConvert/2f87ba7980e1fd66e5330db22d4c73b649d90bda/source/gui/icons/preferences -------------------------------------------------------------------------------- /source/gui/icons/save: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apaeffgen/PanConvert/2f87ba7980e1fd66e5330db22d4c73b649d90bda/source/gui/icons/save -------------------------------------------------------------------------------- /source/gui/icons/save_as: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apaeffgen/PanConvert/2f87ba7980e1fd66e5330db22d4c73b649d90bda/source/gui/icons/save_as -------------------------------------------------------------------------------- /source/gui/panconvert_diag_fromformat.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | # Form implementation generated from reading ui file 'panconvert_diag_fromformat.ui' 4 | # 5 | # Created by: PyQt5 UI code generator 5.8.1 6 | # 7 | # WARNING! All changes made in this file will be lost! 8 | 9 | from PyQt5 import QtCore, QtGui, QtWidgets 10 | 11 | class Ui_From_Format_Dialog(object): 12 | def setupUi(self, From_Format_Dialog): 13 | From_Format_Dialog.setObjectName("From_Format_Dialog") 14 | From_Format_Dialog.resize(224, 234) 15 | self.gridLayout = QtWidgets.QGridLayout(From_Format_Dialog) 16 | self.gridLayout.setObjectName("gridLayout") 17 | self.verticalLayout = QtWidgets.QVBoxLayout() 18 | self.verticalLayout.setObjectName("verticalLayout") 19 | self.ButtonCancel = QtWidgets.QPushButton(From_Format_Dialog) 20 | self.ButtonCancel.setObjectName("ButtonCancel") 21 | self.verticalLayout.addWidget(self.ButtonCancel) 22 | self.gridLayout.addLayout(self.verticalLayout, 1, 0, 1, 1) 23 | self.textBrowser = QtWebEngineWidgets.QWebEngineView(From_Format_Dialog) 24 | self.textBrowser.setMinimumSize(QtCore.QSize(200, 100)) 25 | self.textBrowser.setObjectName("textBrowser") 26 | self.gridLayout.addWidget(self.textBrowser, 0, 0, 1, 1) 27 | 28 | self.retranslateUi(From_Format_Dialog) 29 | QtCore.QMetaObject.connectSlotsByName(From_Format_Dialog) 30 | 31 | def retranslateUi(self, From_Format_Dialog): 32 | _translate = QtCore.QCoreApplication.translate 33 | From_Format_Dialog.setWindowTitle(_translate("From_Format_Dialog", "Pandoc From Formats")) 34 | self.ButtonCancel.setText(_translate("From_Format_Dialog", "Cancel")) 35 | 36 | from PyQt5 import QtWebEngineWidgets 37 | -------------------------------------------------------------------------------- /source/gui/panconvert_diag_fromformat.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | From_Format_Dialog 4 | 5 | 6 | 7 | 0 8 | 0 9 | 224 10 | 234 11 | 12 | 13 | 14 | Pandoc From Formats 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | Cancel 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 200 33 | 100 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | QWebEngineView 43 | QWidget 44 |
qwebengineview.h
45 | 1 46 |
47 |
48 | 49 | 50 |
51 | -------------------------------------------------------------------------------- /source/gui/panconvert_diag_help.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | # Form implementation generated from reading ui file 'panconvert_diag_help.ui' 4 | # 5 | # Created by: PyQt5 UI code generator 5.8.1 6 | # 7 | # WARNING! All changes made in this file will be lost! 8 | 9 | from PyQt5 import QtCore, QtGui, QtWidgets 10 | 11 | class Ui_Information_Dialog(object): 12 | def setupUi(self, Information_Dialog): 13 | Information_Dialog.setObjectName("Information_Dialog") 14 | Information_Dialog.resize(492, 575) 15 | self.gridLayout = QtWidgets.QGridLayout(Information_Dialog) 16 | self.gridLayout.setObjectName("gridLayout") 17 | self.horizontalLayout = QtWidgets.QHBoxLayout() 18 | self.horizontalLayout.setObjectName("horizontalLayout") 19 | self.ButtonCancel = QtWidgets.QPushButton(Information_Dialog) 20 | self.ButtonCancel.setObjectName("ButtonCancel") 21 | self.horizontalLayout.addWidget(self.ButtonCancel) 22 | self.ButtonHelpPanconvert = QtWidgets.QPushButton(Information_Dialog) 23 | self.ButtonHelpPanconvert.setObjectName("ButtonHelpPanconvert") 24 | self.horizontalLayout.addWidget(self.ButtonHelpPanconvert) 25 | self.ButtonHelpPandoc = QtWidgets.QPushButton(Information_Dialog) 26 | self.ButtonHelpPandoc.setObjectName("ButtonHelpPandoc") 27 | self.horizontalLayout.addWidget(self.ButtonHelpPandoc) 28 | self.ButtonBackward = QtWidgets.QPushButton(Information_Dialog) 29 | self.ButtonBackward.setObjectName("ButtonBackward") 30 | self.horizontalLayout.addWidget(self.ButtonBackward) 31 | self.ButtonForward = QtWidgets.QPushButton(Information_Dialog) 32 | self.ButtonForward.setObjectName("ButtonForward") 33 | self.horizontalLayout.addWidget(self.ButtonForward) 34 | self.gridLayout.addLayout(self.horizontalLayout, 1, 0, 1, 1) 35 | self.textBrowser = QtWebEngineWidgets.QWebEngineView(Information_Dialog) 36 | self.textBrowser.setObjectName("textBrowser") 37 | self.gridLayout.addWidget(self.textBrowser, 0, 0, 1, 1) 38 | 39 | self.retranslateUi(Information_Dialog) 40 | QtCore.QMetaObject.connectSlotsByName(Information_Dialog) 41 | 42 | def retranslateUi(self, Information_Dialog): 43 | _translate = QtCore.QCoreApplication.translate 44 | Information_Dialog.setWindowTitle(_translate("Information_Dialog", "Help")) 45 | self.ButtonCancel.setText(_translate("Information_Dialog", "Cancel")) 46 | self.ButtonHelpPanconvert.setText(_translate("Information_Dialog", "Panconvert-Help")) 47 | self.ButtonHelpPandoc.setText(_translate("Information_Dialog", "Pandoc-Help")) 48 | self.ButtonBackward.setText(_translate("Information_Dialog", "<")) 49 | self.ButtonForward.setText(_translate("Information_Dialog", ">")) 50 | 51 | from PyQt5 import QtWebEngineWidgets 52 | -------------------------------------------------------------------------------- /source/gui/panconvert_diag_help.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | Information_Dialog 4 | 5 | 6 | 7 | 0 8 | 0 9 | 492 10 | 575 11 | 12 | 13 | 14 | Help 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | Cancel 23 | 24 | 25 | 26 | 27 | 28 | 29 | Panconvert-Help 30 | 31 | 32 | 33 | 34 | 35 | 36 | Pandoc-Help 37 | 38 | 39 | 40 | 41 | 42 | 43 | < 44 | 45 | 46 | 47 | 48 | 49 | 50 | > 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | QWebEngineView 64 | QWidget 65 |
qwebengineview.h
66 | 1 67 |
68 |
69 | 70 | 71 |
72 | -------------------------------------------------------------------------------- /source/gui/panconvert_diag_info.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | # Form implementation generated from reading ui file 'panconvert_diag_info.ui' 4 | # 5 | # Created by: PyQt5 UI code generator 5.8.1 6 | # 7 | # WARNING! All changes made in this file will be lost! 8 | 9 | from PyQt5 import QtCore, QtGui, QtWidgets 10 | 11 | class Ui_Information_Dialog(object): 12 | def setupUi(self, Information_Dialog): 13 | Information_Dialog.setObjectName("Information_Dialog") 14 | Information_Dialog.resize(707, 575) 15 | self.gridLayout_2 = QtWidgets.QGridLayout(Information_Dialog) 16 | self.gridLayout_2.setObjectName("gridLayout_2") 17 | self.gridLayout = QtWidgets.QGridLayout() 18 | self.gridLayout.setObjectName("gridLayout") 19 | self.ButtonCancel = QtWidgets.QPushButton(Information_Dialog) 20 | self.ButtonCancel.setObjectName("ButtonCancel") 21 | self.gridLayout.addWidget(self.ButtonCancel, 0, 0, 1, 1) 22 | self.ButtonInfo = QtWidgets.QPushButton(Information_Dialog) 23 | self.ButtonInfo.setObjectName("ButtonInfo") 24 | self.gridLayout.addWidget(self.ButtonInfo, 0, 2, 1, 1) 25 | self.ButtonMoreInfo = QtWidgets.QPushButton(Information_Dialog) 26 | self.ButtonMoreInfo.setObjectName("ButtonMoreInfo") 27 | self.gridLayout.addWidget(self.ButtonMoreInfo, 0, 1, 1, 1) 28 | self.gridLayout_2.addLayout(self.gridLayout, 1, 0, 1, 1) 29 | self.textBrowser = QtWebEngineWidgets.QWebEngineView(Information_Dialog) 30 | self.textBrowser.setObjectName("textBrowser") 31 | self.gridLayout_2.addWidget(self.textBrowser, 0, 0, 1, 1) 32 | 33 | self.retranslateUi(Information_Dialog) 34 | QtCore.QMetaObject.connectSlotsByName(Information_Dialog) 35 | 36 | def retranslateUi(self, Information_Dialog): 37 | _translate = QtCore.QCoreApplication.translate 38 | Information_Dialog.setWindowTitle(_translate("Information_Dialog", "Information")) 39 | self.ButtonCancel.setText(_translate("Information_Dialog", "Cancel")) 40 | self.ButtonInfo.setText(_translate("Information_Dialog", "Pandoc-Options")) 41 | self.ButtonMoreInfo.setText(_translate("Information_Dialog", "More Information")) 42 | 43 | from PyQt5 import QtWebEngineWidgets 44 | -------------------------------------------------------------------------------- /source/gui/panconvert_diag_info.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | Information_Dialog 4 | 5 | 6 | 7 | 0 8 | 0 9 | 707 10 | 575 11 | 12 | 13 | 14 | Information 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | Cancel 23 | 24 | 25 | 26 | 27 | 28 | 29 | Pandoc-Options 30 | 31 | 32 | 33 | 34 | 35 | 36 | More Information 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | QWebEngineView 50 | QWidget 51 |
qwebengineview.h
52 | 1 53 |
54 |
55 | 56 | 57 |
58 | -------------------------------------------------------------------------------- /source/gui/panconvert_diag_openuri.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | # Form implementation generated from reading ui file 'panconvert_diag_openuri.ui' 4 | # 5 | # Created by: PyQt5 UI code generator 5.8.1 6 | # 7 | # WARNING! All changes made in this file will be lost! 8 | 9 | from PyQt5 import QtCore, QtGui, QtWidgets 10 | 11 | class Ui_DialogOpenURI(object): 12 | def setupUi(self, DialogOpenURI): 13 | DialogOpenURI.setObjectName("DialogOpenURI") 14 | DialogOpenURI.resize(386, 90) 15 | sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) 16 | sizePolicy.setHorizontalStretch(0) 17 | sizePolicy.setVerticalStretch(0) 18 | sizePolicy.setHeightForWidth(DialogOpenURI.sizePolicy().hasHeightForWidth()) 19 | DialogOpenURI.setSizePolicy(sizePolicy) 20 | DialogOpenURI.setMinimumSize(QtCore.QSize(386, 90)) 21 | DialogOpenURI.setMaximumSize(QtCore.QSize(386, 90)) 22 | self.URI = QtWidgets.QPlainTextEdit(DialogOpenURI) 23 | self.URI.setGeometry(QtCore.QRect(10, 10, 371, 41)) 24 | self.URI.setObjectName("URI") 25 | self.layoutWidget = QtWidgets.QWidget(DialogOpenURI) 26 | self.layoutWidget.setGeometry(QtCore.QRect(7, 60, 371, 32)) 27 | self.layoutWidget.setObjectName("layoutWidget") 28 | self.horizontalLayout = QtWidgets.QHBoxLayout(self.layoutWidget) 29 | self.horizontalLayout.setContentsMargins(0, 0, 0, 0) 30 | self.horizontalLayout.setObjectName("horizontalLayout") 31 | self.CheckBoxStayOnTop = QtWidgets.QCheckBox(self.layoutWidget) 32 | self.CheckBoxStayOnTop.setEnabled(False) 33 | self.CheckBoxStayOnTop.setObjectName("CheckBoxStayOnTop") 34 | self.horizontalLayout.addWidget(self.CheckBoxStayOnTop) 35 | self.ButtonCancel = QtWidgets.QPushButton(self.layoutWidget) 36 | sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) 37 | sizePolicy.setHorizontalStretch(0) 38 | sizePolicy.setVerticalStretch(0) 39 | sizePolicy.setHeightForWidth(self.ButtonCancel.sizePolicy().hasHeightForWidth()) 40 | self.ButtonCancel.setSizePolicy(sizePolicy) 41 | self.ButtonCancel.setMinimumSize(QtCore.QSize(114, 32)) 42 | self.ButtonCancel.setMaximumSize(QtCore.QSize(114, 32)) 43 | self.ButtonCancel.setBaseSize(QtCore.QSize(114, 32)) 44 | self.ButtonCancel.setObjectName("ButtonCancel") 45 | self.horizontalLayout.addWidget(self.ButtonCancel) 46 | self.ButtonOpenURI = QtWidgets.QPushButton(self.layoutWidget) 47 | self.ButtonOpenURI.setObjectName("ButtonOpenURI") 48 | self.horizontalLayout.addWidget(self.ButtonOpenURI) 49 | 50 | self.retranslateUi(DialogOpenURI) 51 | QtCore.QMetaObject.connectSlotsByName(DialogOpenURI) 52 | 53 | def retranslateUi(self, DialogOpenURI): 54 | _translate = QtCore.QCoreApplication.translate 55 | DialogOpenURI.setWindowTitle(_translate("DialogOpenURI", "Open URI")) 56 | self.CheckBoxStayOnTop.setText(_translate("DialogOpenURI", "Stay on Top")) 57 | self.ButtonCancel.setText(_translate("DialogOpenURI", "Cancel")) 58 | self.ButtonOpenURI.setText(_translate("DialogOpenURI", "Open URI")) 59 | 60 | -------------------------------------------------------------------------------- /source/gui/panconvert_diag_openuri.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | DialogOpenURI 4 | 5 | 6 | 7 | 0 8 | 0 9 | 386 10 | 90 11 | 12 | 13 | 14 | 15 | 0 16 | 0 17 | 18 | 19 | 20 | 21 | 386 22 | 90 23 | 24 | 25 | 26 | 27 | 386 28 | 90 29 | 30 | 31 | 32 | Open URI 33 | 34 | 35 | 36 | 37 | 10 38 | 10 39 | 371 40 | 41 41 | 42 | 43 | 44 | 45 | 46 | 47 | 7 48 | 60 49 | 371 50 | 32 51 | 52 | 53 | 54 | 55 | 56 | 57 | false 58 | 59 | 60 | Stay on Top 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 0 69 | 0 70 | 71 | 72 | 73 | 74 | 114 75 | 32 76 | 77 | 78 | 79 | 80 | 114 81 | 32 82 | 83 | 84 | 85 | 86 | 114 87 | 32 88 | 89 | 90 | 91 | Cancel 92 | 93 | 94 | 95 | 96 | 97 | 98 | Open URI 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | -------------------------------------------------------------------------------- /source/gui/panconvert_diag_prefpane.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | # Form implementation generated from reading ui file 'source/gui/panconvert_diag_prefpane.ui' 4 | # 5 | # Created by: PyQt5 UI code generator 5.13.2 6 | # 7 | # WARNING! All changes made in this file will be lost! 8 | 9 | 10 | from PyQt5 import QtCore, QtGui, QtWidgets 11 | 12 | 13 | class Ui_DialogPreferences(object): 14 | def setupUi(self, DialogPreferences): 15 | DialogPreferences.setObjectName("DialogPreferences") 16 | DialogPreferences.resize(630, 380) 17 | DialogPreferences.setMinimumSize(QtCore.QSize(630, 380)) 18 | DialogPreferences.setMaximumSize(QtCore.QSize(630, 380)) 19 | self.tabWidget = QtWidgets.QTabWidget(DialogPreferences) 20 | self.tabWidget.setGeometry(QtCore.QRect(10, 20, 611, 361)) 21 | self.tabWidget.setTabShape(QtWidgets.QTabWidget.Triangular) 22 | self.tabWidget.setObjectName("tabWidget") 23 | self.tab_standard_pref = QtWidgets.QWidget() 24 | self.tab_standard_pref.setFocusPolicy(QtCore.Qt.TabFocus) 25 | self.tab_standard_pref.setObjectName("tab_standard_pref") 26 | self.groupBox = QtWidgets.QGroupBox(self.tab_standard_pref) 27 | self.groupBox.setGeometry(QtCore.QRect(350, 130, 231, 141)) 28 | self.groupBox.setObjectName("groupBox") 29 | self.XtraParameter = QtWidgets.QLineEdit(self.groupBox) 30 | self.XtraParameter.setGeometry(QtCore.QRect(80, 100, 113, 21)) 31 | self.XtraParameter.setObjectName("XtraParameter") 32 | self.FromParameter = QtWidgets.QLineEdit(self.groupBox) 33 | self.FromParameter.setGeometry(QtCore.QRect(80, 40, 113, 21)) 34 | self.FromParameter.setObjectName("FromParameter") 35 | self.ToParameter = QtWidgets.QLineEdit(self.groupBox) 36 | self.ToParameter.setGeometry(QtCore.QRect(80, 70, 113, 21)) 37 | self.ToParameter.setObjectName("ToParameter") 38 | self.label_FromParameter = QtWidgets.QLabel(self.groupBox) 39 | self.label_FromParameter.setGeometry(QtCore.QRect(10, 40, 41, 16)) 40 | self.label_FromParameter.setObjectName("label_FromParameter") 41 | self.label_ToParameter = QtWidgets.QLabel(self.groupBox) 42 | self.label_ToParameter.setGeometry(QtCore.QRect(10, 70, 31, 16)) 43 | self.label_ToParameter.setObjectName("label_ToParameter") 44 | self.label_Parameter = QtWidgets.QLabel(self.groupBox) 45 | self.label_Parameter.setGeometry(QtCore.QRect(10, 100, 62, 16)) 46 | self.label_Parameter.setObjectName("label_Parameter") 47 | self.BoxToFormat = QtWidgets.QGroupBox(self.tab_standard_pref) 48 | self.BoxToFormat.setGeometry(QtCore.QRect(190, 130, 111, 141)) 49 | self.BoxToFormat.setObjectName("BoxToFormat") 50 | self.ButtonToHtml = QtWidgets.QRadioButton(self.BoxToFormat) 51 | self.ButtonToHtml.setGeometry(QtCore.QRect(10, 40, 102, 20)) 52 | self.ButtonToHtml.setChecked(False) 53 | self.ButtonToHtml.setObjectName("ButtonToHtml") 54 | self.ButtonToLatex = QtWidgets.QRadioButton(self.BoxToFormat) 55 | self.ButtonToLatex.setGeometry(QtCore.QRect(10, 60, 102, 20)) 56 | self.ButtonToLatex.setObjectName("ButtonToLatex") 57 | self.ButtonToMarkdown = QtWidgets.QRadioButton(self.BoxToFormat) 58 | self.ButtonToMarkdown.setGeometry(QtCore.QRect(10, 80, 102, 20)) 59 | self.ButtonToMarkdown.setObjectName("ButtonToMarkdown") 60 | self.ButtonToOpml = QtWidgets.QRadioButton(self.BoxToFormat) 61 | self.ButtonToOpml.setGeometry(QtCore.QRect(10, 100, 102, 20)) 62 | self.ButtonToOpml.setObjectName("ButtonToOpml") 63 | self.ButtonToLyx = QtWidgets.QRadioButton(self.BoxToFormat) 64 | self.ButtonToLyx.setGeometry(QtCore.QRect(10, 120, 102, 20)) 65 | self.ButtonToLyx.setObjectName("ButtonToLyx") 66 | self.ButtonToEpub = QtWidgets.QRadioButton(self.BoxToFormat) 67 | self.ButtonToEpub.setGeometry(QtCore.QRect(10, 20, 102, 20)) 68 | self.ButtonToEpub.setChecked(True) 69 | self.ButtonToEpub.setObjectName("ButtonToEpub") 70 | self.ButtonPandocPath = QtWidgets.QToolButton(self.tab_standard_pref) 71 | self.ButtonPandocPath.setGeometry(QtCore.QRect(170, 0, 27, 23)) 72 | self.ButtonPandocPath.setObjectName("ButtonPandocPath") 73 | self.layoutWidget = QtWidgets.QWidget(self.tab_standard_pref) 74 | self.layoutWidget.setGeometry(QtCore.QRect(200, 0, 381, 85)) 75 | self.layoutWidget.setObjectName("layoutWidget") 76 | self.verticalLayout = QtWidgets.QVBoxLayout(self.layoutWidget) 77 | self.verticalLayout.setContentsMargins(0, 0, 0, 0) 78 | self.verticalLayout.setObjectName("verticalLayout") 79 | self.Pandoc_Path = QtWidgets.QLineEdit(self.layoutWidget) 80 | self.Pandoc_Path.setText("") 81 | self.Pandoc_Path.setObjectName("Pandoc_Path") 82 | self.verticalLayout.addWidget(self.Pandoc_Path) 83 | self.Markdown_Path = QtWidgets.QLineEdit(self.layoutWidget) 84 | self.Markdown_Path.setText("") 85 | self.Markdown_Path.setObjectName("Markdown_Path") 86 | self.verticalLayout.addWidget(self.Markdown_Path) 87 | self.Dialog_Path = QtWidgets.QLineEdit(self.layoutWidget) 88 | self.Dialog_Path.setObjectName("Dialog_Path") 89 | self.verticalLayout.addWidget(self.Dialog_Path) 90 | self.BoxFromFormat = QtWidgets.QGroupBox(self.tab_standard_pref) 91 | self.BoxFromFormat.setGeometry(QtCore.QRect(20, 130, 131, 121)) 92 | self.BoxFromFormat.setObjectName("BoxFromFormat") 93 | self.ButtonFromHtml = QtWidgets.QRadioButton(self.BoxFromFormat) 94 | self.ButtonFromHtml.setGeometry(QtCore.QRect(20, 30, 102, 20)) 95 | self.ButtonFromHtml.setObjectName("ButtonFromHtml") 96 | self.ButtonFromLatex = QtWidgets.QRadioButton(self.BoxFromFormat) 97 | self.ButtonFromLatex.setGeometry(QtCore.QRect(20, 50, 102, 20)) 98 | self.ButtonFromLatex.setObjectName("ButtonFromLatex") 99 | self.ButtonFromMarkdown = QtWidgets.QRadioButton(self.BoxFromFormat) 100 | self.ButtonFromMarkdown.setGeometry(QtCore.QRect(20, 70, 102, 20)) 101 | self.ButtonFromMarkdown.setChecked(True) 102 | self.ButtonFromMarkdown.setObjectName("ButtonFromMarkdown") 103 | self.ButtonFromOpml = QtWidgets.QRadioButton(self.BoxFromFormat) 104 | self.ButtonFromOpml.setGeometry(QtCore.QRect(20, 90, 102, 20)) 105 | self.ButtonFromOpml.setObjectName("ButtonFromOpml") 106 | self.layoutWidget_2 = QtWidgets.QWidget(self.tab_standard_pref) 107 | self.layoutWidget_2.setGeometry(QtCore.QRect(20, 280, 561, 32)) 108 | self.layoutWidget_2.setObjectName("layoutWidget_2") 109 | self.horizontalLayout = QtWidgets.QHBoxLayout(self.layoutWidget_2) 110 | self.horizontalLayout.setContentsMargins(0, 0, 0, 0) 111 | self.horizontalLayout.setObjectName("horizontalLayout") 112 | self.ButtonSave = QtWidgets.QPushButton(self.layoutWidget_2) 113 | self.ButtonSave.setObjectName("ButtonSave") 114 | self.horizontalLayout.addWidget(self.ButtonSave) 115 | self.ButtonCancel = QtWidgets.QPushButton(self.layoutWidget_2) 116 | self.ButtonCancel.setObjectName("ButtonCancel") 117 | self.horizontalLayout.addWidget(self.ButtonCancel) 118 | self.StandardConversion = QtWidgets.QCheckBox(self.layoutWidget_2) 119 | self.StandardConversion.setChecked(True) 120 | self.StandardConversion.setObjectName("StandardConversion") 121 | self.horizontalLayout.addWidget(self.StandardConversion) 122 | self.BatchConversion = QtWidgets.QCheckBox(self.layoutWidget_2) 123 | self.BatchConversion.setObjectName("BatchConversion") 124 | self.horizontalLayout.addWidget(self.BatchConversion) 125 | self.label_LanguageSelector = QtWidgets.QLabel(self.tab_standard_pref) 126 | self.label_LanguageSelector.setGeometry(QtCore.QRect(0, 100, 161, 21)) 127 | self.label_LanguageSelector.setObjectName("label_LanguageSelector") 128 | self.ButtonOpenSavePath = QtWidgets.QToolButton(self.tab_standard_pref) 129 | self.ButtonOpenSavePath.setGeometry(QtCore.QRect(170, 60, 27, 23)) 130 | self.ButtonOpenSavePath.setObjectName("ButtonOpenSavePath") 131 | self.ButtonMarkdownPath = QtWidgets.QToolButton(self.tab_standard_pref) 132 | self.ButtonMarkdownPath.setGeometry(QtCore.QRect(170, 30, 27, 23)) 133 | self.ButtonMarkdownPath.setObjectName("ButtonMarkdownPath") 134 | self.layoutWidget_3 = QtWidgets.QWidget(self.tab_standard_pref) 135 | self.layoutWidget_3.setGeometry(QtCore.QRect(0, 0, 159, 81)) 136 | self.layoutWidget_3.setObjectName("layoutWidget_3") 137 | self.verticalLayout_2 = QtWidgets.QVBoxLayout(self.layoutWidget_3) 138 | self.verticalLayout_2.setContentsMargins(0, 0, 0, 0) 139 | self.verticalLayout_2.setObjectName("verticalLayout_2") 140 | self.label_Pandoc_Path = QtWidgets.QLabel(self.layoutWidget_3) 141 | self.label_Pandoc_Path.setObjectName("label_Pandoc_Path") 142 | self.verticalLayout_2.addWidget(self.label_Pandoc_Path) 143 | self.label_Markdown_Path = QtWidgets.QLabel(self.layoutWidget_3) 144 | sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) 145 | sizePolicy.setHorizontalStretch(0) 146 | sizePolicy.setVerticalStretch(0) 147 | sizePolicy.setHeightForWidth(self.label_Markdown_Path.sizePolicy().hasHeightForWidth()) 148 | self.label_Markdown_Path.setSizePolicy(sizePolicy) 149 | self.label_Markdown_Path.setObjectName("label_Markdown_Path") 150 | self.verticalLayout_2.addWidget(self.label_Markdown_Path) 151 | self.label_Dialog_Path = QtWidgets.QLabel(self.layoutWidget_3) 152 | self.label_Dialog_Path.setObjectName("label_Dialog_Path") 153 | self.verticalLayout_2.addWidget(self.label_Dialog_Path) 154 | self.comboBoxLanguageSelector = QtWidgets.QComboBox(self.tab_standard_pref) 155 | self.comboBoxLanguageSelector.setGeometry(QtCore.QRect(200, 100, 381, 26)) 156 | self.comboBoxLanguageSelector.setEditable(False) 157 | self.comboBoxLanguageSelector.setCurrentText("") 158 | self.comboBoxLanguageSelector.setObjectName("comboBoxLanguageSelector") 159 | self.tabWidget.addTab(self.tab_standard_pref, "") 160 | self.tab_size_pref = QtWidgets.QWidget() 161 | self.tab_size_pref.setObjectName("tab_size_pref") 162 | self.ButtonSave_2 = QtWidgets.QPushButton(self.tab_size_pref) 163 | self.ButtonSave_2.setGeometry(QtCore.QRect(10, 290, 131, 32)) 164 | self.ButtonSave_2.setObjectName("ButtonSave_2") 165 | self.ButtonCancel_2 = QtWidgets.QPushButton(self.tab_size_pref) 166 | self.ButtonCancel_2.setGeometry(QtCore.QRect(150, 290, 130, 32)) 167 | self.ButtonCancel_2.setObjectName("ButtonCancel_2") 168 | self.BoxSaveSize = QtWidgets.QGroupBox(self.tab_size_pref) 169 | self.BoxSaveSize.setGeometry(QtCore.QRect(400, 190, 201, 141)) 170 | self.BoxSaveSize.setObjectName("BoxSaveSize") 171 | self.Window_Size = QtWidgets.QCheckBox(self.BoxSaveSize) 172 | self.Window_Size.setGeometry(QtCore.QRect(10, 40, 191, 20)) 173 | self.Window_Size.setAccessibleName("") 174 | self.Window_Size.setObjectName("Window_Size") 175 | self.Dock_Size = QtWidgets.QCheckBox(self.BoxSaveSize) 176 | self.Dock_Size.setGeometry(QtCore.QRect(10, 70, 181, 20)) 177 | self.Dock_Size.setObjectName("Dock_Size") 178 | self.Dialog_Size = QtWidgets.QCheckBox(self.BoxSaveSize) 179 | self.Dialog_Size.setGeometry(QtCore.QRect(10, 100, 181, 20)) 180 | self.Dialog_Size.setObjectName("Dialog_Size") 181 | self.GuiSelection = QtWidgets.QGroupBox(self.tab_size_pref) 182 | self.GuiSelection.setGeometry(QtCore.QRect(400, 0, 201, 91)) 183 | self.GuiSelection.setObjectName("GuiSelection") 184 | self.Button_NewGui = QtWidgets.QRadioButton(self.GuiSelection) 185 | self.Button_NewGui.setGeometry(QtCore.QRect(10, 60, 181, 20)) 186 | self.Button_NewGui.setChecked(True) 187 | self.Button_NewGui.setObjectName("Button_NewGui") 188 | self.Button_OldGui = QtWidgets.QRadioButton(self.GuiSelection) 189 | self.Button_OldGui.setGeometry(QtCore.QRect(10, 30, 171, 20)) 190 | self.Button_OldGui.setObjectName("Button_OldGui") 191 | self.Tab_Selection = QtWidgets.QGroupBox(self.tab_size_pref) 192 | self.Tab_Selection.setGeometry(QtCore.QRect(400, 90, 201, 91)) 193 | self.Tab_Selection.setObjectName("Tab_Selection") 194 | self.Tab_StandardConverter = QtWidgets.QRadioButton(self.Tab_Selection) 195 | self.Tab_StandardConverter.setGeometry(QtCore.QRect(10, 30, 181, 20)) 196 | self.Tab_StandardConverter.setChecked(True) 197 | self.Tab_StandardConverter.setObjectName("Tab_StandardConverter") 198 | self.Tab_ManualConverter = QtWidgets.QRadioButton(self.Tab_Selection) 199 | self.Tab_ManualConverter.setGeometry(QtCore.QRect(10, 60, 171, 20)) 200 | self.Tab_ManualConverter.setObjectName("Tab_ManualConverter") 201 | self.BatchMode = QtWidgets.QGroupBox(self.tab_size_pref) 202 | self.BatchMode.setGeometry(QtCore.QRect(210, 0, 181, 91)) 203 | self.BatchMode.setObjectName("BatchMode") 204 | self.Hide_Batch = QtWidgets.QCheckBox(self.BatchMode) 205 | self.Hide_Batch.setGeometry(QtCore.QRect(0, 30, 191, 20)) 206 | self.Hide_Batch.setObjectName("Hide_Batch") 207 | self.BufferSaveName = QtWidgets.QLineEdit(self.tab_size_pref) 208 | self.BufferSaveName.setGeometry(QtCore.QRect(180, 240, 201, 21)) 209 | self.BufferSaveName.setObjectName("BufferSaveName") 210 | self.label = QtWidgets.QLabel(self.tab_size_pref) 211 | self.label.setGeometry(QtCore.QRect(12, 209, 161, 21)) 212 | self.label.setObjectName("label") 213 | self.label_2 = QtWidgets.QLabel(self.tab_size_pref) 214 | self.label_2.setGeometry(QtCore.QRect(12, 240, 161, 21)) 215 | self.label_2.setObjectName("label_2") 216 | self.BufferSaveSuffix = QtWidgets.QLineEdit(self.tab_size_pref) 217 | self.BufferSaveSuffix.setGeometry(QtCore.QRect(180, 209, 201, 21)) 218 | self.BufferSaveSuffix.setObjectName("BufferSaveSuffix") 219 | self.tabWidget.addTab(self.tab_size_pref, "") 220 | 221 | self.retranslateUi(DialogPreferences) 222 | self.tabWidget.setCurrentIndex(0) 223 | self.comboBoxLanguageSelector.setCurrentIndex(-1) 224 | QtCore.QMetaObject.connectSlotsByName(DialogPreferences) 225 | 226 | def retranslateUi(self, DialogPreferences): 227 | _translate = QtCore.QCoreApplication.translate 228 | DialogPreferences.setWindowTitle(_translate("DialogPreferences", "Preferences")) 229 | self.tab_standard_pref.setAccessibleName(_translate("DialogPreferences", "General Preferences")) 230 | self.groupBox.setTitle(_translate("DialogPreferences", "Manual Converter Defaults")) 231 | self.XtraParameter.setPlaceholderText(_translate("DialogPreferences", "-o filename.odt")) 232 | self.FromParameter.setPlaceholderText(_translate("DialogPreferences", "markdown")) 233 | self.ToParameter.setPlaceholderText(_translate("DialogPreferences", "odt")) 234 | self.label_FromParameter.setText(_translate("DialogPreferences", "From")) 235 | self.label_ToParameter.setText(_translate("DialogPreferences", "To")) 236 | self.label_Parameter.setText(_translate("DialogPreferences", "Parameter")) 237 | self.BoxToFormat.setTitle(_translate("DialogPreferences", "Default To")) 238 | self.ButtonToHtml.setText(_translate("DialogPreferences", "HTML")) 239 | self.ButtonToLatex.setText(_translate("DialogPreferences", "Latex")) 240 | self.ButtonToMarkdown.setText(_translate("DialogPreferences", "Markdown")) 241 | self.ButtonToOpml.setText(_translate("DialogPreferences", "Opml")) 242 | self.ButtonToLyx.setText(_translate("DialogPreferences", "Lyx")) 243 | self.ButtonToEpub.setText(_translate("DialogPreferences", "EPub")) 244 | self.ButtonPandocPath.setText(_translate("DialogPreferences", "...")) 245 | self.Pandoc_Path.setPlaceholderText(_translate("DialogPreferences", "/usr/local/bin/pandoc")) 246 | self.Markdown_Path.setPlaceholderText(_translate("DialogPreferences", "/usr/local/bin/multimarkdown")) 247 | self.Dialog_Path.setPlaceholderText(_translate("DialogPreferences", "/Users")) 248 | self.BoxFromFormat.setTitle(_translate("DialogPreferences", "Default From")) 249 | self.ButtonFromHtml.setText(_translate("DialogPreferences", "HTML")) 250 | self.ButtonFromLatex.setText(_translate("DialogPreferences", "Latex")) 251 | self.ButtonFromMarkdown.setText(_translate("DialogPreferences", "Markdown")) 252 | self.ButtonFromOpml.setText(_translate("DialogPreferences", "Opml")) 253 | self.ButtonSave.setText(_translate("DialogPreferences", "Save")) 254 | self.ButtonCancel.setText(_translate("DialogPreferences", "Cancel")) 255 | self.StandardConversion.setText(_translate("DialogPreferences", "Standard Conversion")) 256 | self.BatchConversion.setText(_translate("DialogPreferences", "Batch Conversion")) 257 | self.label_LanguageSelector.setText(_translate("DialogPreferences", "Language Selector")) 258 | self.ButtonOpenSavePath.setText(_translate("DialogPreferences", "...")) 259 | self.ButtonMarkdownPath.setText(_translate("DialogPreferences", "...")) 260 | self.label_Pandoc_Path.setText(_translate("DialogPreferences", "Path to Pandoc Binary")) 261 | self.label_Markdown_Path.setText(_translate("DialogPreferences", "Path to Markdown Binary")) 262 | self.label_Dialog_Path.setText(_translate("DialogPreferences", "Open / Save - Path")) 263 | self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_standard_pref), _translate("DialogPreferences", "General Preferences")) 264 | self.ButtonSave_2.setText(_translate("DialogPreferences", "Save")) 265 | self.ButtonCancel_2.setText(_translate("DialogPreferences", "Cancel")) 266 | self.BoxSaveSize.setTitle(_translate("DialogPreferences", "Save Size")) 267 | self.Window_Size.setText(_translate("DialogPreferences", "Size of Main Window")) 268 | self.Dock_Size.setText(_translate("DialogPreferences", "Size of Dock Window")) 269 | self.Dialog_Size.setText(_translate("DialogPreferences", "Size of Dialog Window")) 270 | self.GuiSelection.setTitle(_translate("DialogPreferences", "Gui Selection")) 271 | self.Button_NewGui.setText(_translate("DialogPreferences", "New Style Gui")) 272 | self.Button_OldGui.setText(_translate("DialogPreferences", "Old Style Gui")) 273 | self.Tab_Selection.setTitle(_translate("DialogPreferences", "Tab Selection")) 274 | self.Tab_StandardConverter.setText(_translate("DialogPreferences", "Standard Converter")) 275 | self.Tab_ManualConverter.setText(_translate("DialogPreferences", "Manual Converter")) 276 | self.BatchMode.setTitle(_translate("DialogPreferences", "Batch Mode")) 277 | self.Hide_Batch.setText(_translate("DialogPreferences", "Hide Batch Mode")) 278 | self.label.setText(_translate("DialogPreferences", "Buffer Save Suffix")) 279 | self.label_2.setText(_translate("DialogPreferences", "Buffer Save Name")) 280 | self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_size_pref), _translate("DialogPreferences", "Extra Preferences")) 281 | -------------------------------------------------------------------------------- /source/gui/panconvert_diag_prefpane.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | DialogPreferences 4 | 5 | 6 | 7 | 0 8 | 0 9 | 630 10 | 380 11 | 12 | 13 | 14 | 15 | 630 16 | 380 17 | 18 | 19 | 20 | 21 | 630 22 | 380 23 | 24 | 25 | 26 | Preferences 27 | 28 | 29 | 30 | 31 | 10 32 | 20 33 | 611 34 | 361 35 | 36 | 37 | 38 | QTabWidget::Triangular 39 | 40 | 41 | 0 42 | 43 | 44 | 45 | Qt::TabFocus 46 | 47 | 48 | General Preferences 49 | 50 | 51 | General Preferences 52 | 53 | 54 | 55 | 56 | 350 57 | 130 58 | 231 59 | 141 60 | 61 | 62 | 63 | Manual Converter Defaults 64 | 65 | 66 | 67 | 68 | 80 69 | 100 70 | 113 71 | 21 72 | 73 | 74 | 75 | -o filename.odt 76 | 77 | 78 | 79 | 80 | 81 | 80 82 | 40 83 | 113 84 | 21 85 | 86 | 87 | 88 | markdown 89 | 90 | 91 | 92 | 93 | 94 | 80 95 | 70 96 | 113 97 | 21 98 | 99 | 100 | 101 | odt 102 | 103 | 104 | 105 | 106 | 107 | 10 108 | 40 109 | 41 110 | 16 111 | 112 | 113 | 114 | From 115 | 116 | 117 | 118 | 119 | 120 | 10 121 | 70 122 | 31 123 | 16 124 | 125 | 126 | 127 | To 128 | 129 | 130 | 131 | 132 | 133 | 10 134 | 100 135 | 62 136 | 16 137 | 138 | 139 | 140 | Parameter 141 | 142 | 143 | 144 | 145 | 146 | 147 | 190 148 | 130 149 | 111 150 | 141 151 | 152 | 153 | 154 | Default To 155 | 156 | 157 | 158 | 159 | 10 160 | 40 161 | 102 162 | 20 163 | 164 | 165 | 166 | HTML 167 | 168 | 169 | false 170 | 171 | 172 | 173 | 174 | 175 | 10 176 | 60 177 | 102 178 | 20 179 | 180 | 181 | 182 | Latex 183 | 184 | 185 | 186 | 187 | 188 | 10 189 | 80 190 | 102 191 | 20 192 | 193 | 194 | 195 | Markdown 196 | 197 | 198 | 199 | 200 | 201 | 10 202 | 100 203 | 102 204 | 20 205 | 206 | 207 | 208 | Opml 209 | 210 | 211 | 212 | 213 | 214 | 10 215 | 120 216 | 102 217 | 20 218 | 219 | 220 | 221 | Lyx 222 | 223 | 224 | 225 | 226 | 227 | 10 228 | 20 229 | 102 230 | 20 231 | 232 | 233 | 234 | EPub 235 | 236 | 237 | true 238 | 239 | 240 | 241 | 242 | 243 | 244 | 170 245 | 0 246 | 27 247 | 23 248 | 249 | 250 | 251 | ... 252 | 253 | 254 | 255 | 256 | 257 | 200 258 | 0 259 | 381 260 | 85 261 | 262 | 263 | 264 | 265 | 266 | 267 | 268 | 269 | 270 | /usr/local/bin/pandoc 271 | 272 | 273 | 274 | 275 | 276 | 277 | 278 | 279 | 280 | /usr/local/bin/multimarkdown 281 | 282 | 283 | 284 | 285 | 286 | 287 | /Users 288 | 289 | 290 | 291 | 292 | 293 | 294 | 295 | 296 | 20 297 | 130 298 | 131 299 | 121 300 | 301 | 302 | 303 | Default From 304 | 305 | 306 | 307 | 308 | 20 309 | 30 310 | 102 311 | 20 312 | 313 | 314 | 315 | HTML 316 | 317 | 318 | 319 | 320 | 321 | 20 322 | 50 323 | 102 324 | 20 325 | 326 | 327 | 328 | Latex 329 | 330 | 331 | 332 | 333 | 334 | 20 335 | 70 336 | 102 337 | 20 338 | 339 | 340 | 341 | Markdown 342 | 343 | 344 | true 345 | 346 | 347 | 348 | 349 | 350 | 20 351 | 90 352 | 102 353 | 20 354 | 355 | 356 | 357 | Opml 358 | 359 | 360 | 361 | 362 | 363 | 364 | 20 365 | 280 366 | 561 367 | 32 368 | 369 | 370 | 371 | 372 | 373 | 374 | Save 375 | 376 | 377 | 378 | 379 | 380 | 381 | Cancel 382 | 383 | 384 | 385 | 386 | 387 | 388 | Standard Conversion 389 | 390 | 391 | true 392 | 393 | 394 | 395 | 396 | 397 | 398 | Batch Conversion 399 | 400 | 401 | 402 | 403 | 404 | 405 | 406 | 407 | 0 408 | 100 409 | 161 410 | 21 411 | 412 | 413 | 414 | Language Selector 415 | 416 | 417 | 418 | 419 | 420 | 170 421 | 60 422 | 27 423 | 23 424 | 425 | 426 | 427 | ... 428 | 429 | 430 | 431 | 432 | 433 | 170 434 | 30 435 | 27 436 | 23 437 | 438 | 439 | 440 | ... 441 | 442 | 443 | 444 | 445 | 446 | 0 447 | 0 448 | 159 449 | 81 450 | 451 | 452 | 453 | 454 | 455 | 456 | Path to Pandoc Binary 457 | 458 | 459 | 460 | 461 | 462 | 463 | 464 | 0 465 | 0 466 | 467 | 468 | 469 | Path to Markdown Binary 470 | 471 | 472 | 473 | 474 | 475 | 476 | Open / Save - Path 477 | 478 | 479 | 480 | 481 | 482 | 483 | 484 | 485 | 200 486 | 100 487 | 381 488 | 26 489 | 490 | 491 | 492 | false 493 | 494 | 495 | 496 | 497 | 498 | -1 499 | 500 | 501 | 502 | 503 | 504 | Extra Preferences 505 | 506 | 507 | 508 | 509 | 10 510 | 290 511 | 131 512 | 32 513 | 514 | 515 | 516 | Save 517 | 518 | 519 | 520 | 521 | 522 | 150 523 | 290 524 | 130 525 | 32 526 | 527 | 528 | 529 | Cancel 530 | 531 | 532 | 533 | 534 | 535 | 400 536 | 190 537 | 201 538 | 141 539 | 540 | 541 | 542 | Save Size 543 | 544 | 545 | 546 | 547 | 10 548 | 40 549 | 191 550 | 20 551 | 552 | 553 | 554 | 555 | 556 | 557 | Size of Main Window 558 | 559 | 560 | 561 | 562 | 563 | 10 564 | 70 565 | 181 566 | 20 567 | 568 | 569 | 570 | Size of Dock Window 571 | 572 | 573 | 574 | 575 | 576 | 10 577 | 100 578 | 181 579 | 20 580 | 581 | 582 | 583 | Size of Dialog Window 584 | 585 | 586 | 587 | 588 | 589 | 590 | 400 591 | 0 592 | 201 593 | 91 594 | 595 | 596 | 597 | Gui Selection 598 | 599 | 600 | 601 | 602 | 10 603 | 60 604 | 181 605 | 20 606 | 607 | 608 | 609 | New Style Gui 610 | 611 | 612 | true 613 | 614 | 615 | 616 | 617 | 618 | 10 619 | 30 620 | 171 621 | 20 622 | 623 | 624 | 625 | Old Style Gui 626 | 627 | 628 | 629 | 630 | 631 | 632 | 400 633 | 90 634 | 201 635 | 91 636 | 637 | 638 | 639 | Tab Selection 640 | 641 | 642 | 643 | 644 | 10 645 | 30 646 | 181 647 | 20 648 | 649 | 650 | 651 | Standard Converter 652 | 653 | 654 | true 655 | 656 | 657 | 658 | 659 | 660 | 10 661 | 60 662 | 171 663 | 20 664 | 665 | 666 | 667 | Manual Converter 668 | 669 | 670 | 671 | 672 | 673 | 674 | 210 675 | 0 676 | 181 677 | 91 678 | 679 | 680 | 681 | Batch Mode 682 | 683 | 684 | 685 | 686 | 0 687 | 30 688 | 191 689 | 20 690 | 691 | 692 | 693 | Hide Batch Mode 694 | 695 | 696 | 697 | 698 | 699 | 700 | 180 701 | 240 702 | 201 703 | 21 704 | 705 | 706 | 707 | 708 | 709 | 710 | 12 711 | 209 712 | 161 713 | 21 714 | 715 | 716 | 717 | Buffer Save Suffix 718 | 719 | 720 | 721 | 722 | 723 | 12 724 | 240 725 | 161 726 | 21 727 | 728 | 729 | 730 | Buffer Save Name 731 | 732 | 733 | 734 | 735 | 736 | 180 737 | 209 738 | 201 739 | 21 740 | 741 | 742 | 743 | 744 | 745 | 746 | 747 | 748 | 749 | -------------------------------------------------------------------------------- /source/gui/panconvert_diag_toformat.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | # Form implementation generated from reading ui file 'source/gui/panconvert_diag_toformat.ui' 4 | # 5 | # Created by: PyQt5 UI code generator 5.11.3 6 | # 7 | # WARNING! All changes made in this file will be lost! 8 | 9 | from PyQt5 import QtCore, QtGui, QtWidgets 10 | 11 | class Ui_To_Format_Dialog(object): 12 | def setupUi(self, To_Format_Dialog): 13 | To_Format_Dialog.setObjectName("To_Format_Dialog") 14 | To_Format_Dialog.setWindowModality(QtCore.Qt.NonModal) 15 | To_Format_Dialog.setEnabled(True) 16 | To_Format_Dialog.resize(334, 402) 17 | sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.MinimumExpanding) 18 | sizePolicy.setHorizontalStretch(1) 19 | sizePolicy.setVerticalStretch(1) 20 | sizePolicy.setHeightForWidth(To_Format_Dialog.sizePolicy().hasHeightForWidth()) 21 | To_Format_Dialog.setSizePolicy(sizePolicy) 22 | To_Format_Dialog.setMinimumSize(QtCore.QSize(224, 234)) 23 | To_Format_Dialog.setSizeGripEnabled(False) 24 | To_Format_Dialog.setModal(False) 25 | self.gridLayout = QtWidgets.QGridLayout(To_Format_Dialog) 26 | self.gridLayout.setSizeConstraint(QtWidgets.QLayout.SetNoConstraint) 27 | self.gridLayout.setObjectName("gridLayout") 28 | self.verticalLayout = QtWidgets.QVBoxLayout() 29 | self.verticalLayout.setObjectName("verticalLayout") 30 | self.ButtonCancel = QtWidgets.QPushButton(To_Format_Dialog) 31 | self.ButtonCancel.setObjectName("ButtonCancel") 32 | self.verticalLayout.addWidget(self.ButtonCancel) 33 | self.gridLayout.addLayout(self.verticalLayout, 1, 0, 1, 1) 34 | self.textBrowser = QtWebEngineWidgets.QWebEngineView(To_Format_Dialog) 35 | self.textBrowser.setMinimumSize(QtCore.QSize(200, 100)) 36 | self.textBrowser.setObjectName("textBrowser") 37 | self.gridLayout.addWidget(self.textBrowser, 0, 0, 1, 1) 38 | 39 | self.retranslateUi(To_Format_Dialog) 40 | QtCore.QMetaObject.connectSlotsByName(To_Format_Dialog) 41 | 42 | def retranslateUi(self, To_Format_Dialog): 43 | _translate = QtCore.QCoreApplication.translate 44 | To_Format_Dialog.setWindowTitle(_translate("To_Format_Dialog", "Pandoc To Formats")) 45 | self.ButtonCancel.setText(_translate("To_Format_Dialog", "Cancel")) 46 | 47 | from PyQt5 import QtWebEngineWidgets 48 | -------------------------------------------------------------------------------- /source/gui/panconvert_diag_toformat.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | To_Format_Dialog 4 | 5 | 6 | Qt::NonModal 7 | 8 | 9 | true 10 | 11 | 12 | 13 | 0 14 | 0 15 | 334 16 | 402 17 | 18 | 19 | 20 | 21 | 1 22 | 1 23 | 24 | 25 | 26 | 27 | 224 28 | 234 29 | 30 | 31 | 32 | Pandoc To Formats 33 | 34 | 35 | false 36 | 37 | 38 | false 39 | 40 | 41 | 42 | QLayout::SetNoConstraint 43 | 44 | 45 | 46 | 47 | 48 | 49 | Cancel 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 200 60 | 100 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | QWebEngineView 70 | QWidget 71 |
QtWebEngineWidgets/QWebEngineView
72 | 1 73 |
74 |
75 | 76 | 77 |
78 | -------------------------------------------------------------------------------- /source/gui/panconvert_dialog_batch.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | # Form implementation generated from reading ui file 'panconvert_dialog_batch.ui' 4 | # 5 | # Created: Thu Feb 23 12:47:05 2017 6 | # by: PyQt5 UI code generator 5.3.2 7 | # 8 | # WARNING! All changes made in this file will be lost! 9 | 10 | from PyQt5 import QtCore, QtGui, QtWidgets 11 | 12 | class Ui_DialogBatch(object): 13 | def setupUi(self, DialogBatch): 14 | DialogBatch.setObjectName("DialogBatch") 15 | DialogBatch.resize(386, 250) 16 | sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) 17 | sizePolicy.setHorizontalStretch(0) 18 | sizePolicy.setVerticalStretch(0) 19 | sizePolicy.setHeightForWidth(DialogBatch.sizePolicy().hasHeightForWidth()) 20 | DialogBatch.setSizePolicy(sizePolicy) 21 | DialogBatch.setMinimumSize(QtCore.QSize(386, 250)) 22 | DialogBatch.setMaximumSize(QtCore.QSize(386, 250)) 23 | self.ButtonSave = QtWidgets.QPushButton(DialogBatch) 24 | self.ButtonSave.setGeometry(QtCore.QRect(250, 200, 114, 32)) 25 | self.ButtonSave.setObjectName("ButtonSave") 26 | self.ButtonCancel = QtWidgets.QPushButton(DialogBatch) 27 | self.ButtonCancel.setGeometry(QtCore.QRect(250, 160, 114, 32)) 28 | sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) 29 | sizePolicy.setHorizontalStretch(0) 30 | sizePolicy.setVerticalStretch(0) 31 | sizePolicy.setHeightForWidth(self.ButtonCancel.sizePolicy().hasHeightForWidth()) 32 | self.ButtonCancel.setSizePolicy(sizePolicy) 33 | self.ButtonCancel.setMinimumSize(QtCore.QSize(114, 32)) 34 | self.ButtonCancel.setMaximumSize(QtCore.QSize(114, 32)) 35 | self.ButtonCancel.setBaseSize(QtCore.QSize(114, 32)) 36 | self.ButtonCancel.setObjectName("ButtonCancel") 37 | self.Filter = QtWidgets.QLineEdit(DialogBatch) 38 | self.Filter.setGeometry(QtCore.QRect(10, 100, 350, 21)) 39 | self.Filter.setObjectName("Filter") 40 | self.groupBox = QtWidgets.QGroupBox(DialogBatch) 41 | self.groupBox.setGeometry(QtCore.QRect(20, 130, 200, 100)) 42 | self.groupBox.setMinimumSize(QtCore.QSize(200, 100)) 43 | self.groupBox.setMaximumSize(QtCore.QSize(200, 100)) 44 | self.groupBox.setObjectName("groupBox") 45 | self.gridLayout_2 = QtWidgets.QGridLayout(self.groupBox) 46 | self.gridLayout_2.setObjectName("gridLayout_2") 47 | self.ParameterBatchconvertRecursive = QtWidgets.QCheckBox(self.groupBox) 48 | self.ParameterBatchconvertRecursive.setChecked(True) 49 | self.ParameterBatchconvertRecursive.setObjectName("ParameterBatchconvertRecursive") 50 | self.gridLayout_2.addWidget(self.ParameterBatchconvertRecursive, 3, 0, 1, 1) 51 | self.ParameterBatchconvertDirectory = QtWidgets.QRadioButton(self.groupBox) 52 | self.ParameterBatchconvertDirectory.setChecked(True) 53 | self.ParameterBatchconvertDirectory.setObjectName("ParameterBatchconvertDirectory") 54 | self.gridLayout_2.addWidget(self.ParameterBatchconvertDirectory, 2, 0, 1, 1) 55 | self.ParameterBatchconvertFiles = QtWidgets.QRadioButton(self.groupBox) 56 | self.ParameterBatchconvertFiles.setObjectName("ParameterBatchconvertFiles") 57 | self.gridLayout_2.addWidget(self.ParameterBatchconvertFiles, 1, 0, 1, 1) 58 | self.widget = QtWidgets.QWidget(DialogBatch) 59 | self.widget.setGeometry(QtCore.QRect(10, 12, 27, 54)) 60 | self.widget.setObjectName("widget") 61 | self.verticalLayout = QtWidgets.QVBoxLayout(self.widget) 62 | self.verticalLayout.setContentsMargins(0, 0, 0, 0) 63 | self.verticalLayout.setObjectName("verticalLayout") 64 | self.Button_Open_Path = QtWidgets.QToolButton(self.widget) 65 | self.Button_Open_Path.setMaximumSize(QtCore.QSize(25, 23)) 66 | self.Button_Open_Path.setObjectName("Button_Open_Path") 67 | self.verticalLayout.addWidget(self.Button_Open_Path) 68 | self.Button_Open_Path_Output = QtWidgets.QToolButton(self.widget) 69 | self.Button_Open_Path_Output.setMaximumSize(QtCore.QSize(25, 23)) 70 | self.Button_Open_Path_Output.setObjectName("Button_Open_Path_Output") 71 | self.verticalLayout.addWidget(self.Button_Open_Path_Output) 72 | self.widget1 = QtWidgets.QWidget(DialogBatch) 73 | self.widget1.setGeometry(QtCore.QRect(47, 12, 311, 54)) 74 | self.widget1.setObjectName("widget1") 75 | self.verticalLayout_2 = QtWidgets.QVBoxLayout(self.widget1) 76 | self.verticalLayout_2.setContentsMargins(0, 0, 0, 0) 77 | self.verticalLayout_2.setObjectName("verticalLayout_2") 78 | self.OpenPath = QtWidgets.QLineEdit(self.widget1) 79 | self.OpenPath.setObjectName("OpenPath") 80 | self.verticalLayout_2.addWidget(self.OpenPath) 81 | self.OpenPath_Output = QtWidgets.QLineEdit(self.widget1) 82 | self.OpenPath_Output.setObjectName("OpenPath_Output") 83 | self.verticalLayout_2.addWidget(self.OpenPath_Output) 84 | 85 | self.retranslateUi(DialogBatch) 86 | QtCore.QMetaObject.connectSlotsByName(DialogBatch) 87 | 88 | def retranslateUi(self, DialogBatch): 89 | _translate = QtCore.QCoreApplication.translate 90 | DialogBatch.setWindowTitle(_translate("DialogBatch", "Batch Preferences")) 91 | self.ButtonSave.setText(_translate("DialogBatch", "Save")) 92 | self.ButtonCancel.setText(_translate("DialogBatch", "Cancel")) 93 | self.Filter.setPlaceholderText(_translate("DialogBatch", "optional File Extension Filter (separate with ;)")) 94 | self.groupBox.setTitle(_translate("DialogBatch", "Conversion Mode")) 95 | self.ParameterBatchconvertRecursive.setText(_translate("DialogBatch", "Recursive")) 96 | self.ParameterBatchconvertDirectory.setText(_translate("DialogBatch", "Directory")) 97 | self.ParameterBatchconvertFiles.setText(_translate("DialogBatch", "Files")) 98 | self.Button_Open_Path.setText(_translate("DialogBatch", "...")) 99 | self.Button_Open_Path_Output.setText(_translate("DialogBatch", "...")) 100 | self.OpenPath.setPlaceholderText(_translate("DialogBatch", "Optional Directory Path")) 101 | self.OpenPath_Output.setPlaceholderText(_translate("DialogBatch", "Optional Directory Path")) 102 | 103 | -------------------------------------------------------------------------------- /source/gui/panconvert_dialog_batch.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | DialogBatch 4 | 5 | 6 | 7 | 0 8 | 0 9 | 386 10 | 250 11 | 12 | 13 | 14 | 15 | 0 16 | 0 17 | 18 | 19 | 20 | 21 | 386 22 | 250 23 | 24 | 25 | 26 | 27 | 386 28 | 250 29 | 30 | 31 | 32 | Batch Preferences 33 | 34 | 35 | 36 | 37 | 250 38 | 200 39 | 114 40 | 32 41 | 42 | 43 | 44 | Save 45 | 46 | 47 | 48 | 49 | 50 | 250 51 | 160 52 | 114 53 | 32 54 | 55 | 56 | 57 | 58 | 0 59 | 0 60 | 61 | 62 | 63 | 64 | 114 65 | 32 66 | 67 | 68 | 69 | 70 | 114 71 | 32 72 | 73 | 74 | 75 | 76 | 114 77 | 32 78 | 79 | 80 | 81 | Cancel 82 | 83 | 84 | 85 | 86 | 87 | 10 88 | 100 89 | 350 90 | 21 91 | 92 | 93 | 94 | optional File Extension Filter (separate with ;) 95 | 96 | 97 | 98 | 99 | 100 | 20 101 | 130 102 | 200 103 | 100 104 | 105 | 106 | 107 | 108 | 200 109 | 100 110 | 111 | 112 | 113 | 114 | 200 115 | 100 116 | 117 | 118 | 119 | Conversion Mode 120 | 121 | 122 | 123 | 124 | 125 | Recursive 126 | 127 | 128 | true 129 | 130 | 131 | 132 | 133 | 134 | 135 | Directory 136 | 137 | 138 | true 139 | 140 | 141 | 142 | 143 | 144 | 145 | Files 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 10 155 | 12 156 | 27 157 | 54 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 25 166 | 23 167 | 168 | 169 | 170 | ... 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 25 179 | 23 180 | 181 | 182 | 183 | ... 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 47 193 | 12 194 | 311 195 | 54 196 | 197 | 198 | 199 | 200 | 201 | 202 | Optional Directory Path 203 | 204 | 205 | 206 | 207 | 208 | 209 | Optional Directory Path 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | -------------------------------------------------------------------------------- /source/helpers/__init__.py: -------------------------------------------------------------------------------- 1 | __author__ = 'apaeffgen' 2 | # _*_ coding: utf-8 _*_ 3 | -------------------------------------------------------------------------------- /source/helpers/helper_functions.py: -------------------------------------------------------------------------------- 1 | #!/usr/local/bin/python3 2 | __author__ = 'apaeffgen' 3 | # -*- coding: utf-8 -*- 4 | 5 | # This file is part of Panconvert. 6 | # 7 | # Panconvert is free software: you can redistribute it and/or modify 8 | # it under the terms of the GNU General Public License as published by 9 | # the Free Software Foundation, either version 3 of the License, or 10 | # (at your option) any later version. 11 | # 12 | # Panconvert is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU General Public License 18 | # along with Panconvert. If not, see . 19 | 20 | 21 | from PyQt5.QtCore import QSettings 22 | from urllib.parse import urlparse, unquote 23 | #from source.main_gui import StartQT5 24 | 25 | global uri 26 | 27 | 28 | def convert_boolean(value): 29 | if str(value).lower() in ("yes", "y", "true", "t", "1"): return True 30 | if str(value).lower() in ("no", "n", "false", "f", "0", "0.0", "", "none", "[]", "{}"): return False 31 | 32 | def check_uri(): 33 | weburi = False 34 | try: 35 | if 'http://' in uri: 36 | weburi = True 37 | if 'www' in uri: 38 | weburi = True 39 | return weburi 40 | except: 41 | return 42 | 43 | def parse_uri(): 44 | if 'file://' in uri: 45 | file = unquote(uri)[7:] 46 | else: 47 | file = uri 48 | return file 49 | 50 | def normalize_uri(): 51 | global uri 52 | if 'http://' not in uri: 53 | normalized_uri = 'http://' + uri 54 | return normalized_uri 55 | 56 | 57 | 58 | 59 | 60 | -------------------------------------------------------------------------------- /source/helpers/interface_pandoc.py: -------------------------------------------------------------------------------- 1 | #!/usr/local/bin/python3 2 | __author__ = 'apaeffgen' 3 | # -*- coding: utf-8 -*- 4 | 5 | # This file is part of Panconvert. 6 | # 7 | # Panconvert is free software: you can redistribute it and/or modify 8 | # it under the terms of the GNU General Public License as published by 9 | # the Free Software Foundation, either version 3 of the License, or 10 | # (at your option) any later version. 11 | # 12 | # Panconvert is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU General Public License 18 | # along with Panconvert. If not, see . 19 | 20 | import os, shutil, io, sys 21 | from os import path 22 | import platform 23 | import subprocess 24 | from PyQt5.QtCore import QSettings 25 | from source.language.messages import * 26 | 27 | 28 | global fromFormat 29 | 30 | settings = QSettings('Pandoc', 'PanConvert') 31 | path_pandoc_tmp = settings.value('path_pandoc','') 32 | path_pandoc = str(path_pandoc_tmp) 33 | 34 | def get_path_pandoc(): 35 | 36 | settings = QSettings('Pandoc', 'PanConvert') 37 | path_pandoc_tmp = settings.value('path_pandoc','') 38 | path_pandoc = str(path_pandoc_tmp) 39 | 40 | if not os.path.isfile(path_pandoc): 41 | 42 | if platform.system() == 'Darwin' or os.name == 'posix': 43 | path_pandoc = which("pandoc") 44 | settings.setValue('path_pandoc', path_pandoc) 45 | settings.sync() 46 | else: 47 | path_pandoc = where("pandoc.exe") 48 | settings.setValue('path_pandoc', path_pandoc) 49 | settings.sync() 50 | 51 | 52 | def get_path_multimarkdown(): 53 | settings = QSettings('Pandoc', 'PanConvert') 54 | path_multimarkdown = settings.value('path_multimarkdown','') 55 | 56 | if getattr( sys, 'frozen', False ): 57 | if platform.system() == 'Darwin' or os.name == 'posix': 58 | path_multimarkdown = which("multimarkdown") 59 | settings.setValue('path_multimarkdown', path_multimarkdown) 60 | settings.sync() 61 | else: 62 | args = ['where', 'multimarkdown'] 63 | p = subprocess.Popen( 64 | args, 65 | stdin=subprocess.PIPE, 66 | stdout=subprocess.PIPE) 67 | 68 | path_multimarkdown = str.rstrip(p.communicate(path_multimarkdown.encode('utf-8'))[0].decode('utf-8')) 69 | settings.setValue('path_multimarkdown', path_multimarkdown) 70 | settings.sync() 71 | return path_multimarkdown 72 | else: 73 | 74 | if platform.system() == 'Darwin' or os.name == 'posix': 75 | args = ['which', 'multimarkdown'] 76 | p = subprocess.Popen( 77 | args, 78 | stdin=subprocess.PIPE, 79 | stdout=subprocess.PIPE) 80 | 81 | path_multimarkdown = str.rstrip(p.communicate(path_multimarkdown.encode('utf-8'))[0].decode('utf-8')) 82 | settings.setValue('path_multimarkdown', path_multimarkdown) 83 | settings.sync() 84 | return path_multimarkdown 85 | 86 | elif platform.system() == 'Windows': 87 | args = ['where', 'multimarkdown'] 88 | p = subprocess.Popen( 89 | args, 90 | stdin=subprocess.PIPE, 91 | stdout=subprocess.PIPE) 92 | 93 | path_multimarkdown = str.rstrip(p.communicate(path_multimarkdown.encode('utf-8'))[0].decode('utf-8')) 94 | settings.setValue('path_multimarkdown', path_multimarkdown) 95 | settings.sync() 96 | return path_multimarkdown 97 | 98 | 99 | def get_pandoc_version(): 100 | 101 | settings = QSettings('Pandoc', 'PanConvert') 102 | path_pandoc = settings.value('path_pandoc','') 103 | 104 | if os.path.isfile(path_pandoc): 105 | 106 | p = subprocess.Popen( 107 | [path_pandoc, '-v'], 108 | stdin=subprocess.PIPE, 109 | stdout=subprocess.PIPE) 110 | output = p.communicate()[0].decode().splitlines(False) 111 | versionstr = output[0] 112 | 113 | 114 | if platform.system() == 'Windows': 115 | version_tmp = versionstr.replace(".","") 116 | version = int(version_tmp[10:15]) 117 | else: 118 | version_tmp = versionstr.replace(".","") 119 | version = int(version_tmp[7:10]) 120 | 121 | return version 122 | 123 | 124 | 125 | def get_pandoc_formats(): 126 | """ 127 | Dynamic preprocessor for Pandoc formats. 128 | Return 2 lists. "from_formats" and "to_formats". 129 | """ 130 | settings = QSettings('Pandoc', 'PanConvert') 131 | path_pandoc = settings.value('path_pandoc','') 132 | 133 | if os.path.isfile(path_pandoc): 134 | 135 | version = get_pandoc_version() 136 | 137 | if version < 118: 138 | 139 | p = subprocess.Popen( 140 | [path_pandoc, '-h'], 141 | stdin=subprocess.PIPE, 142 | stdout=subprocess.PIPE) 143 | help_text = p.communicate()[0].decode().splitlines(False) 144 | txt = ' '.join(help_text[1:help_text.index('Options:')]) 145 | 146 | 147 | aux = txt.split('Output formats: ') 148 | in_ = aux[0].split('Input formats: ')[1].split(',') 149 | out = aux[1].split(',') 150 | 151 | return [f.strip() for f in in_], [f.strip() for f in out] 152 | 153 | 154 | else: 155 | 156 | p = subprocess.Popen( 157 | [path_pandoc, '--list-input-formats'], 158 | stdin=subprocess.PIPE, 159 | stdout=subprocess.PIPE) 160 | inputformats = p.communicate()[0].decode().splitlines(False) 161 | 162 | 163 | p = subprocess.Popen( 164 | [path_pandoc, '--list-output-formats'], 165 | stdin=subprocess.PIPE, 166 | stdout=subprocess.PIPE) 167 | outputformats = p.communicate()[0].decode().splitlines(False) 168 | 169 | in_ = inputformats 170 | out = outputformats 171 | 172 | return [f.strip() for f in in_], [f.strip() for f in out] 173 | 174 | 175 | else: 176 | path_pandoc = get_path_pandoc() 177 | path_pandoc = settings.value('path_pandoc','') 178 | if not os.path.isfile(path_pandoc): 179 | message = error_converter_path() 180 | return message 181 | 182 | 183 | def get_pandoc_options(): 184 | """ 185 | Get the Options of the Pandoc help section 186 | """ 187 | settings = QSettings('Pandoc', 'PanConvert') 188 | path_pandoc = settings.value('path_pandoc','') 189 | if os.path.isfile(path_pandoc): 190 | 191 | version = get_pandoc_version() 192 | 193 | if version < 1.18: 194 | 195 | p = subprocess.Popen( 196 | [path_pandoc, '-h'], 197 | stdin=subprocess.PIPE, 198 | stdout=subprocess.PIPE) 199 | help_text = p.communicate()[0].decode().splitlines(True) 200 | 201 | 202 | aux = help_text[15:89] 203 | 204 | return aux 205 | 206 | 207 | else: 208 | 209 | p = subprocess.Popen( 210 | [path_pandoc, '-h'], 211 | stdin=subprocess.PIPE, 212 | stdout=subprocess.PIPE) 213 | help_text = p.communicate()[0].decode().splitlines(True) 214 | aux = help_text 215 | 216 | return aux 217 | 218 | else: 219 | path_pandoc = get_path_pandoc() 220 | path_pandoc = settings.value('path_pandoc','') 221 | if not os.path.isfile(path_pandoc): 222 | message = error_converter_path() 223 | return message 224 | 225 | def which(target): 226 | pathlist_tmp = '/Applications/Panconvert:~/Panconvert:/opt/Panconvert:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:' 227 | pathlist = pathlist_tmp.split(":") 228 | for p in pathlist: 229 | fullpath = p + "/" + target 230 | if os.path.isfile(fullpath) and os.access(fullpath, os.X_OK): 231 | path_pandoc = fullpath 232 | 233 | return path_pandoc 234 | 235 | def where(target): 236 | pathlist_tmp = 'C:\Program Files\Pandoc\:' 237 | pathlist = pathlist_tmp.split(":") 238 | for p in pathlist: 239 | fullpath = p + "\\" + target 240 | if os.path.isfile(fullpath) and os.access(fullpath, os.X_OK): 241 | path_pandoc = fullpath 242 | 243 | return path_pandoc 244 | 245 | 246 | 247 | -------------------------------------------------------------------------------- /source/language/Panconvert_de.qm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apaeffgen/PanConvert/2f87ba7980e1fd66e5330db22d4c73b649d90bda/source/language/Panconvert_de.qm -------------------------------------------------------------------------------- /source/language/Panconvert_es.qm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apaeffgen/PanConvert/2f87ba7980e1fd66e5330db22d4c73b649d90bda/source/language/Panconvert_es.qm -------------------------------------------------------------------------------- /source/language/Panconvert_fr.qm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apaeffgen/PanConvert/2f87ba7980e1fd66e5330db22d4c73b649d90bda/source/language/Panconvert_fr.qm -------------------------------------------------------------------------------- /source/language/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apaeffgen/PanConvert/2f87ba7980e1fd66e5330db22d4c73b649d90bda/source/language/__init__.py -------------------------------------------------------------------------------- /source/language/messages.py: -------------------------------------------------------------------------------- 1 | #!/usr/local/bin/python3 2 | __author__ = 'apaeffgen' 3 | # -*- coding: utf-8 -*- 4 | 5 | # This file is part of Panconvert. 6 | # 7 | # Panconvert is free software: you can redistribute it and/or modify 8 | # it under the terms of the GNU General Public License as published by 9 | # the Free Software Foundation, either version 3 of the License, or 10 | # (at your option) any later version. 11 | # 12 | # Panconvert is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU General Public License 18 | # along with Panconvert. If not, see . 19 | 20 | from PyQt5 import QtCore, QtGui, QtWidgets 21 | import datetime 22 | from source.dialogs.dialog_preferences import * 23 | import os 24 | 25 | settings = QSettings('Pandoc', 'PanConvert') 26 | path_pandoc = settings.value('path_pandoc','') 27 | 28 | _translate = QtCore.QCoreApplication.translate 29 | 30 | versionnumber = '0.2.9' 31 | versiondate = '11.2023' 32 | versionname = 'PanConvert - A Gui Wrapper for Pandoc' 33 | copyrightinfo = 'Copyright by APaeffgen' 34 | 35 | 36 | 37 | def version(): 38 | versiontext = versionname + '
' + 'Version ' + versionnumber + ' on ' + versiondate + '
' + copyrightinfo 39 | return versiontext 40 | 41 | def timestamp(): 42 | timestamp = datetime.datetime.now().strftime("%d-%m-%Y %H:%M:%S") 43 | return timestamp 44 | 45 | 46 | 47 | 48 | '''' Messages in the Log Viewer''''' 49 | 50 | def message_file_selection(): 51 | time = timestamp() 52 | file_selection_message = _translate('message', 'The following file selection was made: ') 53 | message = time + '\n' + file_selection_message + '\n' 54 | return message 55 | 56 | def error_buffer_name(): 57 | time = timestamp() 58 | buffer_name_error = _translate('message', 'To use this function, you have to fill in '\ 59 | 'BufferSaveName and BufferSaveSuffix in the Preference Dialog.') 60 | message = time + '\n' + buffer_name_error + '\n' 61 | return message 62 | 63 | def error_formats(): 64 | warning_fromFormat = _translate('message', 'Invalid from format! Expected one of these: ') 65 | warning_toFormat = _translate('message', 'Invalid to format! Expected one of these: ') 66 | 67 | return warning_fromFormat, warning_toFormat 68 | 69 | def error_file_selection(): 70 | time = timestamp() 71 | file_selection_error = _translate('message', 'No file has been selected. Check your Filters and settings.'\ 72 | 'Check your files.') 73 | message = time + '\n' + file_selection_error + '\n' 74 | return message 75 | 76 | 77 | def error_converter_path(): 78 | time = timestamp() 79 | converter_error = _translate('message', 'No Converter (Pandoc or Multimardown) could be found on your System. Are they installed?' \ 80 | 'If so, please check the Pandoc / Multimarkdown Path in your Preferences.') 81 | QString = converter_error 82 | message = time + '\n' + converter_error + '\n' 83 | return message 84 | 85 | def error_os_detection(): 86 | time = timestamp() 87 | os_detection_error = _translate('message', 'Could not detect a Converter. Please fill in the Path' \ 88 | ' to Pandoc or Multimarkdown manually via Preferences.') 89 | message = time + '\n' + os_detection_error + '\n' 90 | return message 91 | 92 | def error_open_file(): 93 | open_file_error = _translate('message', 'No Preview of the File-Data possible. Try to manually convert. Good Luck.') 94 | QString = open_file_error 95 | message = open_file_error 96 | 97 | return message 98 | 99 | def error_no_input(): 100 | time = timestamp() 101 | no_input_error = (_translate('message', 'You have no Data to be converted. Please make an input')) 102 | QString = no_input_error 103 | message = time + '\n' + no_input_error + '\n' 104 | 105 | return message 106 | 107 | def error_no_file(): 108 | time = timestamp() 109 | no_file_error = _translate('message', 'You have to open at least one file in file conversion mode.'\ 110 | '
Did you put in from / to - formats?'\ 111 | '
If you are in directory mode, did you specify a directory?'\ 112 | '
Check your settings.') 113 | QString = no_file_error 114 | message = time + '\n' + no_file_error + '\n' 115 | return message 116 | 117 | 118 | 119 | def error_binary_file(): 120 | time = timestamp() 121 | binary_file_error = _translate('message', 'The Standard Converter can not handle binary files. If it is a docx-file, try the '\ 122 | 'Manual Converter. ') 123 | QString = binary_file_error 124 | message = time + '\n' + binary_file_error + '\n' 125 | return message 126 | 127 | 128 | def error_equal_formats(): 129 | time = timestamp() 130 | equal_format_error = _translate('message', 'The from-Format and to-Format should not be identical.

'\ 131 | 'If you picked to-Lyx, only from-markdown is a valid option.

'\ 132 | 'Please make a different choice.') 133 | QString = equal_format_error 134 | message = time + '\n' + equal_format_error + '\n' 135 | return message 136 | 137 | def error_empty_formats(): 138 | time = timestamp() 139 | empty_format_error = _translate('message', 'If you fill in Arguments and uncheck the Box "Standard", you have to '\ 140 | 'provide at least the following Parameters: From, To.

'\ 141 | ' Some Formats like odt, epub need an input '\ 142 | 'for "Parameter". Otherwise there will be no output at all') 143 | QString = empty_format_error 144 | message = time + '\n' + empty_format_error + '\n' 145 | return message 146 | 147 | def error_unknown(): 148 | time = timestamp() 149 | unknown_error = _translate('message', 'If you can read this message, something went wrong. Get some help at ' \ 150 | 'http://panconvert.sourceforge.net/help') 151 | QString = unknown_error 152 | message = time + '\n' + unknown_error + '\n' 153 | return unknown_error 154 | 155 | 156 | def error_no_output(): 157 | time = timestamp() 158 | output_error = (_translate('message', 'There had been no output. Did you use the --output option to write a file?' \ 159 | '\nIf so, check your filesystem in the folder where Pandoc is installed')) 160 | QString = output_error 161 | message = time + '\n' + output_error + '\n' 162 | return message 163 | 164 | def error_no_preview(): 165 | time = timestamp() 166 | no_preview = _translate('message', 'No Preview of the File-Data possible. Try to manually convert. Good Luck.') 167 | Qstring = no_preview 168 | message = time + '\n' + no_preview + '\n' 169 | return message 170 | 171 | 172 | def error_filelist(): 173 | time = timestamp() 174 | file_list_error = _translate('message', 'Some file input was not correct') 175 | QString = file_list_error 176 | message = time + '\n' + file_list_error + '\n' 177 | return message 178 | 179 | def message_file_converted(): 180 | time = timestamp() 181 | file_converted_message = _translate('message', 'The following file was convertet: ') 182 | QString = file_converted_message 183 | message = time + '\n' + file_converted_message + '\n' 184 | return message 185 | 186 | 187 | '''' Important QMessageBox errors - 1 Messages''' 188 | 189 | def error_fatal(): 190 | QtWidgets.QMessageBox.warning(None, 'Warning-Message', _translate('message', 'Somthing went terribly wrong. '\ 191 | ' Hopefully only your Options are incorrect!' \ 192 | '\n\nOr get some help from Panconvert / Pandoc!')) 193 | 194 | def debug_message(message): 195 | QtWidgets.QMessageBox.warning(None, 'Warning-Message', message) 196 | 197 | -------------------------------------------------------------------------------- /source/language/translation.po: -------------------------------------------------------------------------------- 1 | __author__ = 'apaeffgen' 2 | # -*- coding: utf-8 -*- 3 | 4 | # This file is part of Panconvert. 5 | # 6 | # Panconvert is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 3 of the License, or 9 | # (at your option) any later version. 10 | # 11 | # Panconvert is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | # 16 | # You should have received a copy of the GNU General Public License 17 | # along with Panconvert. If not, see . 18 | 19 | 20 | SOURCES = Panconvert.py source/gui/panconvert_gui_old.py source/gui//panconvert_gui.py 21 | SOURCES += source/gui/panconvert_dialog_batch.py source/language/messages.py 22 | SOURCES += source/gui/panconvert_diag_fromformat.py source/gui/panconvert_diag_toformat.py 23 | SOURCES += source/gui/panconvert_diag_help.py source/gui/panconvert_diag_info.py 24 | SOURCES += source/gui/panconvert_diag_prefpane.py source/gui/panconvert_diag_openuri.py 25 | TRANSLATIONS += source/language/Panconvert_de.ts source/language/Panconvert_es.ts source/language/Panconvert_fr.ts source/language/Panconvert_xx.ts 26 | --------------------------------------------------------------------------------