<div align="center">
  <img src="https://capsule-render.vercel.app/api?type=waving&color=gradient&height=200&section=header&text=MovaNest%27s%20Code%20Cosmos&fontSize=50&fontAlign=50&fontColor=ffffff&animation=fadeIn" alt="Header Banner" />
  <h1>🎨 Welcome to Movanest: Tools 🚀</h1>
  <img src="https://readme-typing-svg.demolab.com?font=Orbitron&size=32&pause=1000&color=BB86FC&center=true&vCenter=true&width=600&lines=movanest+%7C+Awesome+%26+Tools;Crafting+the+Future+with+Code+and+Flair" alt="Typing SVG" />
</div>

---

<div align="center">
  <h2>👾 About movanest</h2>
  <p><strong>movanest</strong> is a powerful all-in-one npm package developed by <strong>@DanuZz,</strong> bringing multiple essential tools together to simplify workflows, boost productivity, and make modern coding faster and more enjoyable.</p>
  <p>🌐 Visit: <a href="https://movanest.zone.id" target="_blank">movanest.zone.id</a></p>
</div>

---

## 🔧 Installation
```bash
npm install movanest
```

---

### 🎨 MoVa Console Utilities
Enhanced console with colors, rainbows, animations, and ASCII arts (searchable/addable).

**JavaScript:**
```javascript
const { mova } = require('movanest');

// Init (optional)
mova.init();

// Colored print
mova.println('Hello, World!', { color: 'brightGreen' });

// Rainbow animated
mova.println('Rainbow Magic', { color: 'rainbow', animate: true });

// ASCII art search/print
mova.printArt('cat', 'yellow'); // Built-in: cat, dog, heart, rocket, etc.

// Add custom art
mova.addArt('dragon', `
  /\\_/\\
 ( o.o )
  > ^ <
`);
mova.printArt('dragon', 'red');

// From file/string/pipe with colors
mova.fromString('Line 1\nLine 2', { color: 'blue' });

// Options: mova.options.animate = true; mova.options.defaultColor = 'purple';
```
*Note: Dependency-free ANSI/RGB support (named colors: 'red', 'orange', hex '#ff0000'). Rainbow via sine waves. ASCII library searchable by keyword; dynamic additions persist in session. Inputs: fromString/file/pipe with per-line coloring/animation. Debug mode for errors.*

**Python (via subprocess):**
```python
import subprocess
import json

command = '''
node -e "
const { mova } = require('movanest');
mova.println('Hello from Python!', { color: 'cyan' });
mova.printArt('heart', 'pink');
console.log(JSON.stringify({ colors: Object.keys(mova.COLORS) }, null, 2));
"
'''
result = subprocess.run(command, shell=True, capture_output=True, text=True)
print('Output:\n', result.stdout)
if result.stderr:
    print('Error:', result.stderr)
```

*Advanced Python Tip:* For direct integration, consider a Python wrapper library (e.g., using `rich` for native colors), but subprocess enables quick JS-powered features like highlighting in Python scripts.

