Skip to content

Commit bdbf51b

Browse files
committed
Add all required files for initial version
0 parents  commit bdbf51b

File tree

15 files changed

+419
-0
lines changed

15 files changed

+419
-0
lines changed

.github/FUNDING.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# These are supported funding model platforms
2+
3+
github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
4+
patreon: # Replace with a single Patreon username
5+
open_collective: # Replace with a single Open Collective username
6+
ko_fi: # Replace with a single Ko-fi username
7+
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
8+
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
9+
liberapay: # Replace with a single Liberapay username
10+
issuehunt: # Replace with a single IssueHunt username
11+
otechie: # Replace with a single Otechie username
12+
custom: ['https://www.paypal.me/jaymoulin', 'https://www.buymeacoffee.com/3Yu8ajd7W', 'https://freewallet.org/id/374ad82e/btc', 'https://freewallet.org/id/374ad82e/ltc']

.github/ISSUE_TEMPLATE.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
<!--
2+
If you are reporting a new issue, make sure that we do not have any duplicates
3+
already open. You can ensure this by searching the issue list for this
4+
repository. If there is a duplicate, please close your issue and add a comment
5+
to the existing issue instead.
6+
7+
If you suspect your issue is a bug, please edit your issue description to
8+
include the BUG REPORT INFORMATION shown below. If you fail to provide this
9+
information within 7 days, we cannot debug your issue and will close it. We
10+
will, however, reopen it if you later provide the information.
11+
12+
For more information about reporting issues, see
13+
https://github.com/femtopixel/docker-pdf2gdocs/blob/master/CONTRIBUTING.md
14+
15+
You do NOT have to include this information if this is a FEATURE REQUEST
16+
17+
If you find this useful, please consider starring the repo and/or donating.
18+
People showing interest attract more attention ;)
19+
-->
20+
21+
**Description**
22+
23+
<!--
24+
Briefly describe the problem you are having in a few paragraphs.
25+
-->
26+
27+
**Command line I used to start the container**
28+
29+
**Steps to reproduce the issue:**
30+
1.
31+
2.
32+
3.
33+
34+
**Describe the results you received:**
35+
36+
37+
**Describe the results you expected:**
38+
39+
40+
**Additional information you deem important (e.g. issue happens only occasionally):**
41+
42+
**Provide some logs (`docker logs chrome`)**
43+
44+
<details>
45+
<pre>
46+
(paste logs)
47+
</pre>
48+
</details>
49+
50+
**Output of `docker inspect chrome --format='{{index .Config.Labels.version}}'`:**
51+
52+
```
53+
(paste your output here)
54+
```

.gitignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
*.egg-info
2+
/credentials.json
3+
/token.pickle
4+
/tmp/
5+
/upload/
6+
/qemu*
7+
/*.yaml
8+
/.build
9+
/pdf2gdocs/__pycache__/

.travis.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
sudo: required
2+
3+
dist: bionic
4+
5+
services:
6+
- docker
7+
8+
before_install:
9+
- sudo apt update && sudo apt install make -y
10+
- git clone https://github.com/estesp/manifest-tool && cd manifest-tool && git checkout v0.9.0 && sudo make && sudo make install && cd .. && rm -Rf manifest-tool
11+
- docker run --rm --privileged multiarch/qemu-user-static:register
12+
- sudo apt install -y qemu qemu-user-static qemu-user binfmt-support
13+
14+
script:
15+
- echo "$DOCKER_HUB_PASSWORD" | docker login -u "$DOCKER_HUB_LOGIN" --password-stdin
16+
- make build
17+
18+
deploy:
19+
provider: script
20+
script:
21+
- make publish latest
22+
on:
23+
branch: master

CONTRIBUTING.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
How to Contribute
2+
=================
3+
4+
This project welcomes your contribution. There are several ways to help out:
5+
6+
* Create an [issue](https://gitlab.com/femtopixel/docker-pdf2gdocs/issues/) on GitLab,
7+
if you have found a bug or have an idea for a feature
8+
* Write test cases for open bug issues
9+
* Write patches for open bug/feature issues
10+
11+
There are a few guidelines that we need contributors to follow, so that we have a
12+
chance of keeping on top of things.
13+
14+
Issues
15+
------
16+
17+
* Submit an [issue](https://gitlab.com/femtopixel/docker-pdf2gdocs/issues/)
18+
* Make sure it does not already exist.
19+
* Clearly describe the issue including steps to reproduce, when it is a bug.
20+
* Make sure you note the version you use.
21+
22+
Additional Resources
23+
--------------------
24+
25+
* [Existing issues](https://gitlab.com/femtopixel/docker-pdf2gdocs/issues/)

Dockerfile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
FROM python:alpine
2+
3+
COPY . /app
4+
WORKDIR /app
5+
ARG VERSION=v1.0.0
6+
LABEL maintainer="Jay MOULIN <[email protected]> <https://twitter.com/MoulinJay>"
7+
LABEL version=${VERSION}
8+
RUN apk add imagemagick --no-cache --update && pip install -e .
9+
CMD /app/pdf2gdocs/pdf2gdocs.py

LICENSE.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
The MIT License (MIT)
2+
Copyright (c) 2019 FemtoPixel
3+
4+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
5+
6+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
7+
8+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Makefile

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
VERSION ?= 1.0.0
2+
CACHE ?= --no-cache=1
3+
FULLVERSION ?= 1.0.0
4+
archs ?= amd64 arm32v6 arm64v8 i386
5+
.PHONY: all build publish latest version
6+
all: build publish
7+
build:
8+
cp -R /usr/bin/qemu-*-static .
9+
$(foreach arch,$(archs), \
10+
cat Dockerfile | sed "s/FROM python:alpine/FROM $(arch)\/python:alpine/g" > .build; \
11+
docker build -t femtopixel/pdf2gdocs:${VERSION}-$(arch) -f .build --build-arg VERSION=${VERSION}-$(arch) ${CACHE} .;\
12+
)
13+
publish:
14+
docker push femtopixel/pdf2gdocs
15+
cat manifest.yml | sed "s/\$$VERSION/${VERSION}/g" > manifest2.yaml
16+
cat manifest2.yaml | sed "s/\$$FULLVERSION/${FULLVERSION}/g" > manifest.yaml
17+
manifest-tool push from-spec manifest.yaml
18+
latest: build
19+
cat manifest.yml | sed "s/\$$VERSION/${VERSION}/g" > manifest2.yaml
20+
cat manifest2.yaml | sed "s/\$$FULLVERSION/latest/g" > manifest.yaml
21+
manifest-tool push from-spec manifest.yaml

README.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
![logo](logo.png)
2+
3+
PDF to Google Docs - Docker Image
4+
======================
5+
6+
[![Docker Pulls](https://img.shields.io/docker/pulls/femtopixel/pdf2gdocs.svg)](https://hub.docker.com/r/femtopixel/pdf2gdocs/)
7+
[![Docker Stars](https://img.shields.io/docker/stars/femtopixel/pdf2gdocs.svg)](https://hub.docker.com/r/femtopixel/pdf2gdocs/)
8+
[![Bitcoin donation](https://github.com/jaymoulin/jaymoulin.github.io/raw/master/btc.png "Bitcoin donation")](https://m.freewallet.org/id/374ad82e/btc)
9+
[![Litecoin donation](https://github.com/jaymoulin/jaymoulin.github.io/raw/master/ltc.png "Litecoin donation")](https://m.freewallet.org/id/374ad82e/ltc)
10+
[![PayPal donation](https://github.com/jaymoulin/jaymoulin.github.io/raw/master/ppl.png "PayPal donation")](https://www.paypal.me/jaymoulin)
11+
[![Buy me a coffee](https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png "Buy me a coffee")](https://www.buymeacoffee.com/3Yu8ajd7W)
12+
13+
Description
14+
-----------
15+
16+
The purpose of this image is to convert a PDF file to a Google Doc.
17+
With this specific method, a file can be archived without using Google Drive quota.
18+
19+
Installation
20+
------------
21+
22+
1. Go to https://developers.google.com/docs/api/quickstart/python
23+
1. Click the _Enable the Google Docs Api_ button
24+
1. Click the _Download configuration_ button
25+
1. Go to https://console.developers.google.com/apis/library/drive.googleapis.com
26+
1. Enable the Google Drive API service
27+
1. Init the container `docker run --name pdf2gdocs -it -v /path/to/your/pdf/folder:/upload -v /path/to/your/credentials:/credentials --net=host femtopixel/pdf2gdocs`
28+
1. Click the link given by the application and follow the instructions (you may be block by your browser for an unsafe URL, proceed anyway)
29+
30+
Each time you want to upload your pdf
31+
```
32+
docker start pdf2gdocs
33+
```

logo.png

94.3 KB
Loading

0 commit comments

Comments
 (0)