genj / google-drive-bundle
此软件包已被放弃,不再维护。未建议替代软件包。
Genj Google Drive bundle
dev-master
2015-06-08 12:28 UTC
Requires
- google/apiclient: 1.0.*@dev
- symfony/symfony: >=2.5,<3.0-dev
This package is not auto-updated.
Last update: 2024-02-17 13:44:54 UTC
README
功能
- 提供命令以同步Google Drive文件夹与本地文件夹中的文件
- 提供动作以将同步的文件以幻灯片形式查看
需求
- Symfony 2.5
- GooglApiClient - https://github.com/google/google-api-php-client
安装
将其添加到composer.json中
...
"require": {
...
"genj/google-drive-bundle": "dev-master"
...
然后运行composer update
。完成后,在AppKernel.php中启用该包。
# app/AppKernel.php
class AppKernel extends Kernel
{
public function registerBundles() {
$bundles = array(
...
new Genj\GoogleDriveBundle\GenjGoogleDriveBundle()
...
将Resources/config/routing.yml
中的路由规则复制到您的routing.yml中。
配置
您需要从Google API控制台( https://code.google.com/apis/console )获取以下信息
- 服务账户API密钥文件(此文件预计位于
app/config/
文件夹中) - 服务账户电子邮件地址
将这些添加到您的parameters.yml中
genj_google_drive.service_account_key_file:
genj_google_drive.service_account_email:
使用方法
运行同步
$ php app/console genj:google-drive:sync