DPaste 使用文档

Special Paste Formats

Special paste formats are one of DPaste's powerful features, providing 50+ format conversion capabilities. Whether you need to process JSON, convert naming styles, handle URLs, convert number bases, or format SQL, you can complete it quickly.

Feature Overview

Core features of special paste formats:

  • 50+ Conversion Formats: Covering JSON, text, naming styles, URLs, numbers, timestamps, SQL, and many other types
  • Smart Recognition: Automatically recommend suitable conversion formats based on content type
  • Flexible Configuration: Can enable or disable specific formats, customize menu display
  • Quick Operations: Support right-click menu for quick access

Main Format Categories

JSON Processing

  • JSON Formatting: Format compressed JSON into readable multi-line format
  • JSON Compression: Compress formatted JSON into a single line
  • JSON Compression and Escape: Compress JSON and escape special characters
  • JSON Unescape: Remove escape characters from JSON
  • JSON Keys: Extract all key names from JSON
  • JSON Array: Convert content to JSON array format
  • String JSON Array: Convert content to string-format JSON array

Text Conversion

  • URL Encoding: Encode text to URL-safe format
  • URL Decoding: Decode URL-encoded text
  • Extract URL Parameters as JSON: Extract parameters from URL and convert to JSON format

Naming Style Conversion

Support conversion between multiple naming styles:

  • camelCase: Camel case naming (e.g., userName)
  • snake_case: Snake case naming (e.g., user_name)
  • PascalCase: Pascal case naming (e.g., UserName)
  • kebab-case: Kebab case naming (e.g., user-name)
  • And other common naming styles

Number Base Conversion

  • Convert to Hexadecimal: Convert numbers to hexadecimal
  • Convert to Octal: Convert numbers to octal
  • Convert to Binary: Convert numbers to binary
  • Hexadecimal to Decimal: Convert hexadecimal numbers to decimal
  • Binary to Decimal: Convert binary numbers to decimal

Timestamp Conversion

  • Timestamp to Date Time: Convert timestamp to readable date-time format
  • Date Time to Timestamp: Convert date-time to timestamp (seconds or milliseconds)

SQL Processing

  • SQL Formatting: Format compressed SQL into readable multi-line format
  • SQL Compression: Compress formatted SQL into a single line

Image Format Conversion

  • JPEG: Convert images to JPEG format
  • PNG: Convert images to PNG format

Usage

Basic Operations

Use via Right-click Menu:
  1. Open DPaste clipboard history (⌘ + Shift + V)
  2. Find the record you need to convert
  3. Right-click the record
  4. Select "Paste as..." or "Special Paste"
  5. Select the desired format from the submenu
  6. Content will be pasted in the converted format to the target location
Example: Format JSON
  1. Copy a compressed JSON: {"name":"DPaste","version":"1.0","features":["clipboard","ocr"]}
  2. Find the record in clipboard history
  3. Right-click and select "Paste as..." → "JSON Formatting"
  4. After pasting, you'll get formatted JSON:
{
  "name": "DPaste",
  "version": "1.0",
  "features": [
    "clipboard",
    "ocr"
  ]
}

Configuring Special Paste Formats

You can manage special paste formats in settings:

  1. Open DPaste settings
  2. Go to "Special Paste" settings
  3. View all available format lists
  4. Enable or disable specific formats
  5. Adjust format display order
Configuration Options:
  • Enable/Disable Formats: Control which formats appear in the menu
  • Sorting: Adjust the display order of formats in the menu
  • Grouping: Formats are automatically grouped by category

Use Cases

JSON Data Processing

Scenario One: Format Compressed JSON

JSON from APIs is usually in compressed format and hard to read. Using "JSON Formatting" can quickly beautify it:

Input: {"name":"DPaste","version":"1.0"}
Output:
{
  "name": "DPaste",
  "version": "1.0"
}
Scenario Two: Extract JSON Keys

Need to quickly get all key names from a JSON object:

Input: {"name":"DPaste","version":"1.0","features":["clipboard"]}
Output: name, version, features

Naming Style Conversion

Scenario: Copied a variable name from code, need to convert to a different naming style.
Input: user_name
Convert to camelCase: userName
Convert to PascalCase: UserName
Convert to kebab-case: user-name

URL Processing

Scenario One: URL Encoding

Need to encode text containing special characters to URL-safe format:

Input: Hello World!
Output: Hello%20World%21
Scenario Two: Extract URL Parameters

Extract parameters from URL and convert to JSON:

Input: https://example.com?name=DPaste&version=1.0
Output: {"name":"DPaste","version":"1.0"}

Number Base Conversion

Scenario: Need to view different base representations of numbers in programming.
Input: 255
Convert to hexadecimal: FF
Convert to octal: 377
Convert to binary: 11111111

SQL Formatting

Scenario: SQL copied from database tools is in compressed format, need to format for readability.
Input: SELECT * FROM users WHERE id=1 AND status='active'
Output:
SELECT *
FROM users
WHERE id = 1
  AND status = 'active'

Advanced Features

Smart Format Recommendation

DPaste intelligently recommends suitable conversion formats based on content type:

  • JSON Content: Recommend JSON-related formats
  • URL Content: Recommend URL encoding/decoding, parameter extraction
  • Number Content: Recommend base conversion
  • SQL Content: Recommend SQL formatting/compression
  • Code Variables: Recommend naming style conversion

Batch Processing

With continuous paste mode, you can batch process multiple contents:

  1. Copy multiple contents that need conversion
  2. Enter continuous paste mode (Option + V)
  3. Apply the same format conversion to each content
  4. Quickly complete batch processing

Notes

Format Compatibility

Some format conversions may not apply to all content types:

  • JSON Formats: Only applicable to valid JSON content
  • SQL Formats: Only applicable to valid SQL statements
  • Number Conversion: Only applicable to number content

If content doesn't meet format requirements, conversion may fail or produce unexpected results.

Data Loss

Some conversions may cause data loss:

  • JSON Keys Extraction: Only keeps key names, loses values
  • Compressed Formats: Loses all formatting and whitespace characters

Please confirm it meets your needs before conversion.

Performance Considerations

Some complex conversions (such as large JSON formatting) may take some time, please be patient.