Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update README add installation instructions #44

Closed
wants to merge 10 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
44 changes: 44 additions & 0 deletions README.rst
Expand Up @@ -66,6 +66,50 @@ For JBIG2 compression:
* `jbig2enc <https://github.com/agl/jbig2enc>`_ for JBIG2 compression (and PyMuPDF 1.19.0 or higher)


Installation
============

First install dependencies. For example, in Ubuntu::


Copy link
Contributor

Choose a reason for hiding this comment

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

Any reason you are always leaving 2 lines empty? I think 1 should be quite sufficient...

Copy link
Collaborator

Choose a reason for hiding this comment

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

I can fix that up

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Any reason

When in Rome, do as the Romans do. 🙂 I looked at the first existing code block I found (under "Usage")

sudo apt install libleptonica-dev libopenjp2-tools libxml2-dev libxslt-dev python3-dev python3-pip
git clone https://github.com/agl/jbig2enc
cd jbig2enc
./autogen.sh
./configure && make
sudo make install


Because `archive-pdf-tools` is on the `Python Package Index <https://pypi.org/project/archive-pdf-tools/>`_ (PyPI), you can use `pip` (the Python 3 version is often called `pip3`) to install the latest version::


# Latest version
pip3 install archive-pdf-tools

# Specific version
pip3 install archive-pdf-tools==1.4.14


Alternatively, if you want a specific commit or unreleased version, check out the master branch or a `tagged release <https://github.com/internetarchive/archive-pdf-tools/tags>`_ and use `pip` to install::


git clone https://github.com/internetarchive/archive-pdf-tools.git
cd archive-pdf-tools
pip3 install .


Finally, if you've downloaded a wheel to test a specific commit, you can also install it using `pip`::


pip3 install --force-reinstall -U --no-deps ./archive_pdf_tools-${version}.whl


To see if `archive-pdf-tools` is installed correctly for your user, run::


recode_pdf --version



Not well tested features
========================
Expand Down
44 changes: 44 additions & 0 deletions docs/source/index.rst
Expand Up @@ -61,6 +61,50 @@ For JBIG2 compression:
* `jbig2enc <https://github.com/agl/jbig2enc>`_ for JBIG2 compression (and PyMuPDF 1.19.0 or higher)


Installation
------------

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure if it makes sense to duplicate the whole section. I personally wouldn't do that.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I think it's not too bad, if anything, maybe the README ought to refer to the docs for specifics.

First install dependencies. For example, in Ubuntu::


sudo apt install libleptonica-dev libopenjp2-tools libxml2-dev libxslt-dev python3-dev python3-pip
git clone https://github.com/agl/jbig2enc
cd jbig2enc
./autogen.sh
./configure && make
sudo make install


Because `archive-pdf-tools` is on the `Python Package Index <https://pypi.org/project/archive-pdf-tools/>`_ (PyPI), you can use `pip` (the Python 3 version is often called `pip3`) to install the latest version::


# Latest version
pip3 install archive-pdf-tools

# Specific version
pip3 install archive-pdf-tools==1.4.14


Alternatively, if you want a specific commit or unreleased version, check out the master branch or a `tagged release <https://github.com/internetarchive/archive-pdf-tools/tags>`_ and use `pip` to install::


git clone https://github.com/internetarchive/archive-pdf-tools.git
cd archive-pdf-tools
pip3 install .


Finally, if you've downloaded a wheel to test a specific commit, you can also install it using `pip`::


pip3 install --force-reinstall -U --no-deps ./archive_pdf_tools-${version}.whl


To see if `archive-pdf-tools` is installed correctly for your user, run::


recode_pdf --version


Not well tested features
------------------------

Expand Down