This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const largeDataConfig = { | |
maxDepth: 4, // Limit initial rendering depth | |
lazyLoad: true, // Load nodes on demand | |
previewThreshold: 50 // Show preview for arrays > 50 items | |
}; | |
JsonCrack.draw('big-data-view', hugeJson, largeDataConfig); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const options = { | |
theme: 'dark', | |
nodeStyle: { | |
object: { fill: '#4CAF50' }, | |
array: { fill: '#2196F3' }, | |
value: { fill: '#FFC107' } | |
}, | |
direction: 'TB' // Top-to-bottom layout | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { JsonCrack } from 'jsoncrack'; | |
const jsonData = { | |
"user": { | |
"name": "John Doe", | |
"age": 30, | |
"address": { | |
"street": "123 Main St", | |
"city": "Anytown" | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pylightxl as xl | |
# Load the Excel file | |
file_path = "example.xlsx" | |
workbook = xl.readxl(fn=file_path) | |
# PyLightXL does not have built-in metadata extraction, | |
# but you can check basic file-level information | |
print("Excel Metadata Information:") | |
print(f"File Name: {file_path}") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from openpyxl import load_workbook | |
# Load the Excel workbook | |
file_path = "example.xlsx" | |
workbook = load_workbook(file_path) | |
# Access the workbook's metadata | |
properties = workbook.properties | |
# Print metadata information |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pikepdf | |
# Load the PDF file | |
file_path = "example.pdf" | |
output_path = "updated_example.pdf" | |
with pikepdf.Pdf.open(file_path) as pdf: | |
# Access the document metadata | |
metadata = pdf.docinfo |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pikepdf | |
# Load the PDF file | |
file_path = "example.pdf" | |
with pikepdf.Pdf.open(file_path) as pdf: | |
# Access the document metadata | |
metadata = pdf.docinfo | |
# Print each metadata key-value pair | |
print("PDF Metadata:") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from mutagen.easyid3 import EasyID3 | |
audio = EasyID3("example.mp3") | |
audio["artist"] = "New Artist" | |
audio["album"] = "New Album" | |
audio.save() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from mutagen.easyid3 import EasyID3 | |
audio = EasyID3("example.mp3") | |
print(audio["artist"]) # Output: Artist name | |
print(audio["album"]) # Output: Album name |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from tika import parser | |
file_path = "example.pdf" | |
# Parse the file | |
parsed = parser.from_file('media_file.mp4') | |
# Extract metadata | |
print(parsed["metadata"]) |
NewerOlder