Skip to content

Instantly share code, notes, and snippets.

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Basic jsTree from HTML</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jstree/3.3.12/themes/default/style.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jstree/3.3.12/jstree.min.js"></script>
</head>
<body>
@documentprocessing
documentprocessing / handling-large-data-with-json-crack.js
Created April 30, 2025 02:43
Handling Large Data with JSON Crack
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);
@documentprocessing
documentprocessing / custom-styling-json-crack.js
Created April 30, 2025 02:39
Custom Styling with JSON Crack
const options = {
theme: 'dark',
nodeStyle: {
object: { fill: '#4CAF50' },
array: { fill: '#2196F3' },
value: { fill: '#FFC107' }
},
direction: 'TB' // Top-to-bottom layout
};
@documentprocessing
documentprocessing / json-visualization-with-json-crack.js
Created April 30, 2025 02:28
Basic JSON Visualization with JSON Crack
import { JsonCrack } from 'jsoncrack';
const jsonData = {
"user": {
"name": "John Doe",
"age": 30,
"address": {
"street": "123 Main St",
"city": "Anytown"
}
@documentprocessing
documentprocessing / read-metadata-using-pylightxl-api-python.py
Created January 29, 2025 12:22
Read Metadata Information from Excel XLSX file with PyLightXL API
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}")
@documentprocessing
documentprocessing / read-metadata-from-excel-using-openpyxl.py
Created January 22, 2025 16:56
Read metadata information from Excel using OpenPyXL
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
@documentprocessing
documentprocessing / write-pdf-metadata-with-pikepdf-api-python.py
Created January 14, 2025 15:02
Write PDF metadata with PikePDF API for Python
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
@documentprocessing
documentprocessing / read-pdf-metadata-with-pikepdf-python.py
Created January 14, 2025 14:54
Read PDF metadata with PikePDF API
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:")
@documentprocessing
documentprocessing / write-metadata-to-audio-file-python-mutagen.py
Created January 9, 2025 05:17
Write Metadata Information to Audio File in Python
from mutagen.easyid3 import EasyID3
audio = EasyID3("example.mp3")
audio["artist"] = "New Artist"
audio["album"] = "New Album"
audio.save()
@documentprocessing
documentprocessing / read-metadata-of-audio-files-mutagen-python-api.py
Created January 8, 2025 14:45
Reading Metadata of Audio Files in Python
from mutagen.easyid3 import EasyID3
audio = EasyID3("example.mp3")
print(audio["artist"]) # Output: Artist name
print(audio["album"]) # Output: Album name