Reporter - πŸ“Š Export Craft data as CSVs in a snap

Overview

Reporter

πŸ“Š Export Craft data as CSVs in a snap!

An example of the reports screen before a user has initiated an export

⚑️ Features

  • 🏎 Reports are processed with Query Batching, making exports run quickly and without exhausting your memory limit
  • 🧘 Inspired by Element API, create reports with a simple and familiar structure
  • πŸ“¦ Reports stored using Asset volumes so you can host reports locally or on a cloud-based service like Amazon S3

πŸ“¦ Installing

Install Reporter one of two ways:

πŸ”Œ Setup

To setup reports, create a reporter.php file in config/. Below is an example config file.

Example Config

'Reports', // The asset volume handle where your reports should be saved // NOTE: Your reports are publicly accessible if your volume has "Assets in this volume have public URLs" enabled 'volume' => 'uploads', // An optional folder path if you would like to nest the reports in a specific directory 'folder' => 'resources/reports', // An array of reports to produce 'reports' => [ 'pages' => function () { return [ 'name' => 'All Pages', 'description' => 'A simple export of all the pages on the site.', 'elementType' => Entry::class, 'criteria' => [ 'section' => 'pages' ], 'transformer' => function (Entry $entry) { return [ "id" => $entry->id, "title" => $entry->title, "url" => $entry->url, ]; } ]; }, 'allImages' => function () { return [ 'name' => 'Uploaded Images', 'description' => 'A list of all images uploaded into Craft', 'elementType' => Asset::class, 'criteria' => [ 'kind' => 'image' ], 'transformer' => function (Asset $asset) { return [ "id" => $asset->id, "title" => $asset->title, "filename" => $asset->filename, ]; } ]; }, ] ];">


use craft\elements\Entry;
use craft\elements\Asset;

return [
    // The name to use throughout the control panel (defaults to "Reporter")
    'displayName' => 'Reports',

    // The asset volume handle where your reports should be saved
    // NOTE: Your reports are publicly accessible if your volume has "Assets in this volume have public URLs" enabled
    'volume' => 'uploads',

    // An optional folder path if you would like to nest the reports in a specific directory
    'folder' => 'resources/reports',

    // An array of reports to produce
    'reports' => [
        'pages' => function () {
            return [
                'name' => 'All Pages',
                'description' => 'A simple export of all the pages on the site.',
                'elementType' => Entry::class,
                'criteria' => [
                    'section' => 'pages'
                ],
                'transformer' => function (Entry $entry) {
                    return [
                        "id" => $entry->id,
                        "title" => $entry->title,
                        "url" => $entry->url,
                    ];
                }
            ];
        },

        'allImages' => function () {
            return [
                'name' => 'Uploaded Images',
                'description' => 'A list of all images uploaded into Craft',
                'elementType' => Asset::class,
                'criteria' => [
                    'kind' => 'image'
                ],
                'transformer' => function (Asset $asset) {
                    return [
                        "id" => $asset->id,
                        "title" => $asset->title,
                        "filename" => $asset->filename,
                    ];
                }
            ];
        },
    ]
];

The exports screen that is displayed when you have not exported any reports yet.

🀝 Contributing

If you would like to contribute to Reporter we tried to make it as easy as possible:

  1. Clone the repo
  2. Run npm i to install the Node dependencies
  3. Run npm start to begin the watch task
  4. Make your changes
  5. Run npm run build to compile and minify the CSS and JS
  6. Submit a PR!
You might also like...
Sign URLs with expiration date to transfer data between projects.

SafeLink Framework-agnostic, lightweight URL signer. You can use SafeLink to transfer data between projects. Sign the url in project 1: use Alfatron\S

A feed parser to normalise typical feed data into Atom-like constructs.

PHP5 Feed parser and normaliser A feed parser to normalise typical feed data into Atom-like constructs. This parser supports / will support: RSS 2.0 p

YCOM Impersonate. Login as selected YCOM user πŸ§™β€β™‚οΈin frontend.

YCOM Impersonate Login as selected YCOM user in frontend. Features: Backend users with admin rights or YCOM[] rights, can be automatically logged in v

