Bear with me here. Apple Shortcuts (free on the App Store) is extraordinary and you shouldn't sleep on it. In fact, you should use it and explore it as it's amazing. I would go even further and say it could be a great place to learn to code!

在这里忍受我。 Apple快捷键(在App Store上免费提供)非常出色,您不应该睡在上面。 实际上,您应该使用它并对其进行探索,因为它很棒。 我走得更远,说这可能是学习编码的好地方!

Apple Shortcuts on iPhone is a lot like Microsoft Flow, except for your phone. Shortcuts let you string together Actions (ahem, functions) into multi-step tasks (ahem, functions that call functions). There's a rich and growing gallery of shortcuts that you can copy into your local (to your phone) library. You can then name them and invoke your Shortcuts with Siri.

iPhone上的Apple快捷方式与Microsoft Flow非常相似,但手机除外。 快捷方式使您可以将Actions(Ahem,函数)组合成多个步骤的任务(Ahem,调用函数的函数)。 您可以将丰富的快捷方式库复制到本地(到电话)库中。 然后,您可以命名它们并使用Siri调用快捷方式。

Here's a few links to Shortcuts that (assuming you are reading this from your iPhone) you can add to your library with a click!

这里是指向快捷方式的一些链接(假设您正在从iPhone中读取内容),只需单击即可添加到您的媒体库中!

  • Do Not Disturb Timer

    请勿打扰计时器

  • Expand URL

    展开网址

  • Intelligent Power (from Reddit)

    智能电源(来自Reddit )

  • Check Spelling

    检查拼写

  • Convert Video to GIF

    将视频转换为GIF

  • Download YouTube Video

    下载YouTube视频

Once you have a shortcut you can invoke it as an item/icon on your springboard/home screen, you can have Siri run it with your voice, or invoke it via a "share sheet" that is available in all apps.

一旦有了快捷方式,您就可以在跳板/主屏幕上将其作为项/图标来调用,您可以让Siri用您的声音运行它,或者通过所有应用程序中可用的“共享表”来调用它。

It would be reasonable to think this was a simple macro system with a few basic building blocks, but I don't think Apple's team gets enough credit. This is a complete development environment on your phone.

认为这是一个具有几个基本构建块的简单宏系统是合理的,但我认为Apple的团队没有获得足够的信誉。 这是您手机上的完整开发环境。

For example, here's a incredibly intricate and powerful Shortcut if one is pulled over by the police.

例如,如果有人被警察拖走,这是一个极其复杂而强大的快捷方式。

It pauses any music that may be playing, turns down your brightness and volume, turns on Do Not Disturb, and sends a message to the contact of your choosing letting them know you’re being pulled over and what your current location is. It then opens your front camera and starts a video recording so you have a video record of being pulled over.

它会暂停可能正在播放的音乐,降低亮度和音量,打开“请勿打扰”,并向您选择的联系人发送一条消息,让他们知道您被拉住了,以及您当前所在的位置。 然后,它会打开您的前置摄像头并开始视频录制,因此您会被拉下视频记录。

Once you stop the recording it sends a copy of the video to a contact you specify, puts volume and brightness back to where they were, turns off Do Not Disturb, and gives you the option to send to iCloud Drive or Dropbox!

停止录制后,它会将视频的副本发送到您指定的联系人,将音量和亮度恢复到原来的状态,关闭“请勿打扰”,并为您提供发送到iCloud Drive或Dropbox的选项!

You could then record a Siri shortcut and just say "Hey Siri, I'm being pulled over" and all this happens automatically, hands free.

然后,您可以记录Siri快捷方式,然后说“嘿Siri,我被拉了过来”,所有这些都会自动发生,免提。

Take a look at the Laundry Timer app here. It's a very classic "take input and do a thing" program. You can build and extend workflows like this and the data from one flows through to the next one.

在这里查看洗衣计时器应用程序。 这是一个非常经典的“接受输入并做某事”程序。 您可以构建和扩展这样的工作流,并且数据从一个流到另一个。

Note the Shortcut above. The "Adjust Date" action pops up a Date and is used as a Diff(erence) against the "Current Date" action, then used again in the Add New Reminder as an input to "Add New Reminder." These contextual variables flow through and are easily accessible in this genius UI. It really is near-perfect. Try it.

请注意上面的快捷方式。 “调整日期”操作会弹出一个日期,并用作“当前日期”操作的差异,然后在“添加新提醒”中再次用作“添加新提醒”的输入。 这些上下文变量流经此天才UI并很容易访问。 确实是近乎完美的。 试试吧。

At this point you may be thinking, um, OK, that's cute, but where's the learn to code revolution here? It's not that open-ended of a system, what can I really do?

在这一点上,您可能会想,嗯,好,这很可爱,但是在这里学习编码革命的地方在哪里? 不是系统的开放性,我该怎么办?

Like many connected cars, my car has a kind of REST API that its app uses to do things like heat up the climate system. Here I can literally POST (like Curl, but on your iPhone!) to an endpoint and pass in a FORM and parse the resulting JSON. Wow! Drink that in. You can write complex functions with iOS Shortcuts. Really.

像许多联网汽车一样,我的汽车具有一种REST API,其应用程序可用来执行诸如加热气候系统之类的事情。 在这里,我可以按字面意义将POST(例如Curl,但在您的iPhone上!)发布到端点并传递FORM并解析所得的JSON。 哇! 喝点东西。您可以使用iOS快捷方式编写复杂的功能。 真。

Hang on. My body has a REST API. I use the open source Nightscout project to create a REST API on top of my Diabetes Continuous Glucose Meter then surface it in places like my lighted keyboard or even my Git Prompt.

不挂断。 我的身体有一个REST API。 我使用开源Nightscout项目在“糖尿病连续血糖仪”的顶部创建一个REST API,然后将其浮在发光的键盘甚至Git Prompt之类的地方。

How hard would it be to - right now as I make this blog post - write a method to have Siri retrieve my blood sugar and announce it to me when I say "Siri what's my blood sugar?" Let's see!

现在,当我撰写此博客文章时,要写出一种方法让Siri检索我的血糖并在我说“ Siri血糖是多少”时向我宣布这将是多么困难。 让我们来看看!

I make a URL object with my REST API that returns my sugar as JSON, it gets passed into Get Contents of URL. That makes a Dictionary from the Input, then gets the value of "sgv" (serum glucose value) and then the result of that is used to make a string with the Text action.

我使用我的REST API制作了一个URL对象,该对象将我的糖作为JSON返回,并将其传递给Get URLs。 从输入中创建字典,然后获取“ sgv”(血清葡萄糖值)的值,然后将其结果用于通过“文本”操作生成字符串。

Now I have Siri SAY it. I can "debug" by running the Shortcut with the play button.

现在我有Siri说了。 我可以通过使用播放按钮运行快捷方式来“调试”。

Then I can Add it to Siri and record my phrase. Here's me saying "what's my blood sugar" and she's telling me. Yes, I know. I had a cookie. I deserved it.

然后,我可以将其添加到Siri并记录我的短语。 这是我在说“我的血糖是多少”,而她在告诉我。 是的我知道。 我有一个饼干。 我应得的

This is just the start. It could also tell me my trend lines, text someone if it's high, make a chart, I figure can do anything! I'm going to continue to explore Shortcuts but this little NightScout one can be downloaded to YOUR phone here. You'll only need to put in YOUR own URL for your Nightscout instance.

这只是开始。 它也可以告诉我我的趋势线,发短信给某人,如果它很高,绘制图表,我想做任何事! 我将继续探索“快捷方式”,但是可以在这里将这个NightScout小程序下载到您的手机中。 您只需要为Nightscout实例输入您自己的URL。

翻译自: https://www.hanselman.com/blog/hey-siri-whats-my-blood-sugar-learning-to-code-with-apples-iphone-shortcuts

