• Stars
    star
    195
  • Rank 194,764 (Top 4 %)
  • Language
    JavaScript
  • License
    Other
  • Created about 10 years ago
  • Updated almost 10 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

The platform behind PDFy, a free instant PDF host.

PDFy

The PDF hosting software powering http://pdf.yt/.

Dependencies

  • A PHP-capable HTTPd
  • PHP
  • MySQL
  • ImageMagick
  • php5-mysql
  • php5-imagick

For the Internet Archive auto-mirror script (optional):

  • Python
  • The internetarchive Python module (pip install internetarchive)
  • The oursql Python module (pip install internetarchive, depends on libmysqlclient being installed)
  • A cron daemon

Setup

If you wish to run PDFy yourself, this is how:

  1. Clone this repository - we'll assume you'll be cloning it to a folder in /var/sites, so the resulting folder would be /var/sites/pdfy.
  2. Clone the CPHP repository to /var/sites - this will become /var/sites/cphp.
  3. Switch the CPHP repository to the feature/formhandler branch - this is temporary until experimental CPHP features are merged into the master branch.
  4. Copy config.json.example to config.json and configure the database.
  5. Create a folder /var/sites/pdfy/storage and ensure that it is owned by the user and group that your PHP / HTTPd run under. This is where PDF files will be stored.
  6. Assign ownership of /var/sites/pdfy/public_html/static/thumbs to that same user and group.
  7. Add the relevant configuration to your HTTPd (see below).
  8. Replace instances of "https://pdf.yt/" in the code (in particular in embed codes) with the host that your instance will be running at.
  9. ????
  10. PDFy!

HTTPd configuration

CPHP, the PHP framework used for PDFy, will handle URL rewriting. To make this work, you will need to tell your HTTPd to forward any non-existent requests to /var/sites/pdfy/public_html/rewrite.php. This is how you do that for most common HTTPds. Make sure to place this in your virtual host configuration, not your global configuration!

Apache >= 2.2.16

FallbackResource /rewrite.php

Apache < 2.2.16 (mod_rewrite required)

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^ rewrite.php [L]

lighttpd

server.error-handler-404 = "/rewrite.php"

nginx

location / {
		try_files $uri $uri/ /rewrite.php;
}

Bugs

Please include the following information (where possible) in bug reports:

  • What did you expect it to do?
  • What did it do instead?
  • Operating System / Distribution (including version)
  • Browser (if client-side bug) or HTTPd (if server-side bug)
  • PDFy version (identified by commit hash, run git rev-parse HEAD on the server)
  • If a client-side bug, preferably a URL to the problematic page/document.

You may also file bugs related to the PDF viewer; if necessary, these will be forwarded upstream to the pdf.js project.

More Repositories

1

python-whois

A python module for retrieving and parsing WHOIS data
Python
393
star
2

node-random-number-csprng

A cryptographically secure generator for random numbers in a range.
JavaScript
83
star
3

node-bhttp

A sane HTTP client library for Node.js with Streams2 support.
CoffeeScript
62
star
4

scrypt-for-humans

A human-friendly API wrapper for the Node.js Scrypt bindings.
JavaScript
43
star
5

anonnews2

The source code for the current http://anonnews.org/ (AnonNews 2.0) The current rewrite, version 3.0, will live in a separate repository.
PHP
21
star
6

todo

A todo web-app for overworked hackers.
PHP
14
star
7

node-promise-task-queue

A configurable task queue that supports Promises.
JavaScript
12
star
8

node-combined-stream2

A drop-in Streams2-compatible replacement for combined-stream.
JavaScript
11
star
9

pdfy2

Node.js port of PDFy.
Java
10
star
10

cvm

Free and open-source VPS panel
CSS
9
star
11

cphp

An intuitive PHP framework that can be learned in 60 minutes. (UNMAINTAINED)
PHP
8
star
12

emailparser

Parser and HTML renderer for .eml files.
Python
7
star
13

node-stream-length

For a given Buffer or Stream, this module will attempt to determine the total length of the stream contents.
CoffeeScript
7
star
14

node-cdx

A streaming CDX parser for Node.js.
CoffeeScript
6
star
15

