Skip to content

Commit

Permalink
pdf2text is renamed pdf2txt
Browse files Browse the repository at this point in the history
  • Loading branch information
joanfabregat committed Feb 22, 2024
1 parent 1b4ce78 commit 1f87618
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 16 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,14 @@ jobs:
id: meta
uses: docker/[email protected]
with:
images: codeinchq/pdf2text
images: codeinchq/pdf2txt

- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64,linux/arm64
target: pdf2text-prod
target: pdf2txt-prod
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
12 changes: 6 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
####################################################################################################
# PDF2TEXT
# PDF2TXT
####################################################################################################
FROM --platform=$TARGETPLATFORM node:21-alpine AS pdf2text
FROM --platform=$TARGETPLATFORM node:21-alpine AS pdf2txt

ENV PORT=3000
ENV NODE_ENV=production
WORKDIR /app


####################################################################################################
# PDF2TEXT dev
# PDF2TXT dev
####################################################################################################
FROM pdf2text AS pdf2text-dev
FROM pdf2txt AS pdf2txt-dev

ENV NODE_ENV=development
RUN npm install --global nodemon
Expand All @@ -21,9 +21,9 @@ ENTRYPOINT ["nodemon", "main.mjs"]


####################################################################################################
# PDF2TEXT prod
# PDF2TXT prod
####################################################################################################
FROM pdf2text AS pdf2text-prod
FROM pdf2txt AS pdf2txt-prod

COPY main.mjs /app/
COPY package.json /app/
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# pdf2text
# pdf2txt

[![Docker Image CI](https://github.com/codeinchq/pdf2text/actions/workflows/docker-image.yml/badge.svg)](https://github.com/codeinchq/pdf2text/actions/workflows/docker-image.yml)
[![Docker Image CI](https://github.com/codeinchq/pdf2txt/actions/workflows/docker-image.yml/badge.svg)](https://github.com/codeinchq/pdf2txt/actions/workflows/docker-image.yml)

This repository contains a simple containerized API to convert PDF documents to text using [Mozilla's pdf.js](https://mozilla.github.io/pdf.js/) and [pdf.js-extract](https://www.npmjs.com/package/pdf.js-extract).

The image is available on [Docker Hub](https://hub.docker.com/r/codeinchq/pdf2text) under the name `codeinchq/pdf2text`.
The image is available on [Docker Hub](https://hub.docker.com/r/codeinchq/pdf2txt) under the name `codeinchq/pdf2text`.

## Configuration

Expand All @@ -27,7 +27,7 @@ The server returns `200` if the conversion was successful and the images are ava

### Step 1: run the container using Docker
```bash
docker run -p "3000:3000" codeinchq/pdf2text
docker run -p "3000:3000" codeinchq/pdf2txt
```

### Step 2: convert a PDF file to text
Expand Down
6 changes: 3 additions & 3 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
services:
pdf2text:
image: pdf2text
pdf2txt:
image: pdf2txt
build:
context: .
target: pdf2text-dev
target: pdf2txt-dev
platforms:
#- linux/amd64
- linux/arm64
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "pdf2text",
"name": "pdf2txt",
"type": "module",
"license": "MIT",
"author": "Joan Fabrégat <[email protected]>",
Expand Down

0 comments on commit 1f87618

Please sign in to comment.