Skip to content

Instantly share code, notes, and snippets.

@line0
line0 / l0.ReplaceByCharacterText.moon
Last active April 11, 2020 16:23
l0.ReplaceByCharacterText.moon
export script_name = "Replace Character By Text"
export script_description = "Takes GBC lines and replaces each character from a sequence of matching length in the effect field"
export script_version = "0.1.0"
export script_author = "line0"
export script_namespace = "l0.ReplaceByCharacterText"
DependencyControl = require "l0.DependencyControl"
depCtrl = DependencyControl{
feed: "https://raw.githubusercontent.com/TypesettingTools/line0-Aegisub-Scripts/master/DependencyControl.json",
{
export script_name = "Count Layout Lines"
export script_description = "Counts the number of layout lines produced on the canvas per subtitle line."
export script_version = "0.1.0"
export script_author = "line0"
export script_namespace = "l0.CountLayoutLines"
DependencyControl = require "l0.DependencyControl"
depRec = DependencyControl {
feed: "https://raw.githubusercontent.com/TypesettingTools/line0-Aegisub-Scripts/master/DependencyControl.json",
@line0
line0 / GM_fetch.js
Last active November 29, 2015 16:28
Fetch polyfill (https://github.com/github/fetch) stripped down to provide GM_fetch via GM_XHR.
(function() {
'use strict';
var support = {
blob: 'FileReader' in self && 'Blob' in self && (function() {
try {
new Blob();
return true
} catch(e) {
return false
@line0
line0 / GM_XHR.js
Last active November 30, 2015 15:44 — forked from Acorn-zz/GM_XHR.js
allows using all Jquery AJAX methods in Greasemonkey
// allows using all Jquery AJAX methods in Greasemonkey
// originally inspired from http://ryangreenberg.com/archives/2010/03/greasemonkey_jquery.php
// works with jQuery 2.1.4
// (c) 2011 Martin Monperrus
// (c) 2010 Ryan Greenberg
// (updated) 2015 line0 to work with current jQuery and more closely mirror contemporary XHR implementations.
//
// Usage:
// $.ajax({
// url: '/p/',
export script_name = "Insert Timecode"
export script_description = "Inserts a running timecode"
export script_version = "0.0.1"
export script_author = "line0"
export script_namespace = "l0.InsertTimeCode"
DependencyControl = require "l0.DependencyControl"
dep = DependencyControl {
feed: "https://raw.githubusercontent.com/TypesettingTools/line0-Aegisub-Scripts/master/DependencyControl.json",
{
#target illustrator
#targetengine main
#include "./lib/polyfills.jsxinc"
app.documents.length > 0 ? l0_impImageSeq() : alert("Please create an empty document before running this script.");
function l0_impVecSeq() {
app.userInteractionLevel = UserInteractionLevel.DONTDISPLAYALERTS
var folders = []
function aWarpSharp4xx16 (clip src, int "thresh", int "blur", int "type", int "depth", int "chroma", bool "lsb", string "cplace")
{
chroma = default(chroma, 4)
lsb = default(lsb, false)
cplace = default(cplace, "MPEG2")
assert(src.IsPlanar, "aWarpSharp4xx16: input clip must be planar YUV")
assert(0 <= chroma <= 6, "aWarpSharp4xx16: argument chroma must be an integer between 0 and 6.")
assert(cplace == "MPEG2" || cplace == "MPEG1", "aWarpSharp4xx16: chroma siting must be MPEG2 or MPEG1")
@line0
line0 / gist:962e937672f1bf8c2148
Last active August 29, 2015 14:16
ASSInspector update feed
{
"dependencyControlFeedFormatVersion": "0.1.0",
"name": "ASSInspector",
"description": "Official ASSInspector repository",
"baseUrl": "https://github.com/TypesettingCartel/ASSInspector",
"url": "@{baseUrl}",
"maintainer": "torque",
"modules": {
"ASSInspector.Inspector": {
"url": "@{baseUrl}",
@line0
line0 / gist:2250cab146b49b9a75f4
Last active August 29, 2015 14:16
Updater instructions
  1. Delete ASSFoundation from your automation directories.
  2. Delete any of the following macros you're using from your automation directories: ASSWipe, Insert Line Breaks, Move Along Path, Nudge, Paste AI Lines, Vertical Text
  3. Download the latest DependencyControl release for your platform and unpack its contents to your Aegisub user automation directory. It is essential that DependencyControl and all scripts it's used reside in the user automation directory, NOT the the automation directory in the Aegisub application folder. On Windows, this will be %AppData%\Aegisub\automation folder (you may have to create it).
  4. Download any of my macros from here (only the ones beginning with l0. work with the updater) and put them in your user automation\autoload folder.
  5. In Aegisub, rescan your automation folder (or restart Aegisub). Aegisub should automatically fetc
@line0
line0 / gist:734f66fc69b42e91319d
Last active August 29, 2015 14:14
process dumb shit
script_name="process dumb shit"
script_description="___"
script_version="0.0.1"
script_author="line0"
local LineCollection = require("a-mo.LineCollection")
local util = require("aegisub.util")
local l0Common = require("l0.Common")
function process(sub,sel)