Returns a list of Craft/Vue/React route rules and element URLs for ServiceWorkers from Craft entries
Returns a list of Craft/Vue/React route rules and element URLs for ServiceWorkers from Craft entries

Route Map plugin for Craft CMS 3.x Returns a list of Craft/Vue/React route rules and element URLs for ServiceWorkers from Craft entries Related: Route

Gallium is a TALL stack starter kit offering a robust set of options enabling you to get up and running in a snap.

Very short description of the package This is where your description should go. Try and limit it to a paragraph or two, and maybe throw in a mention o

Qase-phpunit - Qase TMS PHPUnit reporter.
Qase-phpunit - Qase TMS PHPUnit reporter.

Qase TMS PHPUnit reporter Publish results simple and easy. How to integrate composer require qase/phpunit-reporter Example of usage The PHPUnit report

Import data from and export data to a range of different file formats and media

Ddeboer Data Import library This library has been renamed to PortPHP and will be deprecated. Please use PortPHP instead. Introduction This PHP library

Run locally to export crypto tx data from crypto exchanges using their api connections, and process into a normalised format.

CryptoCredible The missing crypto-exchange data exporter tldr: run locally to export your crypto tx data from popular exchanges via api connections. E

Import/Export configuration data in Magento 2 via CLI.

ConfigImportExport This module provides new CLI commands for Magento 2 to import/export data in/from core_config_data. This module is inspired by the

A tool that allows to quickly export data from Magento 1 and Magento 2 store and import it back into Magento 2

Simple Import / Export tool A tool that allows to quickly export data from Magento 1 and Magento 2 store and import it back into Magento 2. Table data

Import/Export configuration data in Magento 2 via CLI.

ConfigImportExport This module provides new CLI commands for Magento 2 to import/export data in/from core_config_data. This module is inspired by the

Craft is a flexible, user-friendly CMS for creating custom digital experiences on the web and beyond.

About Craft CMS Craft is a flexible, user-friendly CMS for creating custom digital experiences on the web and beyond. It features: An intuitive, user-

Allows the use of the Vite.js next generation frontend tooling with Craft CMS
Allows the use of the Vite.js next generation frontend tooling with Craft CMS

Vite plugin for Craft CMS 3.x Allows the use of the Vite.js next generation frontend tooling with Craft CMS Related Article: Vite.js Next Generation F

Plugin Vite is the conduit between Craft CMS plugins and Vite, with manifest.json & HMR support

Plugin Vite Related Articles: Vite.js Next Generation Frontend Tooling + Craft CMS A Vite Buildchain for Craft CMS Plugins Requirements Craft CMS 3.0.

Plugin for Craft CMS that makes it easy to interact with the Instagram Basic Display API and Instagram oEmbed.
Plugin for Craft CMS that makes it easy to interact with the Instagram Basic Display API and Instagram oEmbed.

Instagram Basic Display plugin for Craft CMS 3.x This plugin creates endpoints in your Craft install for you to consume the Instagram Basic Display AP

Provides autocompletion for Craft CMS and plugins in Twig templates.
Provides autocompletion for Craft CMS and plugins in Twig templates.

Autocomplete for Craft CMS Provides autocompletion for Craft CMS and plugins in Twig templates. Currently works with PhpStorm only, as VSCode does not

Provides Twig template IDE autocomplete of Craft CMS & plugin variables
Provides Twig template IDE autocomplete of Craft CMS & plugin variables

Autocomplete for Craft CMS 3.x Provides Twig template IDE autocompletion for Craft CMS and plugin/module variables and element types. Works with PhpSt

A BlurHash implementation for Craft CMS.
A BlurHash implementation for Craft CMS.

BlurHash plugin for Craft CMS 3.x Render a BlurHash from a given asset in Craft CMS. A BlurHash is a compact representation of a placeholder for an im

Edit richt text content in Craft CMS using Article by Imperavi.

Article Editor About the plugin This plugin brings the powerful Article Editor from Imperavi to Craft CMS, allowing you to make create beautiful rich