## Demo 
![mova](https://github.com/dnuzi/mova-npm-media/blob/main/outputs-example.jpeg)
---

## 🎨 Usage Examples

### 1️⃣ Generate Welcome Card
**JavaScript:**
```javascript
const { generateWelcomeCard } = require('movanest');
const fs = require('fs');

const options = {
  background: 'https://example.com/bg.png', // Optional: Custom background URL
  avatar: 'https://example.com/avatar.jpg', // Optional: Avatar URL
  text1: 'Welcome', // Required: Main text
  text2: 'John Doe', // Optional: Subtitle
  text3: 'Member #123', // Optional: Additional text
  text4: 'Joined Today', // Optional: Extra text (up to 5 total)
  text5: 'Have Fun!', // Optional: Final text (limit: 5 texts max)
  width: 800, // Optional: Canvas width
  height: 400, // Optional: Canvas height
  output: 'welcome.png' // Optional: Output filename
};

generateWelcomeCard(options)
  .then(buffer => {
    fs.writeFileSync(options.output, buffer);
    console.log('Welcome card generated!');
  })
  .catch(err => console.error('Error:', err.message));
```
*Note: You can add up to 5 custom texts (text1–text5). Empty or whitespace texts are filtered out. The first 1-2 texts are bolded for emphasis, and font sizes adjust dynamically to fit the canvas.*

**Python (via subprocess):**
```python
import subprocess
import json

command = '''
node -e "
const { generateWelcomeCard } = require('movanest');
const fs = require('fs');
generateWelcomeCard({
  background: 'https://example.com/bg.png',
  avatar: 'https://example.com/avatar.jpg',
  text1: 'Welcome',
  text2: 'John Doe',
  text3: 'Member #123',
  width: 800,
  height: 400
}).then(buffer => {
  fs.writeFileSync('welcome.png', buffer);
  console.log('Welcome card generated!');
});
"
'''

result = subprocess.run(command, shell=True, capture_output=True, text=True)
print(result.stdout)
print(result.stderr if result.stderr else 'Success!')
```

**CLI Usage:**
```bash
node -e "
const { generateWelcomeCard } = require('movanest');
const fs = require('fs');
generateWelcomeCard({
  background: 'https://example.com/bg.png',
  avatar: 'https://example.com/avatar.jpg',
  text1: 'Welcome',
  text2: 'John Doe',
  text3: 'Member #123'
}).then(buffer => fs.writeFileSync('welcome.png', buffer));
"
```
## Demo
![mova](https://github.com/dnuzi/mova-npm-media/blob/main/welcomecard-output.png)
---

---
### 2️⃣ YouTube Search
**JavaScript:**
```javascript
const { search } = require('movanest');
search('DanuZz coding tutorial').then(results => {
  console.log(results);
});
```
**Python:**
```python
import subprocess, json
command = 'node -e "const { search } = require(\'movanest\'); search(\'DanuZz coding tutorial\').then(console.log)"'
result = subprocess.getoutput(command)
data = json.loads(result)
print(data)
```

## Demo 
![mova](https://github.com/dnuzi/mova-npm-media/blob/main/yts-demo.png)
---
### 3️⃣ Download YouTube Audio (MP3) with Random Quality
**JavaScript:**
```javascript
const { ytmp3 } = require('movanest');
ytmp3('https://youtube.com/watch?v=VIDEO_ID').then(console.log);
```
**Python:**
```python
import subprocess, json
command = 'node -e "const { ytmp3 } = require(\'movanest\'); ytmp3(\'https://youtube.com/watch?v=VIDEO_ID\').then(console.log)"'
result = subprocess.getoutput(command)
data = json.loads(result)
print(data)
```

## Demo 
![mova](https://github.com/dnuzi/mova-npm-media/blob/main/ytmp3-demo.png)
---
### 4️⃣ Download YouTube Audio (MP3) with Specific Quality
**JavaScript:**
```javascript
const { ytmp3 } = require('movanest');
ytmp3('https://youtube.com/watch?v=VIDEO_ID', 128).then(console.log);
```
**Python:**
```python
import subprocess, json
command = 'node -e "const { ytmp3 } = require(\'movanest\'); ytmp3(\'https://youtube.com/watch?v=VIDEO_ID\', 128).then(console.log)"'
result = subprocess.getoutput(command)
data = json.loads(result)
print(data)
```

## Demo 
![mova](https://github.com/dnuzi/mova-npm-media/blob/main/ytmp3-demo.png)
---
### 5️⃣ Download YouTube Video (MP4) with Random Quality
**JavaScript:**
```javascript
const { ytmp4 } = require('movanest');
ytmp4('https://youtube.com/watch?v=VIDEO_ID').then(console.log);
```
**Python:**
```python
import subprocess, json
command = 'node -e "const { ytmp4 } = require(\'movanest\'); ytmp4(\'https://youtube.com/watch?v=VIDEO_ID\').then(console.log)"'
result = subprocess.getoutput(command)
data = json.loads(result)
print(data)
```

## Demo 
![mova](https://github.com/dnuzi/mova-npm-media/blob/main/ytmp4-demo.png)
---
### 6️⃣ Download YouTube Video (MP4) with Specific Resolution
**JavaScript:**
```javascript
const { ytmp4 } = require('movanest');
ytmp4('https://youtube.com/watch?v=VIDEO_ID', 360).then(console.log);
```
**Python:**
```python
import subprocess, json
command = 'node -e "const { ytmp4 } = require(\'movanest\'); ytmp4(\'https://youtube.com/watch?v=VIDEO_ID\', 360).then(console.log)"'
result = subprocess.getoutput(command)
data = json.loads(result)
print(data)
```

## Demo 
![mova](https://github.com/dnuzi/mova-npm-media/blob/main/ytmp4-demo.png)
---
### 7️⃣ Save Website to ZIP
**JavaScript:**
```javascript
const { saveweb2zip } = require('movanest');
const options = {
  renameAssets: true, // Optional: Rename assets to avoid conflicts (default: true)
  saveStructure: false, // Optional: Preserve original directory structure (default: false)
  alternativeAlgorithm: false, // Optional: Use alternative copying method for complex sites (default: false)
  mobileVersion: false, // Optional: Fetch mobile-optimized version (default: false)
  outputPath: 'site.zip' // Optional: Auto-save ZIP to file (e.g., './example.zip')
};
saveweb2zip('https://example.com', options)
  .then(result => {
    console.log('Website archived!', result); // Includes downloadUrl, copiedFilesAmount, and savedTo if outputPath used
  })
  .catch(err => console.error('Error:', err.message));
```
*Note: Archives a full website into a ZIP file via a remote copier service. URL is required as the first argument. Polls for completion and handles errors like failed copying. Use outputPath to download directly; otherwise, get a downloadUrl for manual retrieval. Supports up to complex sites with custom options for optimization.*
**Python (via subprocess):**
```python
import subprocess
import json
command = '''
node -e "
const { saveweb2zip } = require('movanest');
saveweb2zip('https://example.com', {
  renameAssets: true,
  saveStructure: false,
  outputPath: 'site.zip'
}).then(result => {
  console.log(JSON.stringify(result));
}).catch(err => console.error('Error:', err.message));
"
'''
result = subprocess.run(command, shell=True, capture_output=True, text=True)
print(result.stdout)
print(result.stderr if result.stderr else 'Success!')
```

## Demo 
![mova](https://github.com/dnuzi/mova-npm-media/blob/main/saveweb2zip.png)
---
### 8️⃣ Instagram Media Downloader
**JavaScript:**
```javascript
const { instadl } = require('movanest');

instadl('https://www.instagram.com/p/ABC123/')  // Replace with a public Instagram post URL
  .then(result => {
    if (result.status) {
      console.log('Instagram Media Info:', result); // Includes type ('image'|'video'), downloadUrl, videoUrl/imageUrl, posterUrl (for videos), and creator
      // Optional: Download the media using the downloadUrl with axios or fetch
    } else {
      console.error('Error:', result.message);
    }
  })
  .catch(err => console.error('Unexpected error:', err.message));
```
*Note: Fetches media details from public Instagram posts (images or videos) using a third-party API. Returns structured info like direct download URLs, media type, and poster (for videos). Handles errors gracefully (e.g., invalid URL, private post). No authentication required—works for reels, posts, and stories if public. Extend with HTTP clients to auto-save files.*

**Python (via subprocess):**
```python
import subprocess
import json

command = '''
node -e "
const { instadl } = require('movanest');
instadl('https://www.instagram.com/p/ABC123/').then(result => {
  console.log(JSON.stringify(result, null, 2));
}).catch(err => console.error('Error:', err.message));
"
'''

result = subprocess.run(command, shell=True, capture_output=True, text=True)
try:
    data = json.loads(result.stdout)
    print('Success:', data)
except json.JSONDecodeError:
    print('Output:', result.stdout)
    if result.stderr:
        print('Error:', result.stderr)
```

## Demo 
![mova](https://github.com/dnuzi/mova-npm-media/blob/main/instagram.png)
---
### 9️⃣ News Scraper

The `movanest` library is a news scraping tool that fetches top stories from 100+ sites across various categories. It respects copyrights by summarizing content only (no full article extraction). Output is structured as: `{ site, title, date (ISO), description, content (summary), url, image }`. Supports formats: `'text'` (for console) or `'json'` (for parsing). Interactive CLI mode available for site selection. Handles per-site errors (e.g., fetch failures) gracefully. For production, implement delays to avoid rate limits.

#### All Categories
```javascript
const { categories } = require('movanest');
console.log(categories);
// Output: ['international', 'tech', 'anime', 'indian', 'middle-east-asia', 'sri-lankan']
```

#### JavaScript Usage Examples

##### 1. Fetch News from a Specific Category (e.g., Tech)
```javascript
const { fetchNews } = require('movanest');

async function getTechNews() {
  const output = await fetchNews({ category: 'tech', numSites: 2, format: 'text' });
  console.log(output);  // Prints summarized text from 2 tech sites
}

getTechNews();
```

##### 2. Fetch News from Another Category (e.g., International)
```javascript
const { fetchNews } = require('movanest');

async function getInternationalNews() {
  const output = await fetchNews({ category: 'international', numSites: 3, format: 'text' });
  console.log(output);  // Prints summarized text from 3 international sites
}

getInternationalNews();
```

##### 3. Fetch News from Anime Category
```javascript
const { fetchNews } = require('movanest');

async function getAnimeNews() {
  const output = await fetchNews({ category: 'anime', numSites: 1, format: 'text' });
  console.log(output);  // Prints summarized text from 1 anime site
}

getAnimeNews();
```

##### 4. Fetch News from Indian Category
```javascript
const { fetchNews } = require('movanest');

async function getIndianNews() {
  const output = await fetchNews({ category: 'indian', numSites: 2, format: 'text' });
  console.log(output);  // Prints summarized text from 2 Indian sites
}

getIndianNews();
```

##### 5. Fetch News from Middle-East-Asia Category
```javascript
const { fetchNews } = require('movanest');

async function getMiddleEastAsiaNews() {
  const output = await fetchNews({ category: 'middle-east-asia', numSites: 2, format: 'text' });
  console.log(output);  // Prints summarized text from 2 Middle East/Asia sites
}

getMiddleEastAsiaNews();
```

##### 6. Fetch News from Sri-Lankan Category
```javascript
const { fetchNews } = require('movanest');

async function getSriLankanNews() {
  const output = await fetchNews({ category: 'sri-lankan', numSites: 1, format: 'text' });
  console.log(output);  // Prints summarized text from 1 Sri Lankan site
}

getSriLankanNews();
```

##### 7. Get Site List for a Category (e.g., Anime)
```javascript
const { getSiteList } = require('movanest');

console.log(getSiteList('anime'));  // Returns array of site keys, e.g., ['site1', 'site2', ...]
```

##### 8. Fetch News from Specific Sites (JSON Format)
```javascript
const { fetchNews } = require('movanest');

fetchNews({ sites: ['bbc', 'cnn'], format: 'json' })
  .then(json => {
    const data = JSON.parse(json);
    console.log(data);  // Parsed JSON array of news objects
  })
  .catch(err => console.error('Fetch error:', err));
```

#### Python Usage Examples (via Subprocess)

##### 1. Fetch News from a Specific Category (e.g., Tech, JSON Format)
```python
import subprocess
import json

command = '''
node -e "
const { fetchNews } = require('movanest');
fetchNews({ category: 'tech', numSites: 2, format: 'json' })
  .then(json => console.log(JSON.stringify(json, null, 2)));
"
'''

result = subprocess.run(command, shell=True, capture_output=True, text=True)
try:
    data = json.loads(result.stdout)
    print('Tech News:', data)  # Parsed JSON list of news objects
except json.JSONDecodeError:
    print('Output:', result.stdout)
    if result.stderr:
        print('Error:', result.stderr)
```

##### 2. Fetch News from International Category
```python
import subprocess
import json

command = '''
node -e "
const { fetchNews } = require('movanest');
fetchNews({ category: 'international', numSites: 3, format: 'json' })
  .then(json => console.log(JSON.stringify(json, null, 2)));
"
'''

result = subprocess.run(command, shell=True, capture_output=True, text=True)
try:
    data = json.loads(result.stdout)
    print('International News:', data)
except json.JSONDecodeError:
    print('Output:', result.stdout)
    if result.stderr:
        print('Error:', result.stderr)
```

##### 3. Fetch News from Anime Category
```python
import subprocess
import json

command = '''
node -e "
const { fetchNews } = require('movanest');
fetchNews({ category: 'anime', numSites: 1, format: 'json' })
  .then(json => console.log(JSON.stringify(json, null, 2)));
"
'''

result = subprocess.run(command, shell=True, capture_output=True, text=True)
try:
    data = json.loads(result.stdout)
    print('Anime News:', data)
except json.JSONDecodeError:
    print('Output:', result.stdout)
    if result.stderr:
        print('Error:', result.stderr)
```

##### 4. Fetch News from Indian Category
```python
import subprocess
import json

command = '''
node -e "
const { fetchNews } = require('movanest');
fetchNews({ category: 'indian', numSites: 2, format: 'json' })
  .then(json => console.log(JSON.stringify(json, null, 2)));
"
'''

result = subprocess.run(command, shell=True, capture_output=True, text=True)
try:
    data = json.loads(result.stdout)
    print('Indian News:', data)
except json.JSONDecodeError:
    print('Output:', result.stdout)
    if result.stderr:
        print('Error:', result.stderr)
```

##### 5. Fetch News from Middle-East-Asia Category
```python
import subprocess
import json

command = '''
node -e "
const { fetchNews } = require('movanest');
fetchNews({ category: 'middle-east-asia', numSites: 2, format: 'json' })
  .then(json => console.log(JSON.stringify(json, null, 2)));
"
'''

result = subprocess.run(command, shell=True, capture_output=True, text=True)
try:
    data = json.loads(result.stdout)
    print('Middle East/Asia News:', data)
except json.JSONDecodeError:
    print('Output:', result.stdout)
    if result.stderr:
        print('Error:', result.stderr)
```

##### 6. Fetch News from Sri-Lankan Category
```python
import subprocess
import json

command = '''
node -e "
const { fetchNews } = require('movanest');
fetchNews({ category: 'sri-lankan', numSites: 1, format: 'json' })
  .then(json => console.log(JSON.stringify(json, null, 2)));
"
'''

result = subprocess.run(command, shell=True, capture_output=True, text=True)
try:
    data = json.loads(result.stdout)
    print('Sri Lankan News:', data)
except json.JSONDecodeError:
    print('Output:', result.stdout)
    if result.stderr:
        print('Error:', result.stderr)
```

##### 7. Get Site List for a Category (e.g., Anime)
```python
import subprocess
import json

command = '''
node -e "
const { getSiteList } = require('movanest');
console.log(JSON.stringify(getSiteList('anime'), null, 2));
"
'''

result = subprocess.run(command, shell=True, capture_output=True, text=True)
try:
    sites = json.loads(result.stdout)
    print('Anime Sites:', sites)  # Parsed JSON array of site keys
except json.JSONDecodeError:
    print('Output:', result.stdout)
    if result.stderr:
        print('Error:', result.stderr)
```

##### 8. Fetch News from Specific Sites (Text Format)
```python
import subprocess

command = '''
node -e "
const { fetchNews } = require('movanest');
fetchNews({ sites: ['bbc', 'cnn'], format: 'text' })
  .then(text => console.log(text));
"
'''

result = subprocess.run(command, shell=True, capture_output=True, text=True)
print('Specific Sites News:', result.stdout)
if result.stderr:
    print('Error:', result.stderr)
```
---
### 🔟 Pinterest Scraper
**JavaScript:**
```javascript
const { pinterest } = require('movanest');
pinterest('funny cats', { pageSize: 10, format: 'json' }) // Replace with your search query
  .then(result => {
    if (result.status) {
      console.log('Pinterest Search Results:', result); // Includes status, query, count, results array (pins with title, description, image, board, username, source, etc.), and next_bookmark for pagination
      // Optional: Use result.results.forEach(pin => console.log(pin.image)) to process images
    } else {
      console.error('Error:', result.error);
    }
  })
  .catch(err => console.error('Unexpected error:', err.message));
```
*Note: Scrapes Pinterest search results for pins via public API endpoints. Returns structured data like pin titles, descriptions, best-quality image URLs, boards, pinners, and source links. Supports pagination (via bookmark), pageSize (up to 25+), and output formats ('json' or 'text'). Filters out non-image pins optionally; handles videos with flags. No auth needed—extend with options for custom User-Agent or deeper pagination.*
**Python (via subprocess):**
```python
import subprocess
import json
command = '''
node -e "
const { pinterest } = require('movanest');
pinterest('funny cats', { pageSize: 10, format: 'json' }).then(result => {
  console.log(JSON.stringify(result, null, 2));
}).catch(err => console.error('Error:', err.message));
"
'''
result = subprocess.run(command, shell=True, capture_output=True, text=True)
try:
    data = json.loads(result.stdout)
    print('Success:', data)
except json.JSONDecodeError:
    print('Output:', result.stdout)
    if result.stderr:
        print('Error:', result.stderr)
```

## Demo 
![mova](https://github.com/dnuzi/mova-npm-media/blob/main/pinterest.png)
---
### 1️⃣1️⃣ CLI Usage (Updated with News & Mova)

**Command-Line Examples:**
```bash
# Generate a welcome card (default subcommand)
movanest --text1 "John Doe" --text2 "Welcome!" --output welcome.png

# Download Instagram media
movanest instadl https://www.instagram.com/p/ABC123/ --output ./downloads

# Download YouTube audio
movanest ytmp3 https://youtube.com/watch?v=xyz --quality 192 --output song.mp3

# Download YouTube video
movanest ytmp4 https://youtube.com/watch?v=xyz --quality 720 --output video.mp4

# Search YouTube videos
movanest search "nodejs tips"

# Archive website to ZIP
movanest saveweb2zip https://example.com --output example.zip --mobile-version

# Fetch news interactively (select sites from category)
movanest news international

# Fetch top N from category (non-interactive)
movanest news tech --num-sites 3 --format json --output news.json

# Fetch specific sites
movanest news bbc,cnn

# Enhanced colored console output (Mova)
movanest mova "Hello World" --color green --animate
movanest mova art cat --color yellow
movanest mova file log.txt --rainbow
echo "Piped text" | movanest mova
movanest mova art rocket --rainbow --animate --duration 20 --speed 10

# Full help
movanest --help
```

*Note: Install globally with `npm install -g movanest` to use CLI commands. Supports all package features via subcommands. News mode: Interactive (lists sites, prompts e.g., '1,3' or 'top5') or direct (comma-separated sites). Outputs to console (text/JSON) or files (--output for JSON). Flags: --num-sites <N>, --format <text|json>, --non-interactive. Handles downloads via streams for MP3/MP4/IG. For searches, shows top 5 results. Mova mode: Supports text printing with colors (named/hex), rainbow/animation effects, ASCII art (e.g., cat, rocket), file/pipe input. Flags: --color <name|hex>, --rainbow, --animate, --duration <n>, --speed <n>. Works cross-platform—Node.js required. Extend with more flags as needed.*

**Python (via subprocess):**
```python
import subprocess

# Example: Run YouTube MP3 CLI
command = 'movanest ytmp3 https://youtube.com/watch?v=xyz --quality 128 --output song.mp3'
result = subprocess.run(command, shell=True, capture_output=True, text=True)
print('Output:', result.stdout)
if result.stderr:
    print('Error:', result.stderr)

# Example: Run news CLI (interactive needs manual input; use non-interactive)
command = 'movanest news tech --non-interactive --num-sites 1'
result = subprocess.run(command, shell=True, capture_output=True, text=True)
print('News Output:', result.stdout)

# Example: Run transcript CLI
command = 'movanest transcript https://youtube.com/watch?v=abc'
result = subprocess.run(command, shell=True, capture_output=True, text=True)
print('Transcript:', result.stdout)

# Example: Run Mova CLI
command = 'movanest mova "Python rocks!" --color blue --rainbow'
result = subprocess.run(command, shell=True, capture_output=True, text=True)
print('Mova Output:', result.stdout)
```

---
## ⚡ Features
- 📱 Generate customizable welcome cards with avatars, backgrounds, and dynamic text fitting
- Download YouTube audio in multiple qualities (32kbps – 320kbps)
- Download YouTube video in multiple resolutions (144p – 1440p)
- Fetch transcripts and AI summaries of YouTube videos
- Search YouTube programmatically
- CLI and module support for seamless integration
---
## 🛠️ Developed By
<div align="center">
  <p><strong>DanuZz</strong> | Full-Stack Developer & Bot Maestro</p>
  <p>🌍 Location: Ratnapura/Sabaragamuwa/Sri Lanka</p>
  <p>🌱 Exploring: AI, Web3, Next.js, immersive UI/UX</p>
  <p>🎯 Goal: Build code that inspires and captivates</p>
</div>

---

<div align="center">

![Header GIF](https://github.com/dnuzi/mova-npm-media/blob/main/mova.gif) <!-- Replace with your project-themed animated GIF -->
