npm package: @indianappguy/slidesdownloader
Description: Download SlideShare presentations as PDF, PPTX, or ZIP from your terminal
Author: SlideDownloader
Latest version: 1.0.1

# SlideDownloader CLI

> Download SlideShare presentations as PDF, PPTX, or ZIP directly from your terminal

[![npm version](https://badge.fury.io/js/slidesdownloader.svg)](https://www.npmjs.com/package/slidesdownloader)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

## Features

- **Fast**: Download presentations in seconds
- **Multiple Formats**: Export as PDF, PowerPoint (PPTX), or ZIP
- **Easy to Use**: Simple command-line interface
- **Interactive Mode**: Guided prompts for beginners
- **Developer-Friendly**: Perfect for automation and scripting

## Installation

```bash
npm install -g slidesdownloader
```

Or using Yarn:

```bash
yarn global add slidesdownloader
```

## Usage

### Basic Usage

Download a presentation as PDF (default):

```bash
slidesdownloader https://www.slideshare.net/user/presentation-name
```

### Specify Output Format

Download as PowerPoint:

```bash
slidesdownloader https://www.slideshare.net/user/presentation -f pptx
```

Download as ZIP (individual images):

```bash
slidesdownloader https://www.slideshare.net/user/presentation -f zip
```

### Custom Output Path

```bash
slidesdownloader https://www.slideshare.net/user/presentation -o my-slides.pdf
```

### Interactive Mode

For a guided experience:

```bash
slidesdownloader -i
```

Or simply:

```bash
slidesdownloader
```

## Options

| Option | Alias | Description | Default |
|--------|-------|-------------|---------|
| `--format` | `-f` | Output format: `pdf`, `pptx`, `zip` | `pdf` |
| `--output` | `-o` | Output file path | Auto-generated |
| `--interactive` | `-i` | Interactive mode with prompts | `false` |
| `--help` | `-h` | Show help | |
| `--version` | `-V` | Show version number | |

## Output Formats

| Format | Description | Best For |
|--------|-------------|----------|
| **PDF** | Portable Document Format | Viewing, sharing, printing |
| **PPTX** | Microsoft PowerPoint | Editing, presentations |
| **ZIP** | Individual slide images | Custom processing, archiving |

## Examples

```bash
# Download as PDF
slidesdownloader https://www.slideshare.net/nasa/journey-to-mars

# Download as editable PowerPoint
slidesdownloader https://www.slideshare.net/nasa/journey-to-mars -f pptx

# Download slides as images
slidesdownloader https://www.slideshare.net/nasa/journey-to-mars -f zip

# Save to specific location
slidesdownloader https://www.slideshare.net/nasa/journey-to-mars -o ~/Downloads/mars.pdf

# Interactive mode for guided download
slidesdownloader -i
```

## Requirements

- Node.js 18.0.0 or higher
- npm or Yarn

## Configuration

You can customize the API endpoint using environment variables:

```bash
export SLIDEDOWNLOADER_API_URL=https://your-api.com
```

## Troubleshooting

### "Presentation not found" error

- Make sure the URL is correct and the presentation is public
- Some presentations may be private or deleted

### Connection errors

- Check your internet connection
- The SlideShare website may be temporarily unavailable

### Slow downloads

- Large presentations with many slides may take longer
- Consider using the ZIP format for faster downloads

## Related

- [SlideDownloader Web](https://slidedownloader.com) - Web-based downloader
- [MagicSlides CLI](https://npmjs.com/package/magicslides) - Create AI presentations from terminal

## License

MIT License - see [LICENSE](LICENSE) for details.

## Development

### Setup

```bash
# Clone the repository
git clone https://github.com/yourusername/slidesdownloader-cli.git
cd slidesdownloader-cli

# Install dependencies
yarn install

# Build the project
yarn build

# Link for local testing
yarn link
```

### Testing

```bash
# Run all tests
yarn test

# Run tests with coverage
yarn test:coverage

# Run CLI integration tests
yarn test:cli

# Run tests in watch mode
yarn test:watch
```

See [TESTING.md](TESTING.md) for detailed testing information.

### Scripts

| Script | Description |
|--------|-------------|
| `yarn build` | Compile TypeScript to JavaScript |
| `yarn dev` | Watch mode for development |
| `yarn test` | Run unit tests |
| `yarn test:coverage` | Run tests with coverage report |
| `yarn test:cli` | Run CLI integration tests |
| `yarn lint` | Run ESLint |
| `yarn format` | Format code with Prettier |

## Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

### Development Process

1. Fork the repository
2. Create a feature branch (`git checkout -b feature/amazing-feature`)
3. Make your changes
4. Run tests (`yarn test`)
5. Commit your changes (`git commit -m 'Add amazing feature'`)
6. Push to the branch (`git push origin feature/amazing-feature`)
7. Open a Pull Request

---

Made with love by [SlideDownloader](https://slidedownloader.com)