movanest
v2.0.0
Published
MovaNest — Build anything, do everything. By DanuZz.
Maintainers
Readme
🔧 Installation
npm install movanest🎨 MoVa Console Utilities
Enhanced console with colors, rainbows, animations, and ASCII arts (searchable/addable).
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):
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
🎨 Usage Examples
1️⃣ Generate Welcome Card
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):
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:
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
2️⃣ YouTube Search
JavaScript:
const { search } = require('movanest');
search('DanuZz coding tutorial').then(results => {
console.log(results);
});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
3️⃣ Download YouTube Audio (MP3) with Random Quality
JavaScript:
const { ytmp3 } = require('movanest');
ytmp3('https://youtube.com/watch?v=VIDEO_ID').then(console.log);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
4️⃣ Download YouTube Audio (MP3) with Specific Quality
JavaScript:
const { ytmp3 } = require('movanest');
ytmp3('https://youtube.com/watch?v=VIDEO_ID', 128).then(console.log);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
5️⃣ Download YouTube Video (MP4) with Random Quality
JavaScript:
const { ytmp4 } = require('movanest');
ytmp4('https://youtube.com/watch?v=VIDEO_ID').then(console.log);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
6️⃣ Download YouTube Video (MP4) with Specific Resolution
JavaScript:
const { ytmp4 } = require('movanest');
ytmp4('https://youtube.com/watch?v=VIDEO_ID', 360).then(console.log);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
7️⃣ Save Website to ZIP
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):
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
8️⃣ Instagram Media Downloader
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):
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
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
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)
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)
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
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
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
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
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)
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)
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)
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
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
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
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
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
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)
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)
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:
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):
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
1️⃣1️⃣ CLI Usage (Updated with News & Mova)
Command-Line Examples:
# 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 --helpNote: 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 , --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 , --speed . Works cross-platform—Node.js required. Extend with more flags as needed.
Python (via subprocess):
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








