Coder Social home page Coder Social logo

steadfast-collective / statamic-csv-exporter Goto Github PK

View Code? Open in Web Editor NEW
5.0 1.0 5.0 146 KB

Export your content to CSV files.

Home Page: https://statamic.com/addons/steadfastcollective/csv-exporter

License: MIT License

Blade 17.22% PHP 82.78%
statamic-addon statamic-v3 csv-exporter statamic-utility

statamic-csv-exporter's Introduction

Screenshot of CSV Export Utility

Statamic CSV Exporter

This addon gives you the ability to export your content to CSV files.

Installation

You can search for this addon in the Tools > Addons section of the Statamic Control Panel and click install, or run the following command from your project root:

composer require steadfastcollective/statamic-csv-exporter

Usage

To use this addon, follow the usage instructions or watch this video:

  1. Head into the Control Panel
  2. Go to Utilities and click into the 'CSV Exporter' utility
  3. Select the collections you wish to export and click the 'Export' button
  4. A ZIP file will be downloaded. If you open that, you'll find each collection in its own CSV file.

Ignoring certain fields

If you'd like to exclude certain fields from being returned by the export, you should add them to the addon's configuration file

By default, you're unlikley to have the configuration file published. To publish it, run:

php artisan vendor:publish --tag=statamic-csv-exporter-config

The config file will appear as config/statamic-csv-exporter.php.

In the config file, you will see an ignored_fields array. Inside that, add the handle of the collection, then any of the fields you wish to be excluded.

In the below example: exports for the events collection will exclude the author and excerpt fields.

/*
|--------------------------------------------------------------------------
| Ignored fields
|--------------------------------------------------------------------------
|
| Configure any fields which should be ignored when exporting items.
|
*/

'ignored_fields' => [
    'collections' => [

        'events' => [
            'author', 'excerpt',
        ],

    ],
],

Changelog

Please see CHANGELOG for more information what has changed recently.

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

License

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

statamic-csv-exporter's People

Contributors

duncanmcclean avatar jacksleight avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

statamic-csv-exporter's Issues

Failing to install in Laravel 9 projects due to dependency conflicts

I've tried to install but I'm getting a 404 on /cp/utilities/csv-exporter

csv-exporter-404

Install attempts:

  1. via the CP (Tools > Addons)
  2. Manually with: composer require steadfastcollective/statamic-csv-exporter
Attempt 2: Installation failed...
Problem 1
    - phpoffice/phpspreadsheet[1.18.0, ..., 1.22.0] require psr/simple-cache ^1.0 -> found psr/simple-cache[1.0.0, 1.0.1] but the package is fixed to 3.0.0 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.
    - phpoffice/phpspreadsheet 1.23.0 requires psr/simple-cache ^1.0 || ^2.0 -> found psr/simple-cache[1.0.0, 1.0.1, 2.0.0, 2.x-dev] but the package is fixed to 3.0.0 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.
    - maatwebsite/excel[3.1.0, ..., 3.1.25] require php ^7.0 -> your php version (8.0.16) does not satisfy that requirement.
    - maatwebsite/excel[3.1.26, ..., 3.1.35] require illuminate/support 5.8.*|^6.0|^7.0|^8.0 -> found illuminate/support[v5.8.0, ..., 5.8.x-dev, v6.0.0, ..., 6.x-dev, v7.0.0, ..., 7.x-dev, v8.0.0, ..., 8.x-dev] but these were not loaded, likely because it conflicts with another require.
    - steadfastcollective/statamic-csv-exporter[v1.0.0, ..., v1.0.1] require maatwebsite/excel ^3.1 -> satisfiable by maatwebsite/excel[3.1.0, ..., 3.1.x-dev].
    - maatwebsite/excel[3.1.36, ..., 3.1.x-dev] require phpoffice/phpspreadsheet ^1.18 -> satisfiable by phpoffice/phpspreadsheet[1.18.0, ..., 1.23.0].
    - Root composer.json requires steadfastcollective/statamic-csv-exporter ^1.0 -> satisfiable by steadfastcollective/statamic-csv-exporter[v1.0.0, v1.0.1].

Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.
You can also try re-running composer require with an explicit version constraint, e.g. "composer require steadfastcollective/statamic-csv-exporter:*" to figure out if any version is installable, or "composer require steadfastcollective/statamic-csv-exporter:^2.1" if you know which you need.

  1. Manually with: composer require steadfastcollective/statamic-csv-exporter -W

Am I missing an obvious step?

Details

Statamic 3.3.12 Pro
Laravel 9.14.1
PHP 8.0.16
aryehraber/statamic-uuid 2.1.0
rias/statamic-data-import 1.2.1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.