Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
176 changes: 176 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,176 @@
# reference, old shit
1_reference/

# macOS Junks
.DS_Store

# VSCode Junks
.vscode
.vscode/*

# Microsoft Office Junks
~$*.*

# C/C++ Junks
# Prerequisites
*.d

# Compiled Object files
*.slo
*.lo
*.o
*.obj

# Precompiled Headers
*.gch
*.pch

# Compiled Dynamic libraries
*.so
*.dylib
*.dll

# Fortran module files
*.mod
*.smod

# Compiled Static libraries
*.lai
*.la
*.a
*.lib

# Executables
*.exe
*.out
*.app

# Python Junks
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
pip-wheel-metadata/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST
share/
bin/
bin/*
include/
include/*

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
.hypothesis/
.pytest_cache/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
.python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don’t work, or not
# install all needed dependencies.
Pipfile.lock

# celery beat schedule file
celerybeat-schedule

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/
63 changes: 39 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,14 @@ PDFMtEd Editor is an easy-to-use graphical metadata editor that supports viewing

**Screenshot**

![screenshot of PDFMtEd Editor](https://github.com/Glutanimate/PDFMtEd/blob/master/screenshots/pdfmted-editor.png)
![screenshot of PDFMtEd Editor](https://github.com/uriel1998/PDFMtEd/blob/7f96c7170e6fc66992635cb1bd94ba824ffa790d/screenshots/pdfmted-editor.png)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is incorrect. It should lead to the screenshot in the original repo.


**Features:**

- easily process multiple files and folders right from your file manager
- preview your documents in your default PDF viewer and file manager before editing them
- preview your documents in your default PDF viewer before editing them
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Obviously, I'm not the maintainer but I don't think removing the browse button is a good idea.

- rename files based on metadata
- perform OCR on files by calling ocrmypdf

### PDFMtEd Inspector

Expand Down Expand Up @@ -88,19 +89,22 @@ The following instructions are provided for most Linux distributions.

*Optional but recommended*: [sejda-console](https://github.com/torakiki/sejda/releases)

#### Ubuntu 16.04 or lower
#### Ubuntu

Install all dependencies on Ubuntu with the following commands:

sudo add-apt-repository ppa:webupd8team/y-ppa-manager
sudo apt-get update
sudo apt-get install yad libimage-exiftool-perl qpdf
Install all required dependencies on Ubuntu with the following commands:

```sudo add-apt-repository ppa:webupd8team/y-ppa-manager
sudo apt-get update
sudo apt-get install yad libimage-exiftool-perl qpdf
```


#### Most other Linux distribution based on Debian or Ubuntu

sudo apt install libimage-exiftool-perl yad qpdf

If you do not have Gnome installed, you may need `gir1.2-gnomedesktop-3.0` and `gir1.2-gnomedesktop-4.0` for thumbnail generation.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps find a way to implement the feature without it depending on Gnome?


#### Fedora and most other Linux distribution based on Fedora

sudo dnf install perl-Image-ExifTool yad qpdf
Expand All @@ -120,25 +124,31 @@ Install all dependencies on Ubuntu with the following commands:

**Recommended:**

- [Sejda](http://www.sejda.org/): extensible and configurable PDF manipulation layer library; used to restore broken PDF files; more reliable than qpdf in this, but unfortunately not available in any repository; please use the [debfile release](ttps://github.com/torakiki/sejda/releases) to install `sejda-console`
- [Sejda](http://www.sejda.org/): extensible and configurable PDF manipulation layer library; used to restore broken PDF files; more reliable than qpdf in this, but unfortunately not available in any repository; please use the [debfile release](https://github.com/torakiki/sejda/releases) to install `sejda-console`

These three are available in Debian, Ubuntu, and distros based on them with

sudo apt install ocrmypdf poppler-utils imagemagick

- [ocrmypdf](https://github.com/ocrmypdf/OCRmyPDF): Adds OCR text layer to scanned PDF files; used to OCR
- [poppler-utils](https://poppler.freedesktop.org/): Precompiled command-line utilities (based on Poppler) for manipulating PDF files and converting them to other formats. Used for detecting text layer in PDFs and generating larger thumbnail.
- [imagemagick](https://imagemagick.org/index.php): Image manipulation, used to resize and convert larger thumbnail.



### Installation

1. Install all dependencies

2. Clone this repository or download the latest zipfile and extract it

3. `cd` to the cloned/extracted directory, e.g.:
3. `cd` to the cloned/extracted directory, e.g.: `cd PDFMtEd`

cd PDFMtEd

4. Run the provided installer:

sudo ./install.sh
4. Run the provided installer: `sudo ./install.sh`

(If your file manager supports custom scripts you can just copy the `PDFMtEd` folder to the default scripts path instead ([instructions for Nautilus](http://askubuntu.com/a/236415)))

After the installation PDFMtEd Editor and Inspector should be available as entries in the *Open with* context menu:
After the installation PDFMtEd Editor and Inspector should be available as entries in the *Open with* context menu:

![file manager context menu with PDFMtEd entries](https://github.com/Glutanimate/PDFMtEd/blob/master/screenshots/pdfmted_usage.png)

Expand All @@ -148,21 +158,26 @@ If you can't find the entries click on *Other application* (arrow) and navigate

Follow these steps to uninstall the PDFMted utilities:

1. `cd` to the project directory, e.g.:
1. `cd` to the project directory, e.g.: `cd PDFMtEd`

cd PDFMtEd
2. Run `uninstall.sh` as root: `sudo ./uninstall.sh`

2. Run `uninstall.sh` as root:
## Usage

sudo ./uninstall.sh
### General usage

#### From the File Manager

## Usage
* Use your file manager to select one or more files/directories
* Choose the utility you want to launch from the *Open with* context menu

![file manager context menu with PDFMtEd entries](https://github.com/Glutanimate/PDFMtEd/blob/master/screenshots/pdfmted_usage.png)

### General usage
#### From the command line

`pdfmted-editor [file1] [file2] [file3]`

1. Use your file manager to select one or more files/directories
2. Choose the utility you want to launch from the *Open with* context menu
This can be generated on the fly, e.g. `pdfmted-editor $(ls *.pdf)`

### PDFMtEd Editor

Expand Down
Loading