Jump to content

Typinator Set Converter


Recommended Posts

icon.png

 

Typinator Set Converter

File action for converting Typinator sets to Alfred snippet collections

Download | GitHub

 

The workflow supports only Typinator sets exported as plain text files.

(.tyset and .typubset are proprietary binary formats and cannot be read)

 

When converting Typinator snippets, the workflow replaces Typinator’s cursor marker {^} with Alfred’s cursor placeholder {cursor}.

Other Typinator markers are not supported.

 

The workflow uses OneUpdater for automatic updates.

 

Usage

  • Select one or more Typinator snippet sets exported as plain text files
  • Invoke Alfred’s file actions pane ( ⌥⌘\ )
  • Select “Convert Typinator Sets”
  • Press ↵

 

Options

The workflow supports the following configuration options, which are set using its environment variables:

 

customicon

Use the workflow’s custom icon for created snippet collections (enabled by default)

 

dontautoexpand

Disable automatic expansion for all snippets

 

dontcompress

Do not compress the folder containing the converted snippets.

This option may be useful, if you want to make some manual changes to converted snippets.

(To compress manually, just zip the folder and change its extension from “zip” to “alfredsnippets”)

 

noprefix

Do not use any prefixes for converted sets.

Even if all keywords in a set have the same prefix, they will remain unchanged, and no prefix will be added to this set’s preferences.

 

nosuffix

Do not use any suffixes for converted sets.

Even if all keywords in a set have the same suffix, they will remain unchanged, and no suffix will be added to this set’s preferences.

 

prefix

Force the specified prefix for all converted snippet sets.

The specified prefix will be added to the preferences of converted snippet sets.

If a snippet keyword has the specified prefix, it will be removed from the keyword.

For example, if you set the prefix to “//”, then “//keyword” will become “keyword”.

 

suffix

Force the specified suffix for all converted snippet sets.

The specified suffix will be added to the preferences of converted snippet sets.

If a snippet keyword has the specified suffix, it will be removed from the keyword.

For example, if you set the suffix to “//”, then “keyword//” will become “keyword”).

 

All the configuration variables, except “prefix” and “suffix”, are “pseudo-Boolean”:

  • “True”, “yes” or “1” are case-insensitively interpreted as “true”
  • Any other value or no value means “false”

 

Edited by targumanu
Link to comment

Great workflow, thank you! Seems to work well from my brief testing. A feature request: would it be easy to also implement converting the other way around, i.e. from a .alfredsnippets file to a .txt file (or .txt-rep which Typinator uses for updating sets) that can be imported to Typinator? That would also be most useful.

Link to comment
  • 1 year later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...