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
//DESCRIPTION:Alerts when ungrouping if there are custom Object Export Options | |
/* ============================================================================ | |
Blocks InDesign's native Ungroup command whenever the user has selected | |
one or more groups that have custom Object Export Options applied | |
(Alt/Actual Text, Decorative flag, or explicit PDF Tag). | |
The script presents an interactive dialog allowing the user to: | |
• Review each offending group and its custom export data. | |
• Restore default export options for the current group. |
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
//DESCRIPTION:Alert when opening or packaging a document if it uses Adobe Fonts. | |
//by Jorge Hernández Valiñani _ | |
#target "InDesign" | |
#targetengine "alertAdobeFonts" | |
(function () { | |
// Localization strings for alerts | |
var STR_ALERT_LINE1 = "usa fuentes no recopilables:"; | |
var STR_ALERT_SUFFIX = "Al empaquetar un documento, asegúrate de copiarlas a mano."; |
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
#!/usr/bin/env python3 | |
import sys, os, struct | |
def parse_appledouble(ad_path): | |
""" | |
Open an AppleDouble file and return (file_type, creator_code). | |
""" | |
# Auxiliary function to decode 8 bytes → (ft, cr) | |
def decode_codes(data): |
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
#!/usr/bin/env bash | |
set -e | |
: ${run_dir:="${HOME}/Library/Application Support/CUSTOM_DIRECTORY"} | |
# Find absolute path to script | |
script_path=$(cd "${0%/*}" 2>/dev/null; echo "$PWD"/"${0##*/}") | |
if [ -n "$(readlink "$script_path")" ]; then | |
script_path=$(readlink "$script_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
#!/bin/zsh | |
# Render multiple Blender documents and their scenes from the command line. | |
# Only scenes named with the suffix "*" will be rendered. | |
# | |
# Author: Jorge Hernández Valiñani | |
# Check dependencies | |
: "${blender:="/Applications/Blender.app/Contents/MacOS/Blender"}" |
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 sqlite3 | |
import os | |
# Connect to the SQLite database | |
db_path = "dash snippets.dash" # Path to the SQLite database file | |
conn = sqlite3.connect(db_path) | |
cursor = conn.cursor() | |
# Query to retrieve records from the "snippets" table | |
cursor.execute("SELECT sid, title, body, syntax FROM snippets") |
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
// DESCRIPTION: Sets existing spot color inks to print as process. | |
// Does not affect spot inks added after the script is ran, so rerun if necessary. | |
// Jorge Hernández Valiñani | |
#target indesign | |
(function () { | |
var doc = app.activeDocument; | |
var myInks = doc.inks; | |
var convertedCount = 0; |
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
#!/bin/bash | |
# Batch-add an empty file and Finder comment to a list of directories | |
# as a way of matching them to a catalog id. | |
# | |
# Takes a 2-column semicolon-separated CSV file. First column is a | |
# directory; second column is a catalog index or id. Creates an empty | |
# txt file whose filename is the catalog index in the 2nd column inside | |
# the directory in the 1st column. Also writes the catalog index in the | |
# 2nd column as a Finder comment (overwriting any existing one) of the |
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
#!/usr/bin/env bash | |
# Dump contents of optical media upon inserting, then eject and repeat. | |
# | |
# Requires macOS. | |
# | |
# If ran without the appropriate env variables, it will ask for: | |
# * destination | |
# * order no. to be recorded for the first media being copied. The orden no. | |
# of each copy which will be logged into a CSV file created in _destination_ |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE html> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<meta charset="UTF-8"/> | |
<title>Centering images in ebooks</title> | |
<!-- <link rel="stylesheet" type="text/css" href="style.css"/> --> | |
<style type="text/css"> | |
.center-image { |
NewerOlder