atico/spreadsheet-translator-provider-googledrive

This package is abandoned and no longer maintained. The author suggests using the samuelvi/spreadsheet-translator-provider-googledrive package instead.

Spreadsheet Translator - Google Drive Provider with no authentication

Installs: 42

Dependents: 1

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

pkg:composer/atico/spreadsheet-translator-provider-googledrive

v8.4.0 2025-11-08 11:37 UTC

This package is auto-updated.

Last update: 2025-11-08 11:38:54 UTC


README

Latest Version on Packagist Total Downloads Software License

A Google Drive provider for Spreadsheet Translator that requires no authentication. This provider allows you to fetch translations directly from publicly accessible Google Spreadsheets.

Requirements

  • PHP 8.4 or higher
  • Composer

Installation

You can install the package via composer:

composer require samuelvi/spreadsheet-translator-provider-googledrive

Usage

Basic Example

<?php

require_once __DIR__ . '/vendor/autoload.php';

use Atico\SpreadsheetTranslator\SpreadsheetTranslator;

$spreadsheetTranslator = new SpreadsheetTranslator([
    'provider' => 'google_drive',
    'source_resource' => 'https://docs.google.com/spreadsheets/d/YOUR_SPREADSHEET_ID/edit#gid=YOUR_SHEET_ID',
]);

$translations = $spreadsheetTranslator->getTranslations('en');

Configuration Options

  • provider: Must be set to 'google_drive'
  • source_resource: The URL of your Google Spreadsheet (must be publicly accessible)
  • format: Optional, defaults to 'csv'
  • temp_local_source_file: Optional, temporary file path for downloaded spreadsheet

Making Your Spreadsheet Public

For this provider to work, your Google Spreadsheet must be publicly accessible:

  1. Open your Google Spreadsheet
  2. Click on "Share" button
  3. Change to "Anyone with the link can view"
  4. Copy the spreadsheet URL

Development

Installation

make install

Running Tests

Run all tests:

make test

Run tests with coverage:

make test-coverage

Code Quality

Run Rector (dry-run to see changes):

make rector-dry

Apply Rector changes:

make rector

Validate composer.json:

make validate

Run all checks (validate, rector-dry, test):

make check

Available Make Commands

Run make help to see all available commands:

make help

Project Structure

.
├── src/
│   ├── GoogleDriveProvider.php           # Main provider implementation
│   └── GoogleDriveConfigurationManager.php # Configuration management
├── tests/
│   ├── GoogleDriveProviderTest.php
│   └── GoogleDriveConfigurationManagerTest.php
├── .github/
│   └── workflows/
│       └── ci.yml                         # GitHub Actions CI configuration
├── composer.json
├── phpunit.xml                            # PHPUnit configuration
├── rector.php                             # Rector configuration for PHP 8.4
├── Makefile                               # Development commands
└── README.md

Testing

The package includes comprehensive unit tests. Run them with:

vendor/bin/phpunit

Or using make:

make test

Continuous Integration

This package uses GitHub Actions for continuous integration. The CI pipeline:

  • Validates composer.json
  • Installs dependencies
  • Runs Rector checks
  • Executes all tests

See .github/workflows/ci.yml for details.

License

The MIT License (MIT). Please see License File for more information.

Credits

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.