i18n/hi/skills/snapdom/SKILL.md
--- नाम: स्नैपडोम विवरण: स्नैपडॉम एक तेज़, सटीक डोम-टू-इमेज कैप्चर टूल है जो HTML तत्वों को स्केलेबल एसवीजी छवियों में परिवर्तित करता है। HTML तत्वों को कैप्चर करने, DOM को छवियों (SVG, PNG, JPG, WebP) में परिवर्तित करने, शैलियों, फ़ॉन्ट और छद्म तत्वों को संरक्षित करने के लिए उपयोग करें। --- #SnapDOMSkill HTML तत्वों को स्केलेबल एसवीजी या रैस्टर छवि प्रारूपों में परिवर्तित करने के लिए तेज़, निर्भरता-मुक्त DOM-टू-इमेज कैप्चर लाइब्रेरी। ## इस कौशल का उपयोग कब करना है जब आपको आवश्यकता हो तब Sna
npx skillsauth add 2025emma/vibe-coding-cn i18n/hi/skills/snapdomInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
#SnapDOMSkill
HTML तत्वों को स्केलेबल एसवीजी या रैस्टर छवि प्रारूपों में परिवर्तित करने के लिए तेज़, निर्भरता-मुक्त DOM-टू-इमेज कैप्चर लाइब्रेरी।
जब आपको आवश्यकता हो तब SnapDOM का उपयोग करें:
###प्रदर्शन
-समान मूल आईफ्रेम समर्थन
npm install @zumer/snapdom
# or
yarn add @zumer/snapdom
<script type="module">
import { snapdom } from "https://unpkg.com/@zumer/snapdom/dist/snapdom.mjs";
</script>
<script src="https://unpkg.com/@zumer/snapdom/dist/snapdom.umd.js"></script>
// Create reusable capture object
const result = await snapdom(document.querySelector('#target'));
// Export to different formats
const png = await result.toPng();
const jpg = await result.toJpg();
const svg = await result.toSvg();
const canvas = await result.toCanvas();
const blob = await result.toBlob();
// Use the result
document.body.appendChild(png);
// Direct export without intermediate object
const png = await snapdom.toPng(document.querySelector('#target'));
const svg = await snapdom.toSvg(element);
// Automatically download as file
await snapdom.download(element, 'screenshot.png');
await snapdom.download(element, 'image.svg');
const result = await snapdom(element, {
scale: 2, // 2x resolution
width: 800, // Custom width
height: 600, // Custom height
embedFonts: true, // Include @font-face
exclude: '.no-capture', // Hide elements
useProxy: true, // Enable CORS proxy
straighten: true, // Remove transforms
noShadows: false // Keep shadows
});
const png = await result.toPng({ quality: 0.95 });
| विकल्प | प्रकार | उद्देश्य |
|------|------|------|
| 'स्केल' | संख्या | स्केल आउटपुट (जैसे, 2x रिज़ॉल्यूशन के लिए 2) |
| 'चौड़ाई' | संख्या | पिक्सेल में कस्टम आउटपुट चौड़ाई |
| 'ऊंचाई' | संख्या | पिक्सेल में कस्टम आउटपुट ऊंचाई |
| एम्बेडफ़ॉन्ट्स | बूलियन | गैर-आइकन @ फ़ॉन्ट-फेस नियम शामिल करें |
| प्रॉक्सी का प्रयोग करें | स्ट्रिंग|बूलियन | CORS प्रॉक्सी सक्षम करें (डिफ़ॉल्ट के लिए URL या सत्य) |
| 'बहिष्कृत' | स्ट्रिंग | तत्वों को छिपाने के लिए सीएसएस चयनकर्ता |
| 'सीधा करो' | बूलियन | ट्रांसलेशन/रोटेट ट्रांसफॉर्म हटाएं |
| नोशैडोज़ | बूलियन | पट्टी छाया प्रभाव |
// Capture at different scales
const mobile = await snapdom.toPng(element, { scale: 1 });
const tablet = await snapdom.toPng(element, { scale: 1.5 });
const desktop = await snapdom.toPng(element, { scale: 2 });
// Hide specific elements from capture
const png = await snapdom.toPng(element, {
exclude: '.controls, .watermark, [data-no-capture]'
});
// Capture with specific size
const result = await snapdom(element, {
width: 1200,
height: 630 // Standard social media size
});
// Fallback for CORS-blocked resources
const png = await snapdom.toPng(element, {
useProxy: 'https://cors.example.com/?' // Custom proxy
});
// Extend with custom exporters
snapdom.plugins([pluginFactory, { colorOverlay: true }]);
// Hook into lifecycle
defineExports(context) {
return {
pdf: async (ctx, opts) => { /* generate PDF */ }
};
}
// Lifecycle hooks available:
// beforeSnap → beforeClone → afterClone →
// beforeRender → beforeExport → afterExport
SnapDOM html2canvas से काफी बेहतर प्रदर्शन करता है:
| परिदृश्य | स्नैपडॉम | html2कैनवास | सुधार | |---|---|---|---| | छोटा (200×100) | 1.6ms | 68ms | 42x तेज | | मध्यम (800×600) | 12 एमएस | 280 एमएस | 23 गुना तेज | | बड़ा (4000×2000) | 171 एमएस | 1,800 एमएस | 10 गुना तेज |
git clone https://github.com/zumerlab/snapdom.git
cd snapdom
npm install
npm run compile
npm test
स्वचालन के लिए यहां सहायक स्क्रिप्ट जोड़ें, उदाहरण:
बैच-स्क्रीनशॉट.जेएस - एकाधिक तत्वों को कैप्चर करेंpdf-export.js - स्नैपशॉट को पीडीएफ में बदलेंतुलना-आउटपुट.जेएस - एसवीजी बनाम पीएनजी गुणवत्ता की तुलना करेंटेम्पलेट और उदाहरण जोड़ें:
चौड़ाई/ऊंचाई के बजाय स्केल का उपयोग करेंएम्बेडफ़ॉन्ट: सत्य सेट करेंuseProxy: true का उपयोग करेंगुणवत्ता: 0.95 का उपयोग करेंसीधा करें: गलत आज़माएँएम्बेडफ़ॉन्ट: सत्य सेट करेंuseProxy: true सक्षम करेंnoShadows: true का उपयोग करेंtools
# twscrape Python library for scraping Twitter/X data using GraphQL API with account rotation and session management. ## When to use this skill Use this skill when: - Working with Twitter/X data extraction and scraping - Need to bypass Twitter API limitations with account rotation - Building social media monitoring or analytics tools - Extracting tweets, user profiles, followers, trends from Twitter/X - Need async/parallel scraping operations for large-scale data collection - Looking for alte
tools
TimescaleDB - PostgreSQL extension for high-performance time-series and event data analytics, hypertables, continuous aggregates, compression, and real-time analytics
development
Telegram 生态开发全栈指南 - 涵盖 Bot API、Mini Apps (Web Apps)、MTProto 客户端开发。包括消息处理、支付、内联模式、Webhook、认证、存储、传感器 API 等完整开发资源。
tools
snapDOM is a fast, accurate DOM-to-image capture tool that converts HTML elements into scalable SVG images. Use for capturing HTML elements, converting DOM to images (SVG, PNG, JPG, WebP), preserving styles, fonts, and pseudo-elements.