iffy-pi / apple-shortcuts

A repository for handling the updates and versioning of my apple shortcuts
https://iffy-pi.github.io/apple-shortcuts/
3 stars 0 forks source link

Nutrition Framework - Updating shortcut to generate markdown highlighting #9

Closed iffy-pi closed 11 months ago

iffy-pi commented 11 months ago

Notes that are created don't use the markdown format because Apple Notes are created from Rich Text. However, I discovered "Make Rich Text from Markdown" action, allowing us to specify markdown and it's properly formatted into notes. I am implementing this in the shortcut.

iffy-pi commented 11 months ago

With further experimentation, the make markdown action does work but has some limitations:

iffy-pi commented 11 months ago

Diving into it, it was basically a unicode error. If we specify the unicode directly in the markdown, using markdown's direct unicode format:

✅ - for ✅

It is correctly parsed!

iffy-pi commented 11 months ago

Relevant unicodes:

These were gotten with the help of (https://unicode.scarfboy.com/?s=), where we just paste the character and get the hex unicode (U+<hex unicode). For some emojis (like the arrow) it is a combination of two unicode characters.

iffy-pi commented 11 months ago

Now the remaining step is to update the emojis used to the markdown format

iffy-pi commented 11 months ago

Empty lines can be achieved with non-space breaking character on a separate line e.g.

Hello
&nbsp;
World

will give

Hello

World
iffy-pi commented 11 months ago

Finalized template format for shortcut release notes

# Nutrition Shortcut Update
## Updates are available for shortcuts:
- Nutrition Installer: v4.02 &#x27A1;&#xFE0F; v4.03
- Nutrition: v1 &#x27A1;&#xFE0F; v1.01
- Log Algorithm: v1 &#x27A1;&#xFE0F; v1.01
- Saved And Search: v1 &#x27A1;&#xFE0F; v1.01

&nbsp;
## &#x1F566; Released:
August 6, 2023

&nbsp;
## &#x2705; Install:
- Nutrition Installer - [Download](https://www.icloud.com/shortcuts/58d49efad43a4fbeae6f4954acf011e1)
- Nutrition - [Download](https://www.icloud.com/shortcuts/3db089d930c04f13b8fe3f4596332387)
- Log Algorithm - [Download](https://www.icloud.com/shortcuts/794825e25987431f872a9fc36cb53d81)
- Saved And Search - [Download](https://www.icloud.com/shortcuts/095905e0e20b45c093dc9d9fdf444f27)

&nbsp;
## &#x1F4DD; Release Notes:
- Nutrition Installer
    - Fixed dead tutorial link
    - Added option when running shortcut between installing the shortcut or checking for updates
- Display Food Item v1.01
    - [Issue #1](https://github.com/iffy-pi/apple-shortcuts/issues/1)
    - Trying to fix issue that occurs when logging  decimal values with comma instead of period
    - Brought to my attention by redditor
- Search Algorithm v1.01
    - Search query no longer allows multiple lines
- Log Foods At Time v1.01
    - [Issue #3](https://github.com/iffy-pi/apple-shortcuts/issues/3)
    - Fixed bug that suppressed Make Preset option even when more than one food was logged
- Foods List v1.01
    - [PR #2](https://github.com/iffy-pi/apple-shortcuts/pull/2)
    - Updated to increase speed when sending foods to Log Foods At Different Times and Make Preset
- Log Foods At Different Times v1.01
    - [PR #2](https://github.com/iffy-pi/apple-shortcuts/pull/2)
    - Updated to increase speed when receiving foods from Foods List
- Make Preset v1.01
    - [PR #2](https://github.com/iffy-pi/apple-shortcuts/pull/2)
    - Updated to increase speed when receiving foods from Foods List
    - Fixed bug that allows users to create an empty preset

&nbsp;
## &#x1F4EC; Developer Contact:
Reddit: [u/iffythegreat](https://www.reddit.com/user/iffythegreat)
RoutineHub: [iffy-pi](https://routinehub.co/user/iffy-pi)

&nbsp;
## &#x1F4DA; Full Update History:
https://routinehub.co/shortcut/5177/changelog

Note to get a separate line I had to do:


&nbsp;
iffy-pi commented 11 months ago

TODO:

iffy-pi commented 11 months ago

Another TODO:

iffy-pi commented 11 months ago

Testing new markdown generation with Test Updater

iffy-pi commented 11 months ago

Tested and verified that its working, safe to close