This file contains 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 | |
SCRIPTNAME=$(basename "$0") | |
function realpath () { | |
f=$@; | |
if [ -d "$f" ]; then | |
base=""; | |
dir="$f"; | |
else |
This file contains 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/osascript -l JavaScript | |
ObjC.import("stdlib"); | |
ObjC.import("AppKit"); | |
ObjC.import("PDFKit"); | |
ObjC.import("Vision"); | |
const scriptName = $.NSProcessInfo.processInfo.arguments.objectAtIndex(3).lastPathComponent.js; | |
console.error = (obj) => { |
This file contains 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 <Quartz/Quartz.h> | |
#import <Vision/Vision.h> | |
int main(int argc, const char * argv[]) { | |
@autoreleasepool { | |
NSString *target = @"test.pdf"; | |
CGFloat dpi = 200; | |
PDFDocument *doc = [[PDFDocument alloc] initWithURL:[NSURL fileURLWithPath:target]]; | |
NSUInteger pageCount = [doc pageCount]; | |
This file contains 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 | |
SCRIPTNAME=$(basename "$0") | |
function realpath () { | |
f=$@; | |
if [ -d "$f" ]; then | |
base=""; | |
dir="$f"; | |
else | |
base="/$(basename "$f")"; |
This file contains 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 python | |
import sys | |
import json | |
from optparse import OptionParser | |
# parseArgs :: (IO (), Dict, [String]) | |
def parseArgs(): | |
parser = OptionParser( | |
usage="Usage: %prog input_file.ipynb -o output_file.ipynb") | |
parser.add_option( |
This file contains 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 | |
# AUTHOR | |
# 2013/10/08 Nobu C. Shirai | |
# 2018/10/06 Akira Hasegawa | |
backer(){ | |
check_options $@ | |
Ind=1 | |
for TargetFile in ${ArgFiles[@]} | |
do |