承接 antoineaugusti/pdfarchiver 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

antoineaugusti/pdfarchiver

最新稳定版本:v1.1

Composer 安装命令:

composer require antoineaugusti/pdfarchiver

包简介

Archive locally generated PDFs to a remote host

README 文档

README

Software License Latest Version

What's the goal?

The goal is to easily archive generated PDF documents from one location (the "local" location) to another location (the "remote" one).

Let's say we have a local architecture like this:

company/
├── first-folder
│   ├── makefile
│   ├── document.tex
│   ├── pdf
│   │   └── document.pdf
│   └── report
│       ├── makefile
│       ├── report.tex
│       └── pdf
│           └── report.pdf
├── second-folder
│   ├── makefile
│   ├── reporting.tex
│   └── pdf
│       └── reporting.pdf
└── dummy

We will transfer PDF files to the remote filesystem with this architecture:

company/
├── first-folder
│   ├── document.pdf
│   └── report
│       ├── report.pdf
├── second-folder
│   ├── reporting.pdf

You don't need to create sub directories on the remote filesytem, they will automatically be created when copying PDF files to the remote filesystem.

Installation

PHP 5.4+ or HHVM 3.2+, and Composer are required.

To get the latest version of PdfArchiver, just run the following command from your Terminal:

$ composer require antoineaugusti/pdfarchiver

And then pull the dependencies with the following command:

$ composer install

Filesystem adapters

PdfArchiver relies on the awesome Flysystem package from The PHP League. A lot of adapters are available in the documentation. Determine which adapters you'll need for your local and remote filesystems and then let the Antoineaugusti\PdfArchiver\Console\MoverCommand class do the work for you.

Example: local filesystem to SFTP server

For example, let's say you want to move generated PDFs from your local machine to a SFTP server. An example is given here.

Steal the example file and place it at the root of this directory. Replace configuration values with your needs and you're good to go.

Don't forget to add dependencies for your adapters in your composer.json file and then run composer update.

How to run

commands is the file placed at the root of this directory where you have previously wired your adapters to the MoverCommand class.

Once you've chosen the right adapters (don't forget to pull dependencies with composer update) and you've set your configuration values, it will be very easy. The Antoineaugusti\PdfArchiver\Console\MoverCommand class will search recursively from the root folder you have defined in your local adapter with the following command:

$ php commands archive

Starting from a subfolder

If you don't want to start at the defined root folder, but somewhere else, just give the relative path as the first argument:

$ php commands archive example/subfolder

Generating PDF files

Since we are relying on the existence of a makefile and pdf folder, you may want to generate your PDF files before moving them to a remote location. Just pass the option --make when calling the script:

$ php commands archive example/subfolder --make

Contributing

Contributions are very welcome. This package is pretty simple right now and it only suits my needs. Feel free to open a PR to add some options or additional behavior!

统计信息

  • 总下载量: 48
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-01-24

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固