hma-proxy-parse

Parses proxies out of HideMyAss' public proxy list.
JavaScript
6
star
16

pytahoe

Python module for working with the Tahoe-LAFS filesystem.
Python
5
star
17

BlueCP

A web hosting panel based on PHP.
JavaScript
5
star
18

image-disc

A small utility to batch-create archived images of CDs/DVDs on Linux.
Python
5
star
19

tahoe-tools

Assorted tools for Tahoe-LAFS.
Python
4
star
20

openNG

An Open-Source Node Graph-Style Intelligence Platform
4
star
21

filething

A thin light-weight wrapper library, to make filesystem operations in Python suck less.
Python
3
star
22

nzbspider

A simple tool to automatically download NZBs for given releases
Python
3
star
23

resolv

Python module for resolving URLs of streaming sites and filehosters to direct download URLs.
Python
3
star
24

catarc

Commandline tool for extracting various types of archive to stdout, for example to grep through them.
Python
3
star
25

vpslist

Web application for comparing VPS providers on various specifications, allowing for filtering and sorting.
PHP
3
star
26

lighttpdparse

A simple script for getting the top statistics from one or more lighttpd access log files.
Python
3
star
27

pysfx

Tool to build self-extracting Python scripts.
Python
3
star
28

scantools

An assortment of tools for scanning books.
Python
3
star
29

pastebin-scrape

A resilient Pastebin.com scraper.
3
star
30

python-docs

An effort to rewrite the Python documentation to be more useful.
2
star
31

node-get-exchange-rates

Exchange rates for Bitcoin and major national currencies. No API key required.
JavaScript
2
star
32

beautifulsoup

My fork of BeautifulSoup, primarily to add more support for CSS selectors. Supports basic :nth-of-type() pseudoselectors and non-tag selectors as direct descendants.
Python
2
star
33

crytoteam

A project management platform for non-profit projects.
PHP
2
star
34

tahoe-s3

An S3 frontend and self-healing mechanism for Tahoe-LAFS.
2
star
35

gmhost

A simple Tahoe-LAFS based filehosting service.
PHP
2
star
36

multiloggy

A fork of Sean B. Palmer's public IRC logging bot 'loggy', implementing multi-channel support.
Python
2
star
37

scraperscript

A bookmarklet that helps you find unique selectors for page elements.
JavaScript
2
star
38

circd

[unmaintained] Simple IRCd in Python.
Python
2
star
39

node-bitmask-flags

A utility for dealing with flags and permissions using bitmasks.
JavaScript
2
star
40

webshots

Crawling tools for Webshots archiving.
Python
2
star
41

4chandownloader

[unmaintained] Simple tool to download a 4chan thread.
Python
2
star
42

pyreactor

A simple evented networking library for Python, designed for easy creation of custom protocols.
Python
1
star
43

node-bluebird-tap-error

Like .tap, but for errors (rejections)
JavaScript
1
star
44

node-promise-while-loop

An asynchronous while-loop implementation with full support for Promises
JavaScript
1
star
45

jsde

Fully client-side 'desktop environment' in Javascript, intended for data processing web applications.
JavaScript
1
star
46

zippydoc

Documentation markup language and library, including HTML converter.
Python
1
star
47

radium

Light-weight batteries-included JavaScript game engine.
JavaScript
1
star
48

openmedia

A media catalogue web-application for open-licensed video content.
JavaScript
1
star
49

crytobooks

Ebook crawler and search engine.
PHP
1
star
50

hypervm-migrate

A HyperVM mass migration script. Use at own risk.
Python
1
star
51

joepie91

1
star
52

cryto-status

An extensible, real-time, master/slave server and service monitoring system using ZeroMQ.
Python
1
star
53

box

The forum and blog software for the (work-in-progress) BoxOnABudget site.
PHP
1
star
54

node-promisify-simple-callback

Promisifies a function that expects a callback with a single (result) argument
JavaScript
1
star
55

node-form-data2

A Streams2-compatible drop-in replacement for the `form-data` module.
JavaScript
1
star
56

main

Assorted small stuff.
Python
1
star
57

multipaste

Commandline tool for pasting the same content to multiple pastebins.
Python
1
star