I made a shortcut to export content from Ulysses

During the process of migrating from Ulysses to Drafts I first tried to use the Automatic Import option, but I was disapointed the creation date of the entries was not preserved. Instead I made a shortcut that performs this migration by building a singular drafts export file that can then be imported. If you are in a similar position, here it is:

https://routinehub.co/shortcut/5850

So I know this is a shortcut, not an “action I made”, but this seemed like the most appropriate topic.

2 Likes

Highly appreciated. Shortcut works, file generated as expected. But import in drafts generates error: No drafts found in file.
Any idea why? Latest iOS, Drafts, Ulysses.

Hello,

Could not say from the top of my head what the issue could be - I never encountered such an error. The generated file is in JSON syntax, did you try opening it in an editor like Textastic and validating the JSON syntax in a tool like https://jsonlint.com/?

Thank you for the hint. JSON syntax is fine, but after some testing I figured out why it failed (I am on German OS). These shortcut variables have to be localized:

  • Creation date
  • Modification date
  • Parent group

Works flawlessly now, great!

Great that you got it working. I am curious about what the exact fix was though - do you mean that the names of the three properties of the magic variable you reference above are actually different in german iOS?

Yes, exactly.

  • Creation date = Erstellungsdatum
  • Modification date = Änderungsdatum
  • Parent group = Übergeordnete Gruppe

Shortcuts does not localize some property names used within a text action (which I did not know). Hence the affected action looks like this in German:

{
    "created_at" : "Blatt (Erstellungsdatum)",
    "tags" : ["Blatt (Übergeordnete Gruppe)"
    ],
    "accessed_at" : "Blatt (Änderungsdatum)",
    "uuid" : "uuid",
    "folder" : 0,
    "languageGrammar" : "Markdown",
    "created_latitude" : 0.00000,
    "modified_longitude" : 0.00000,
    "content" : Text,
    "flagged" : false,
    "modified_latitude" : 0.00000,
    "created_longitude" : 0.00000,
    "modified_at" : "Blatt (Änderungsdatum)"
  }

Strangely, other variables are not affected, e. g. “combined text”. So I assume this might change in the future.

Thanks for the explanation, that is very interesting - I suppose this localization is handled by the application developers, and with Ulysses being made in Germany, it would make sense they localize this stuff. But it breaks sharing accross users in different locales, which is less than ideal. I guess the blame here should go at least partly to Apple as well, they could provide mechanisms to make this seamless. Although to be fair they might, but Ulysses is not utilizing them. :man_shrugging: