Universal Draft Shortcut

Discussion in 'iOS Apps' started by OMGitsDaYisus, Sep 30, 2018.

  1. OMGitsDaYisus, Sep 30, 2018
    Last edited: Oct 6, 2018

    OMGitsDaYisus macrumors newbie

    OMGitsDaYisus

    Joined:
    Dec 14, 2016
    Location:
    Spain
    #1
    Hello there people!

    I've recently created my very first custom shortcut for iOS devices. The main functionality of this shortcut is to draw a draft of whatever you're thinking and converting it into a .pdf document you can share with other people or save inside your device. The link is down below. If anyone has any shortcut that wants to share then answer this post and let it spread through the community. Send screenshots if you wish.

    Download link: https://www.icloud.com/shortcuts/58c8368d183b476baa1461778169d0c6
     
  2. Jessica Lares macrumors G3

    Jessica Lares

    Joined:
    Oct 31, 2009
    Location:
    Near Dallas, Texas, USA
    #2
  3. OMGitsDaYisus, Sep 30, 2018
    Last edited: Sep 30, 2018

    OMGitsDaYisus thread starter macrumors newbie

    OMGitsDaYisus

    Joined:
    Dec 14, 2016
    Location:
    Spain
    #3
    Thanks for that tip Jessica, I've just upgraded it using your recommendations. I'll update the link and also upload it on the thread you mentioned, but how could I change the background colour? May you show me a way to do so and make the shortcut simpler and customizable?
     
  4. Jessica Lares macrumors G3

    Jessica Lares

    Joined:
    Oct 31, 2009
    Location:
    Near Dallas, Texas, USA
    #4
    When you use Make Rich Text from HTML, you're telling it to read the input as code. So what you have right now is a empty page identical to the blank.org website you originally used.

    To hold your color choices, you'd use a dictionary. The key would be the color name, and the value would be the hex code/HSL/RGB/etc representation of that color. (When you're adding them, the type of value is Text.)

    IMG_0053.jpg

    And then you'd follow that with a Choose from List action.

    Your Text action then needs to be changed to have some HTML code and include the chosen item.

    text_action_html.png

    HTML:
    <html>
    <body>
    <style>
    body {background: CHOSEN_ITEM_VARIABLE}
    </style>
    </body>
    </html>
    

    Note that I have the background attribute in the code itself because the dictionary is just colors. You would take that out and have it in your color's value if you wanted to use a combination of other CSS attributes to make it look like graph paper/etc.
     
  5. OMGitsDaYisus thread starter macrumors newbie

    OMGitsDaYisus

    Joined:
    Dec 14, 2016
    Location:
    Spain
    #5
    I've done as you said. The rest of the shortcut that is not shown contains the Share command. What's your opinion about it? Could it be upgraded? If so, could you advise me?

    Image 1: https://imgur.com/bZqware

    [​IMG]
    Another thing I have run into when making this shortcut and following your previous advice was that the color wouldn't fill the whole page when editing with the Markup tool. Does that have to do with the way the .html is or can that be changed? I mean, for the blank page it's ok, but when using another color it leaves that white 'frame'.

    Image 2: https://imgur.com/2wT0XOg

    [​IMG]
    I didn't have the opportunity to thank you for all the advice you've given me during the process of upgrading this shortcut, so finally... thank you so much!
     
  6. Jessica Lares macrumors G3

    Jessica Lares

    Joined:
    Oct 31, 2009
    Location:
    Near Dallas, Texas, USA
    #6
    Add the Make PDF action back in before Markup and that will take care of the border. Otherwise it looks good. The Share button is perfect.

    And no problem. :)
     
  7. OMGitsDaYisus thread starter macrumors newbie

    OMGitsDaYisus

    Joined:
    Dec 14, 2016
    Location:
    Spain
    #7
    I just ran into a little issue in which some colors won't show on the .html. The black does show, but I've tried using alice blue (#f0f8ff) or antique (#faebd7) but they won't show. I send you the link of the shortcut so you can check if anything's wrong. Thanks again.

    Link: https://www.icloud.com/shortcuts/57dd37eef32d429ea01282d19b87bd37
     
  8. Jessica Lares macrumors G3

    Jessica Lares

    Joined:
    Oct 31, 2009
    Location:
    Near Dallas, Texas, USA
    #8
    If you're going to use a regular list (probably because you don't like the hex codes showing up underneath?), you need to set a variable to the dictionary, and then after Choose from List, get the variable of the dictionary, use the Get Dictionary Value action, the key being the chosen item from that list, and then you'd pass the Text action that value.

    IMG_0059.jpg

    IMG_0060.jpg

    IMG_0061.jpg

    You don't need to give the chosen item a variable by the way. It shows up in the bar above the keyboard. But if you are, it's a good idea to give it a more readable name like "Color Value".
     
  9. OMGitsDaYisus thread starter macrumors newbie

    OMGitsDaYisus

    Joined:
    Dec 14, 2016
    Location:
    Spain
    #9
    Thank you again. Once and for all the shortcut is running and ready for uploading. Thank you for giving me advice and providing me with knowledge to make the best of this shortcut. I will post it on the thread you mentioned and in my profile. ;)
     
  10. OMGitsDaYisus thread starter macrumors newbie

    OMGitsDaYisus

    Joined:
    Dec 14, 2016
    Location:
    Spain
    #10
    Just one more thing. Could I convert that .pdf document to an image type file? I've just used the shortcut while taking notes from a lecture and I couldn't attach it as an image onto pages.
     
  11. Jessica Lares macrumors G3

    Jessica Lares

    Joined:
    Oct 31, 2009
    Location:
    Near Dallas, Texas, USA
    #11
    Yeah, you'd use Convert Image after Markup.
     
  12. OMGitsDaYisus thread starter macrumors newbie

    OMGitsDaYisus

    Joined:
    Dec 14, 2016
    Location:
    Spain
    #12
    Yes, that was what I first tried, but when I draw on the page and open it (trying to use both save to Files and Gallery) it appears blank. Does it have anything to do with the image format? Please advice me :)
     
  13. Jessica Lares macrumors G3

    Jessica Lares

    Joined:
    Oct 31, 2009
    Location:
    Near Dallas, Texas, USA
    #13
    Putting it before Markup works. But then you wouldn't get it as a PDF to begin with.

    It is not working on either macOS or iOS Pages here either.
     
  14. OMGitsDaYisus thread starter macrumors newbie

    OMGitsDaYisus

    Joined:
    Dec 14, 2016
    Location:
    Spain
    #15
    Thanks for that one! Well, I personally think that an image is better than a pdf specially when messaging, as a whole preview isn't shown in most apps. Thanks again for the help!
    --- Post Merged, Oct 6, 2018 ---
    Thanks! Have you tried out the shortcut?
     

Share This Page

14 September 30, 2018