Skip to content

sourcegraph/sourcegraph-search-export

Repository files navigation

Sourcegraph search results CSV export extension

master build status codecov

⚠️ Deprecation notice

Sourcegraph extensions have been deprecated with the September 2022 Sourcegraph release. Learn more.

Starting with the September 2022 release of Sourcegraph, search export is a core part of the product.

The repo and the docs below are kept to support older Sourcegraph versions.

Description

A Sourcegraph extension to export a list of search results to CSV.

🗃️ Source code

➕ Add to Sourcegraph (for self-hosted instances: visit the Extensions page)

Features

  • Adds a Sourcegraph: Export search results button on top of the Sourcegraph search results pages image

Usage

  1. Enable the extension at https://sourcegraph.com/extensions/sourcegraph/search-export or on the Extensions page of your self-hosted instance.
  2. Perform a search query on Sourcegraph.
  3. Press the Sourcegraph: Export search results button above the list of search results. (Note: This may take a while for large result sets. The extension is not optimized for streaming or paginating results.)
  4. Click Download CSV from the pop-up window to download the CSV file. image

Configuration

The extension can be configured through JSON in user, organization or global settings.

{
    // The maximum length of the preview for each match ("Search matches" column).
    // By default, the limit is 200.
    "searchExport.maxMatchContentLength": 50
}

Development

  1. Run yarn && yarn run serve and keep the Parcel bundler process running.
  2. Sideload the extension (at the URL http://localhost:1234 by default) on your Sourcegraph instance or Sourcegraph.com.

When you edit a source file in your editor, Parcel will recompile the extension. Reload the Sourcegraph web page to use run the updated extension.

Release

Run src extension publish using the Sourcegraph src CLI.

About

Export search results as CSV (Sourcegraph extension)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published