Comments
  • Add console command to run named report

    Add console command to run named report

    Added console command to run reports from the command line with console commands.

    Relevant Basecamp task(s), GitHub Issue(s), or other links

    • Basecamp task: Big Dawg request

    Review URL (If not sandbox)

    n/a

    opened by acres42 1
  • 1.2.0

    1.2.0

    Added

    • Process reports via the CLI using php craft reporter/report --handle=myReport

    Updated

    • Use $hasCpSection to insert Reporter navigation link in the control panel. This ensures it's ordered properly in the sidebar by Craft.
    • Use Craft's baked-in permissions when using $hasCpSection instead of custom one.
    opened by aaronbushnell 1
Releases(1.3.1)
  • 1.3.1(Oct 4, 2022)

  • 1.3.0(Sep 8, 2022)

  • 1.2.0(Mar 2, 2022)

    1.2.0 - 2022-03-01

    {warning} This update modifies the permission behavior of the plugin. If you have given permissions to users or user groups for Reporter you will need to re-enable these under the "General" section of Craft's permission utility for each user/group.

    Added

    • Process reports via the CLI using php craft reporter/report --handle=myReport

    Updated

    • Use $hasCpSection to insert Reporter navigation link in the control panel. This ensures it's ordered properly in the sidebar by Craft.
    • Use Craft's baked-in permissions when using $hasCpSection instead of custom one.
    Source code(tar.gz)
    Source code(zip)
  • 1.1.0(Feb 17, 2022)

  • 1.0.0(Feb 17, 2022)

Owner
TrendyMinds
TrendyMinds is an Indianapolis-based agency working globally that specializes in web, video, advertising and PR.
TrendyMinds
Emoncms is an open-source web application for processing, logging and visualising energy, temperature and other environmental data and is part of the OpenEnergyMonitor project.

Emoncms is an open-source web application for processing, logging and visualising energy, temperature and other environmental data and is part of the OpenEnergyMonitor project.

Emoncms 1.1k Dec 22, 2022
Add instagram feed to page from JSON Data

Custom Instagram Feed Add instagram feed to page from URL ?? Edit - As of 13th April 2021 - This code does not work. Solution is being looked into, ho

tdrayson 21 Aug 29, 2022
A framework for building rich, data-driven applications in PHP and MySQL

Xataface A framework for building rich, data-driven applications in PHP and MySQL License GPL Requirements PHP 5.2 or higher MySQL 5 or higher Install

Steve Hannah 129 Dec 13, 2022
Division, District, Upazila/Thana and Union data of Bangladesh for Laravel application.

Bangladesh Geocode Division, District, Upazila/Thana and Union data of Bangladesh for Laravel application. Migration and seeders are ready. Just publi

Lemon Patwari 8 Nov 30, 2022
A Zabbix 5.4 module to group items under Monitoring -> Latest data per Tag as it used to be with Application grouping in previous versions of Zabbix

zabbix-module-latest-data Written according to Zabbix official documentation https://www.zabbix.com/documentation/current/manual/modules A Zabbix 5.4

BGmot 18 Dec 6, 2022
Demo of using geo data in PHP web applications

phpgeo-demo Demo of using geo data in PHP web applications Goals Demonstrate basic data storage and retrieval methods using Geo specific data Orient t

J Corry 2 Jul 10, 2016
Retrieve MySejahtera App's data from MySejahtera API and show to users via web browser. Written in PHP

MySejahtera-PHP-Web Retrieve MySejahtera App's data from MySejahtera API and show to users via web browser. Written in PHP. Disclaimer This web app is

Sam Sam 3 Oct 21, 2022
Scope your application's data by (sub-)domain.

This package adds domain-scoped content to your application. Content will be available based on the current (sub)-domain allowing "multiple" websites to run off the same code base.

Snoeren Development 2 Jan 3, 2023
The objective of this project is to manage The Website Manga, this site permits to Client to show, read and download Manga with the possibility to react, vote, and save his data.

The objective of this project is to manage The Website Manga, this site permits to Client to show, read and download Manga with the possibility to react, vote, and save his data.

Reda Ennakouri 5 Nov 23, 2022
An Online Movie Booking Website whose data is completely from a database

An Online Movie Booking Website whose data is completely from a database to ensure that it can be implemented in a real time scenario as any change of data needs to be done only in the database using SQL queries and the changes are immediately reflected.

Arunachalam M 7 Apr 13, 2022