嘿Siri,我的血糖是多少? 学习使用Apple的iPhone快捷方式进行编码相关推荐

  1. haxe php,Haxe学习笔记(一) Haxe:一次编码全平台编译的神话

    Haxe学习笔记(一) Haxe:一次编码全平台编译的神话 一 Haxe是什么? Haxe是开源的,它作为一门语言,基础语法和ActionScript3基本一致.所以任何做过Flash开发的人都可以很 ...

  2. 学习笔记(一)(x264编码流程)

    学习笔记(一)(x264编码流程) 作者 张士辉 11月 2, 2007 <script type=text/javascript></script> <script s ...

  3. BT源代码学习心得(三):种子文件的编码方式 -- 转贴自wolfenstein (NeverSayNever)

    BT源代码学习心得(三):种子文件的编码方式 author: wolfenstein BT的作者使用了一种比较简单易懂的编码方式来对设计种子文件.这种编码方式能够很简单得对python中的各种数据类型 ...

  4. 稀疏学习、稀疏表示、稀疏自编码神经网络、字典学习、主成分分析PCA、奇异值分解SVD 等概念的梳理,以及常用的特征降维方法

    稀疏学习.稀疏表示.稀疏自编码神经网络.字典学习.主成分分析PCA.奇异值分解SVD 等概念的梳理,以及常用的特征降维方法 关于稀疏 稀疏编码 Sparse Coding 与字典学习 神经网络的正则化 ...

  5. 【让我们深度理解语音识别:Siri与Alexa如何运用深度学习和循环神经网络将声音转化为文字

    语音识别技术是近年来人工智能领域的重要研究对象,它的出现大大改善了人与机器的交互方式,增强了人们生活的便捷度.今天,我将带领大家深度了解语音识别技术的内部运作原理,以及语音助手如Siri和Alexa如 ...

  6. 深度学习(十二)稀疏自编码

    稀疏自编码 原文地址:http://blog.csdn.net/hjimce/article/details/49106869 作者:hjimce 一.相关理论 以前刚开始学CNN的时候,就是通过阅读 ...

  7. python学习Day7 数据类型的转换,字符编码演变历程

    一.数据类型的转换 1.1.1.字符转列表:lst1 = str.split(默认空格,也可依据指定字符分界),若无分界字符,就没法拆分,这时可以直接放进list转成列表 ----> s1 = ...

  8. 学习ios Metal(9)—iphone X真实感深度相机True Depth Camera的调用和metal GPGPU

    metal的基础知识入门,首推Metal By Example系列:http://metalbyexample.com/.博主的相关文章,主要给出工程实际遇到的典型问题及其解决方案. 本节源码:htt ...

  9. 基于深度学习的两种信源信道联合编码

    本文分享自华为云社区<基于深度学习的信源信道联合编码>,原文作者:技术火炬手 . 信源编码是一个数据压缩的过程,其目的是尽可能地将信源中的冗余度去掉:而信道编码则是一个增加冗余的过程,通过 ...

最新文章

  1. python的类型化_显式类型化的Python版本?
  2. 3. 什么是icmp?icmp与ip的关系_你知道如何跟女生,确定恋人关系吗?
  3. CV之 HOG特征描述算子-行人检测
  4. (零)VCS学习笔记
  5. VC++中多线程学习(MFC多线程)二(线程的相关操作、线程间的通信)
  6. 如何注册苹果开发者账号
  7. matlab实现插值
  8. 【JavaScript游戏开发】使用HTML5 canvas开发的网页版中国象棋项目
  9. 计算机网络期末考试题库(超级多的那种)
  10. 公众号二维码怎么生成
  11. SQLPub免费的MySQL数据库
  12. BUUCTF 从娃娃抓起
  13. OKRs-E 让目标推进成功率提升200%
  14. Java回炉学习(七)
  15. 2017第49周二乌镇互联网大会总结
  16. 让机器人飞入寻常百姓家,优必选这三步棋很关键
  17. grep -w和grep -e使用
  18. 基于FPGA的任意信号发生器
  19. Android修改设置文字转语音输出,默认语速
  20. POJ3614 [USACO07NOV]防晒霜Sunscreen

热门文章

  1. 文件下载IOUtils
  2. git 设置用户名密码
  3. 50系列1分钟破5亿!离开华为的荣耀依然强势
  4. Unprocessing Images for Learned Raw Denoising
  5. exynos4412开发板LED驱动程序
  6. C++ 类成员函数指针数组应用(一)
  7. 什么是浏览器指纹追踪(浏览器指纹追踪修改,浏览器指纹追踪技术)
  8. 鸿蒙系统是否能投屏,华为鸿蒙系统是否能真正迎来春天?
  9. 植物风场运动模拟(Wind Animations for Trees)
  10. MapReduce中的压缩和解压缩