Output Formats ============== Record Shelf supports multiple output formats to suit different use cases. Each format has its own advantages and is optimized for specific scenarios. Format Overview --------------- .. list-table:: Format Comparison :widths: 15 20 20 20 25 :header-rows: 1 * - Format - Extension - Best For - Features - File Size * - Excel - ``.xlsx`` - Analysis, Sharing - Multiple sheets, Formatting - Medium * - CSV - ``.csv`` - Data Import, Processing - Universal compatibility - Small * - HTML - ``.html`` - Web viewing, Presentation - Browser compatible - Medium Excel Format (.xlsx) -------------------- The Excel format is the default and most feature-rich output option. Features ~~~~~~~~ **Multiple Worksheets**: - **"Collection" sheet**: Contains all items from all shelves - **Individual shelf sheets**: Separate sheet for each shelf - **Professional formatting**: Headers, borders, and styling **Data Organization**: - Sortable columns - Freeze panes for easy navigation - Auto-sized columns - Consistent formatting **Excel Compatibility**: - Works with Microsoft Excel 2010+ - Compatible with LibreOffice Calc - Google Sheets compatible - Numbers (Mac) compatible Usage ~~~~~ .. code-block:: bash # Default Excel output record-shelf generate --username myuser # Custom Excel filename record-shelf generate --username myuser --output my_collection.xlsx # Excel is the default format record-shelf generate --username myuser --format xlsx Worksheet Structure ~~~~~~~~~~~~~~~~~~~ **Collection Sheet**: - Contains all items from all shelves - Sorted by shelf, then artist, then title - Includes all data columns **Individual Shelf Sheets**: - One sheet per shelf (e.g., "Vinyl", "CD", "Digital") - Contains only items from that specific shelf - Same column structure as main sheet - Sheet names are truncated to 31 characters (Excel limit) Best Practices ~~~~~~~~~~~~~~ - Use for detailed analysis and reporting - Great for sharing with non-technical users - Ideal for presentations and documentation - Perfect for Excel-based workflows CSV Format (.csv) ----------------- The CSV format provides universal compatibility and is ideal for data processing. Features ~~~~~~~~ **Universal Compatibility**: - Opens in any spreadsheet application - Compatible with databases - Scriptable and automatable - Human-readable text format **Data Processing**: - Easy to import into databases - Works with data analysis tools - Compatible with pandas, R, etc. - Small file size **Simplicity**: - Single file with all data - No formatting overhead - Fast generation and loading - Version control friendly Usage ~~~~~ .. code-block:: bash # CSV output record-shelf generate --username myuser --format csv --output collection.csv # CSV with custom filename record-shelf generate --username myuser --format csv --output my_data.csv Data Structure ~~~~~~~~~~~~~~ **Single File**: - All collection data in one file - Header row with column names - One row per collection item - Comma-separated values **Column Order**: 1. shelf 2. artist 3. title 4. label 5. catalog_number 6. format 7. year 8. genre 9. style 10. country 11. discogs_id 12. master_id 13. rating 14. notes Example CSV Output:: shelf,artist,title,label,catalog_number,format,year,genre,style,country,discogs_id,master_id,rating,notes Vinyl,"The Beatles","Abbey Road",Apple,PCS 7088,"Vinyl, LP, Album",1969,Rock,"Pop Rock",UK,123456,78910,, CD,"Pink Floyd","Dark Side of the Moon","Harvest",CDP 7 46001 2,"CD, Album",1990,Rock,"Progressive Rock",UK,234567,89012,, Best Practices ~~~~~~~~~~~~~~ - Use for data analysis and processing - Ideal for importing into databases - Perfect for automation scripts - Great for version control systems - Choose when file size matters HTML Format (.html) ------------------- The HTML format creates web-viewable reports that can be shared easily. Features ~~~~~~~~ **Web Compatibility**: - Opens in any web browser - No additional software required - Mobile-friendly responsive design - Professional table styling **Presentation**: - Clean, readable layout - Sortable columns (with JavaScript) - Professional appearance - Print-friendly styling **Sharing**: - Easy to email or host online - Self-contained file - Works offline - Cross-platform compatible Usage ~~~~~ .. code-block:: bash # HTML output record-shelf generate --username myuser --format html --output collection.html # HTML with custom filename record-shelf generate --username myuser --format html --output my_collection.html HTML Structure ~~~~~~~~~~~~~~ **Document Structure**: - HTML5 compliant - Embedded CSS styling - Responsive table layout - Professional typography **Table Features**: - Header row with column names - Alternating row colors - Hover effects - Responsive breakpoints **Styling**: - Clean, modern design - Professional color scheme - Mobile-responsive layout - Print optimization Example HTML Output: .. code-block:: html
| Shelf | Artist | Title | ...
|---|---|---|
| Vinyl | The Beatles | Abbey Road | ...