Nesstar Exporter is a Python package designed to facilitate the export of metadata from Nesstar files. This package allows users to extract DDI (Data Documentation Initiative) files, data files in various formats, and RDF (Resource Description Framework) from Nesstar Publisher.
-
Core Export Functionality:
- Export DDI files from Nesstar Publisher
- Export data files in formats such as SPSS, Stata, and Delimited Text
- Export RDF metadata
- Generate comprehensive
info.jsonwith dataset metadata
-
Command Line Tools:
export-nesstar.py- General-purpose export utility with ZIP packagingcreate-metadata-editor-package.py- Specialized tool for metadata editors
-
Advanced Options:
- JSON-based configuration system
- Automatic directory creation
- Verbose logging and quiet modes
- Flexible output formats and structures
To install the required dependencies, navigate to the project directory and run:
pip install -r requirements.txt
To use the Nesstar Exporter, you can create an instance of the NesstarExporter class and call the export_all method to perform the entire export process.
from src.exporter import NesstarExporter
exporter = NesstarExporter(nesstar_file='path/to/your/file.Nesstar', output_folder='output/directory',nesstar_export_exe="/path/to/nesstar-exporter-exe")
exporter.export_all()Python notebook: see usage-example.ipynb
This package includes two powerful command-line utilities for different use cases:
A general-purpose CLI tool for exporting Nesstar files with extensive customization options.
Quick Start:
# Basic export
python export-nesstar.py myfile.Nesstar
# Export with ZIP package
python export-nesstar.py myfile.Nesstar --zip-package
# Custom output folder and format
python export-nesstar.py myfile.Nesstar output-folder --format SPSS_SAV --zip-packageKey Features:
- Multiple export formats (SPSS, Stata, Delimited Text)
- Metadata-only or full data exports
- Automatic ZIP packaging
- JSON configuration support
- Comprehensive logging options
Documentation: See CLI-README.md for complete usage guide
A specialized tool for exporting Nesstar files to Metadata Editor ZIP Package.
Quick Start:
# Create metadata editor package
python create-metadata-editor-package.py myfile.Nesstar
# Custom output location
python create-metadata-editor-package.py myfile.Nesstar my-package-name
# Create ZIP and clean up folder
python create-metadata-editor-package.py myfile.Nesstar --cleanupKey Features:
- Automatic CSV conversion from tab-delimited files
- Organized folder structure with
documentation/subfolder - Metadata-editor compatible file formats
- Ready-to-use ZIP packages
- DDI and RDF metadata preservation
- Optional cleanup (delete folder after ZIP creation)
What it creates:
info.json- Dataset metadata and file inventory*.xml- DDI documentation*.rdf- RDF metadatadocumentation/*.csv- Data files in CSV format
Documentation: See METADATA-EDITOR-README.md for detailed information
Both utilities use a shared config.json file for common settings:
{
"nesstar_export_exe": "path/to/NesstarExporter.exe",
"create_subdirectories": true,
"verbose_logging": false
}Contributions are welcome! Please feel free to submit a pull request or open an issue for any enhancements or bug fixes.
This project is licensed under the MIT License - see the LICENSE file for details.