<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Projects &#8211; jaguchi log</title>
	<atom:link href="https://jaguchi.com/blog/category/projects/feed/" rel="self" type="application/rss+xml" />
	<link>https://jaguchi.com</link>
	<description>Speeding on training wheels</description>
	<lastBuildDate>Sun, 08 Sep 2024 05:51:00 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.7.5</generator>

<image>
	<url>https://jaguchi.com/wp-content/uploads/2017/02/cropped-low_res-32x32.png</url>
	<title>Projects &#8211; jaguchi log</title>
	<link>https://jaguchi.com</link>
	<width>32</width>
	<height>32</height>
</image> 
<site xmlns="com-wordpress:feed-additions:1">149953163</site>	<item>
		<title>Share links from iOS Safari to a desktop browser,  Pushbullet style</title>
		<link>https://jaguchi.com/blog/2022/10/share-links-from-ios-safari-to-a-desktop-browser-pushbullet-style/</link>
		
		<dc:creator><![CDATA[mirka]]></dc:creator>
		<pubDate>Sun, 23 Oct 2022 22:38:27 +0000</pubDate>
				<category><![CDATA[Projects]]></category>
		<category><![CDATA[Keyboard Maestro]]></category>
		<guid isPermaLink="false">https://jaguchi.com/?p=1279</guid>

					<description><![CDATA[Now that Pushbullet is unavailable on iOS, this is an alternative workflow I've been using to send URLs from iOS Safari to Google Chrome on my desktop computer.]]></description>
										<content:encoded><![CDATA[
<p>Now that <a href="https://www.pushbullet.com/">Pushbullet</a> is <a href="https://www.reddit.com/r/PushBullet/comments/eirc1m/not_available_on_ios/">unavailable</a> on iOS, this is an alternative workflow I&#8217;ve been using to send URLs from iOS Safari to Google Chrome on my desktop computer.</p>



<p>My requirements for this are:</p>



<ol class="wp-block-list">
<li><strong>The computer should not have to be awake</strong> when I share the link. The links should queue up and be processed once the computer is back online.</li>



<li>The shared links should <strong>open automatically</strong> in the desktop browser, without any user interaction.</li>
</ol>



<span id="more-1279"></span>



<h2 class="wp-block-heading">What you need</h2>



<ul class="wp-block-list">
<li><a href="https://www.dropbox.com/">Dropbox</a>, or some other way to sync files to your computer. I&#8217;m sure you could also use iCloud Drive.</li>



<li><a href="https://www.noodlesoft.com/">Hazel</a>, or some other utility that can monitor and react to file changes on your computer. <a href="https://www.keyboardmaestro.com/">Keyboard Maestro</a> also has <a href="https://wiki.keyboardmaestro.com/trigger/Folder">similar functionality</a>.</li>
</ul>



<p>This is actually a generic setup I use for this kind of non-urgent &#8220;async job queue&#8221; where inputs need to be processed on my computer rather than be sent directly to an existing API.</p>



<p>The basic idea is to create text files (&#8220;jobs&#8221;) in a designated folder (&#8220;job queue&#8221;) in your Dropbox, which will be parsed and processed by Hazel whenever available.</p>



<h2 class="wp-block-heading">How to set up</h2>



<p>In the Shortcuts app on iOS, create a Share Sheet shortcut that takes a URL as input and appends it to a text file in Dropbox.</p>



<figure class="wp-block-image aligncenter size-large is-resized"><img fetchpriority="high" decoding="async" width="957" height="1024" data-attachment-id="1286" data-permalink="https://jaguchi.com/blog/2022/10/share-links-from-ios-safari-to-a-desktop-browser-pushbullet-style/029-shortcuts/" data-orig-file="https://jaguchi.com/wp-content/uploads/2022/10/029-shortcuts.png" data-orig-size="1179,1262" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="029-shortcuts" data-image-description="" data-image-caption="" data-medium-file="https://jaguchi.com/wp-content/uploads/2022/10/029-shortcuts-280x300.png" data-large-file="https://jaguchi.com/wp-content/uploads/2022/10/029-shortcuts-957x1024.png" src="https://jaguchi.com/wp-content/uploads/2022/10/029-shortcuts-957x1024.png" alt="Screenshot of the shortcut recipe in iOS Shortcuts. Receive URLs from input from Share Sheet. Then, append the shortcut input to a file in Dropbox. The file path is set to &quot;/Hazel/chrome_url&quot; and the Make New Line option is enabled." class="wp-image-1286" style="aspect-ratio:0.935546875;width:375px" srcset="https://jaguchi.com/wp-content/uploads/2022/10/029-shortcuts-957x1024.png 957w, https://jaguchi.com/wp-content/uploads/2022/10/029-shortcuts-280x300.png 280w, https://jaguchi.com/wp-content/uploads/2022/10/029-shortcuts-768x822.png 768w, https://jaguchi.com/wp-content/uploads/2022/10/029-shortcuts-434x465.png 434w, https://jaguchi.com/wp-content/uploads/2022/10/029-shortcuts-868x929.png 868w, https://jaguchi.com/wp-content/uploads/2022/10/029-shortcuts.png 1179w" sizes="(max-width: 957px) 100vw, 957px" /></figure>



<p>On your computer, set up Hazel to monitor files in that Dropbox folder. Whenever the file name matches, run a shell script, and move it to the trash when done.</p>



<figure class="wp-block-image size-large"><img decoding="async" width="1024" height="398" data-attachment-id="1287" data-permalink="https://jaguchi.com/blog/2022/10/share-links-from-ios-safari-to-a-desktop-browser-pushbullet-style/029-hazel/" data-orig-file="https://jaguchi.com/wp-content/uploads/2022/10/029-hazel.png" data-orig-size="1348,524" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="029-hazel" data-image-description="" data-image-caption="" data-medium-file="https://jaguchi.com/wp-content/uploads/2022/10/029-hazel-300x117.png" data-large-file="https://jaguchi.com/wp-content/uploads/2022/10/029-hazel-1024x398.png" src="https://jaguchi.com/wp-content/uploads/2022/10/029-hazel-1024x398.png" alt="Screenshot of the rule in Hazel. When name is &quot;chrome_url&quot;, run an embedded shell script and move the file to the trash." class="wp-image-1287" srcset="https://jaguchi.com/wp-content/uploads/2022/10/029-hazel-1024x398.png 1024w, https://jaguchi.com/wp-content/uploads/2022/10/029-hazel-300x117.png 300w, https://jaguchi.com/wp-content/uploads/2022/10/029-hazel-768x299.png 768w, https://jaguchi.com/wp-content/uploads/2022/10/029-hazel-434x169.png 434w, https://jaguchi.com/wp-content/uploads/2022/10/029-hazel-868x337.png 868w, https://jaguchi.com/wp-content/uploads/2022/10/029-hazel.png 1348w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>Your shell script could look something like this, where each line of the text file gets passed to the <code>open</code> command.</p>



<pre class="wp-block-code"><code lang="bash" class="language-bash">xargs &lt; $1 -n 1 open</code></pre>



<figure class="wp-block-image aligncenter size-large is-resized"><img decoding="async" width="1024" height="549" data-attachment-id="1288" data-permalink="https://jaguchi.com/blog/2022/10/share-links-from-ios-safari-to-a-desktop-browser-pushbullet-style/029-shell-script/" data-orig-file="https://jaguchi.com/wp-content/uploads/2022/10/029-shell-script.png" data-orig-size="1122,602" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="029-shell-script" data-image-description="" data-image-caption="" data-medium-file="https://jaguchi.com/wp-content/uploads/2022/10/029-shell-script-300x161.png" data-large-file="https://jaguchi.com/wp-content/uploads/2022/10/029-shell-script-1024x549.png" src="https://jaguchi.com/wp-content/uploads/2022/10/029-shell-script-1024x549.png" alt="The shell script pasted in the embedded script popover." class="wp-image-1288" style="width:512px;height:275px" srcset="https://jaguchi.com/wp-content/uploads/2022/10/029-shell-script-1024x549.png 1024w, https://jaguchi.com/wp-content/uploads/2022/10/029-shell-script-300x161.png 300w, https://jaguchi.com/wp-content/uploads/2022/10/029-shell-script-768x412.png 768w, https://jaguchi.com/wp-content/uploads/2022/10/029-shell-script-434x233.png 434w, https://jaguchi.com/wp-content/uploads/2022/10/029-shell-script-868x466.png 868w, https://jaguchi.com/wp-content/uploads/2022/10/029-shell-script.png 1122w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<h2 class="wp-block-heading">And that&#8217;s it</h2>



<p>You can now push links from the share sheet in iOS Safari to your desktop browser, just like you did with Pushbullet.</p>



<figure class="wp-block-image aligncenter size-large is-resized"><img loading="lazy" decoding="async" width="871" height="1024" data-attachment-id="1290" data-permalink="https://jaguchi.com/blog/2022/10/share-links-from-ios-safari-to-a-desktop-browser-pushbullet-style/029-share-sheet/" data-orig-file="https://jaguchi.com/wp-content/uploads/2022/10/029-share-sheet.png" data-orig-size="1179,1386" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="029-share-sheet" data-image-description="" data-image-caption="" data-medium-file="https://jaguchi.com/wp-content/uploads/2022/10/029-share-sheet-255x300.png" data-large-file="https://jaguchi.com/wp-content/uploads/2022/10/029-share-sheet-871x1024.png" src="https://jaguchi.com/wp-content/uploads/2022/10/029-share-sheet-871x1024.png" alt="The iOS share sheet with a Pushbullet action." class="wp-image-1290" style="width:375px" srcset="https://jaguchi.com/wp-content/uploads/2022/10/029-share-sheet-871x1024.png 871w, https://jaguchi.com/wp-content/uploads/2022/10/029-share-sheet-255x300.png 255w, https://jaguchi.com/wp-content/uploads/2022/10/029-share-sheet-768x903.png 768w, https://jaguchi.com/wp-content/uploads/2022/10/029-share-sheet-434x510.png 434w, https://jaguchi.com/wp-content/uploads/2022/10/029-share-sheet-868x1020.png 868w, https://jaguchi.com/wp-content/uploads/2022/10/029-share-sheet.png 1179w" sizes="auto, (max-width: 871px) 100vw, 871px" /></figure>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1279</post-id>	</item>
		<item>
		<title>NISA / つみたてNISA を比較計算してみる</title>
		<link>https://jaguchi.com/blog/2021/11/nisa-compare/</link>
		
		<dc:creator><![CDATA[mirka]]></dc:creator>
		<pubDate>Fri, 19 Nov 2021 00:59:48 +0000</pubDate>
				<category><![CDATA[Projects]]></category>
		<guid isPermaLink="false">https://jaguchi.com/?p=1101</guid>

					<description><![CDATA[非課税分のメリットをどう活かすかが鍵になる、2つのNISA制度。上限600万（120万×5年）のNISAと、上限800万（40万×20年）の積立NISA、どっちのほうが得なのか自分で決めないといけない。]]></description>
										<content:encoded><![CDATA[
<p>非課税分のメリットをどう活かすかが鍵になる、2つのNISA制度。上限600万（120万×5年）のNISAと、上限800万（40万×20年）の積立NISA、どっちのほうが得なのか自分で決めないといけない。</p>



<p>NISA上限額の120万円を毎年投資できる人の場合、普通に考えてそっちのほうが積立NISAより得だろうとだいたい勘でわかると思う。でも実際にどれぐらい違うのかとか、たとえば積立NISAの年間上限を微妙に超えた50万円を投資できる人はどっちを選んだほうがいいのかとか、にわかにはわかりづらい。</p>



<span id="more-1101"></span>



<p>NISA制度が開始された2014年にはまだ積立NISAが存在してなかったのもあるが、自分も勘でNISAのほうがいいだろうとずっと思っていた。今さら気になったのでちゃんと計算してみたら、なかなか安心感のある結果になったので気になる人は試してほしい。</p>



<figure class="wp-block-video"><video autoplay loop muted src="https://jaguchi.com/wp-content/uploads/2021/11/nisa.mp4" playsinline></video></figure>



<div class="wp-block-buttons is-content-justification-center is-nowrap is-layout-flex wp-container-core-buttons-is-layout-1 wp-block-buttons-is-layout-flex" style="margin-top:var(--wp--preset--spacing--30);margin-bottom:var(--wp--preset--spacing--30)">
<div class="wp-block-button has-custom-font-size is-style-fill has-medium-font-size"><a class="wp-block-button__link has-text-align-center wp-element-button" href="https://nisa-compare.vercel.app/">NISA / つみたてNISA 比較計算 →</a></div>
</div>



<p>株式インデックスファンドを長期保有するような定番の投資だと、50万円ぐらいを分岐点として基本的に一般NISAのほうが良いという感じになった。買付日を分散させることによるリスク低減を考慮しても、70万ぐらいが分岐点じゃないだろうか（一般論としては、既に資金があるならわざわざ分散させるよりも早く投入したほうがいいと言うが、投資始めたてのころを思い出すとそれも怖かったので分散したい気持ちはわかる）。</p>



<p>ちなみにこの制度はあくまで減税が目的なので、最終的な評価額の違いはあまり関係ないということに注意。評価益（評価額と買付額の差）の最大化だけを考えればよい。</p>
]]></content:encoded>
					
		
		<enclosure url="https://jaguchi.com/wp-content/uploads/2021/11/nisa.mp4" length="887576" type="video/mp4" />

		<post-id xmlns="com-wordpress:feed-additions:1">1101</post-id>	</item>
		<item>
		<title>LaunchBar action to generate spoken audio files</title>
		<link>https://jaguchi.com/blog/2018/09/launchbar-action-to-generate-spoken-audio-files/</link>
		
		<dc:creator><![CDATA[mirka]]></dc:creator>
		<pubDate>Mon, 24 Sep 2018 14:11:42 +0000</pubDate>
				<category><![CDATA[Projects]]></category>
		<category><![CDATA[AppleScript]]></category>
		<category><![CDATA[LaunchBar]]></category>
		<guid isPermaLink="false">https://jaguchi.com/?p=944</guid>

					<description><![CDATA[Combine the macOS Speech Synthesis CLI with a LaunchBar action to instantly create spoken audio files. Great for Anki flashcards!]]></description>
										<content:encoded><![CDATA[
<p>You may know that macOS comes with a rather powerful text-to-speech system. It&#8217;s capable of speaking text in different languages, and can be triggered via <a href="https://support.apple.com/kb/ph25639">keyboard shortcut</a>&nbsp;or the &#8220;Speech&#8221; context menu.</p>



<p>A lesser-known fact is that it has a command line interface.</p>



<span id="more-944"></span>



<pre class="wp-block-code"><code lang="bash" class="language-bash">$ say "hello world"</code></pre>



<p>This CLI offers some useful options, like specifying a voice and saving to file. By pairing this with <a href="https://obdev.at/products/launchbar/">LaunchBar</a>, we can build actions that take text input and instantly generate a spoken audio file.&nbsp;I&#8217;ve been using this to add spoken audio files to my <a href="https://apps.ankiweb.net/">Anki</a> flashcards:</p>



<div class="wp-block-image aligncenter"><figure class="aligncenter"><img loading="lazy" decoding="async" width="480" height="240" data-attachment-id="945" data-permalink="https://jaguchi.com/blog/2018/09/launchbar-action-to-generate-spoken-audio-files/speak-launchbar/" data-orig-file="https://jaguchi.com/wp-content/uploads/2018/09/speak-launchbar.gif" data-orig-size="480,240" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="speak-launchbar" data-image-description="" data-image-caption="" data-medium-file="https://jaguchi.com/wp-content/uploads/2018/09/speak-launchbar-300x150.gif" data-large-file="https://jaguchi.com/wp-content/uploads/2018/09/speak-launchbar.gif" src="https://jaguchi.com/wp-content/uploads/2018/09/speak-launchbar.gif" alt="" class="wp-image-945"/><figcaption><a href="https://www.obdev.at/resources/launchbar/help/InstantSend.html">Instant send</a> the text to LaunchBar, invoke the action, and get the generated audio file. Ridiculously fast!</figcaption></figure></div>



<p>I used to go to <a href="https://forvo.com/">Forvo</a> to get audio spoken by actual humans, but there were too many downsides to this. The audio quality, volume, and accents are inconsistent, and it gets pretty tedious when you&#8217;re making lots of new flashcards each day. I also find it more effective to have my audio files include <a href="https://en.wikipedia.org/wiki/Article_(grammar)">articles</a> when learning gendered nouns. And sometimes, you just want to learn a specific phrase that isn&#8217;t available on Forvo.</p>



<p>The built-in speech synthesis CLI + LaunchBar combo is the perfect solution for this.</p>



<h2 class="wp-block-heading">Download on GitHub</h2>



<p><em>Update (Sep 10, 2020) — A more feature-packed polyglot version of this script, as well as my other LaunchBar actions, are now <a href="https://github.com/mirka/launchbar-actions">available on GitHub</a>. The rest of this page may be out of date.</em></p>



<h2 class="wp-block-heading">How to set up</h2>



<p>First, go to System Preferences&nbsp;▸ Accessibility&nbsp;▸ Speech, and make sure you&#8217;ve installed the voice you want to use.</p>



<p>Next, here&#8217;s the AppleScript we&#8217;ll be using as the LaunchBar action. The way I have it set up, the text is spoken by the voice chosen in the Accessibility settings, and the audio is saved as an .m4a file in my system&#8217;s temporary folder (so as not to clutter my desktop). You should alter this script to meet your exact needs. For example, you might want to add a voice argument to the shell script (e.g. <code>-v alex</code>) to specify a certain voice.</p>



<pre class="wp-block-code"><code lang="applescript" class="language-applescript">on handle_string(str)
	
	set timeStr to (time of (current date))
	set tempItemsPath to POSIX path of (path to temporary items)
	set filePath to tempItemsPath &amp; timeStr &amp; ".m4a"
	set output to do shell script "say " &amp; quoted form of str &amp; " --data-format=aac -o " &amp; filePath
	
	tell application "LaunchBar"
		set selection to filePath
		activate
	end tell
	
end handle_string</code></pre>



<p><em>Aug 2, 2020: Updated for macOS Catalina</em></p>



<div class="wp-block-file"><a href="https://jaguchi.com/wp-content/uploads/2018/09/speak_text_as_m4a.zip">Speak text as m4a.scpt</a><a href="https://jaguchi.com/wp-content/uploads/2018/09/speak_text_as_m4a.zip" class="wp-block-file__button" download>Download</a></div>



<div class="wp-block-file"><a href="https://jaguchi.com/wp-content/uploads/2018/09/speak_text_as_m4a_catalina.zip">Speak text as m4a.scpt (Catalina)</a><a href="https://jaguchi.com/wp-content/uploads/2018/09/speak_text_as_m4a_catalina.zip" class="wp-block-file__button" download>Download</a></div>



<p>Place the .scpt file in your LaunchBar actions folder: <code>~/Library/Application Support/LaunchBar/Actions/</code></p>



<p>That&#8217;s it!</p>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">944</post-id>	</item>
		<item>
		<title>日本郵便の再配達ページを正常化する</title>
		<link>https://jaguchi.com/blog/2017/01/japan-post-redelivery/</link>
		
		<dc:creator><![CDATA[mirka]]></dc:creator>
		<pubDate>Sat, 28 Jan 2017 18:21:11 +0000</pubDate>
				<category><![CDATA[Projects]]></category>
		<category><![CDATA[Tampermonkey]]></category>
		<guid isPermaLink="false">https://jaguchi.com/?p=487</guid>

					<description><![CDATA[ゆうパックなどを扱う日本郵便の再配達依頼ページの主な問題点を解消する Greasemonkey スクリプト。]]></description>
										<content:encoded><![CDATA[
<p>ゆうパックなどを扱う日本郵便の<a href="https://trackings.post.japanpost.jp/delivery/deli/">再配達依頼ページ</a>の主な問題点を解消する Greasemonkey スクリプトです。</p>



<span id="more-487"></span>



<h2 class="wp-block-heading">問題点と対策</h2>



<p>以下のの使いにくいところをまとめて改善します。</p>



<h3 class="wp-block-heading">1. 郵便番号</h3>



<p>郵便番号を毎回入力しないといけない。</p>



<figure class="wp-block-image aligncenter is-resized"><img loading="lazy" decoding="async" width="1382" height="256" data-attachment-id="490" data-permalink="https://jaguchi.com/blog/2017/01/japan-post-redelivery/021-1-zipcode/" data-orig-file="https://jaguchi.com/wp-content/uploads/2017/01/021-1-zipcode.png" data-orig-size="1382,256" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="郵便番号の入力欄" data-image-description="" data-image-caption="" data-medium-file="https://jaguchi.com/wp-content/uploads/2017/01/021-1-zipcode-300x56.png" data-large-file="https://jaguchi.com/wp-content/uploads/2017/01/021-1-zipcode-1024x190.png" src="https://jaguchi.com/wp-content/uploads/2017/01/021-1-zipcode.png" alt="郵便番号の入力欄" class="wp-image-490" style="width:481px;height:89px" srcset="https://jaguchi.com/wp-content/uploads/2017/01/021-1-zipcode.png 1382w, https://jaguchi.com/wp-content/uploads/2017/01/021-1-zipcode-300x56.png 300w, https://jaguchi.com/wp-content/uploads/2017/01/021-1-zipcode-768x142.png 768w, https://jaguchi.com/wp-content/uploads/2017/01/021-1-zipcode-1024x190.png 1024w, https://jaguchi.com/wp-content/uploads/2017/01/021-1-zipcode-434x80.png 434w, https://jaguchi.com/wp-content/uploads/2017/01/021-1-zipcode-868x161.png 868w" sizes="auto, (max-width: 1382px) 100vw, 1382px" /></figure>



<p class="is-style-success">【改善】自分の郵便番号をスクリプト内に書いておけば自動で入力します。</p>



<hr class="wp-block-separator has-alpha-channel-opacity is-style-dots"/>



<h3 class="wp-block-heading">2. 伝票番号</h3>



<p>自分の伝票番号が「追跡番号」なのか「お知らせ番号」なのかを確認してから入力欄を選ばないといけない。</p>



<figure class="wp-block-image aligncenter is-resized"><img loading="lazy" decoding="async" width="1374" height="852" data-attachment-id="497" data-permalink="https://jaguchi.com/blog/2017/01/japan-post-redelivery/021-2-which-number/" data-orig-file="https://jaguchi.com/wp-content/uploads/2017/01/021-2-which-number.png" data-orig-size="1374,852" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="伝票番号の入力欄が2つある" data-image-description="" data-image-caption="" data-medium-file="https://jaguchi.com/wp-content/uploads/2017/01/021-2-which-number-300x186.png" data-large-file="https://jaguchi.com/wp-content/uploads/2017/01/021-2-which-number-1024x635.png" src="https://jaguchi.com/wp-content/uploads/2017/01/021-2-which-number.png" alt="伝票番号の入力欄が2つある" class="wp-image-497" style="width:469px;height:290px" srcset="https://jaguchi.com/wp-content/uploads/2017/01/021-2-which-number.png 1374w, https://jaguchi.com/wp-content/uploads/2017/01/021-2-which-number-300x186.png 300w, https://jaguchi.com/wp-content/uploads/2017/01/021-2-which-number-768x476.png 768w, https://jaguchi.com/wp-content/uploads/2017/01/021-2-which-number-1024x635.png 1024w, https://jaguchi.com/wp-content/uploads/2017/01/021-2-which-number-434x269.png 434w, https://jaguchi.com/wp-content/uploads/2017/01/021-2-which-number-868x538.png 868w" sizes="auto, (max-width: 1374px) 100vw, 1374px" /></figure>



<p class="is-style-success">【改善】ページロード後に表示されるポップアップに伝票番号を打ち込めば、その桁数から自動的に番号の種類を検出します。</p>



<figure class="wp-block-image aligncenter is-resized"><img loading="lazy" decoding="async" width="1010" height="614" data-attachment-id="509" data-permalink="https://jaguchi.com/blog/2017/01/japan-post-redelivery/021-prompt/" data-orig-file="https://jaguchi.com/wp-content/uploads/2017/01/021-prompt.png" data-orig-size="1010,614" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="伝票番号のポップアップ" data-image-description="" data-image-caption="" data-medium-file="https://jaguchi.com/wp-content/uploads/2017/01/021-prompt-300x182.png" data-large-file="https://jaguchi.com/wp-content/uploads/2017/01/021-prompt.png" src="https://jaguchi.com/wp-content/uploads/2017/01/021-prompt.png" alt="伝票番号のポップアップ" class="wp-image-509" style="width:614px;height:auto" srcset="https://jaguchi.com/wp-content/uploads/2017/01/021-prompt.png 1010w, https://jaguchi.com/wp-content/uploads/2017/01/021-prompt-300x182.png 300w, https://jaguchi.com/wp-content/uploads/2017/01/021-prompt-768x467.png 768w" sizes="auto, (max-width: 1010px) 100vw, 1010px" /><figcaption class="wp-element-caption">ポップアップから伝票番号の種類を自動判別</figcaption></figure>



<hr class="wp-block-separator has-alpha-channel-opacity is-style-dots"/>



<h3 class="wp-block-heading">3. 郵便物の種類</h3>



<p>「郵便物等の種類」を選択するところで「追跡番号」と「お知らせ番号」のブロックが両方あってしんどい。</p>



<figure class="wp-block-image aligncenter is-resized"><img loading="lazy" decoding="async" width="700" height="596" data-attachment-id="498" data-permalink="https://jaguchi.com/blog/2017/01/japan-post-redelivery/021-3-too-many-options/" data-orig-file="https://jaguchi.com/wp-content/uploads/2017/01/021-3-too-many-options.png" data-orig-size="700,596" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="郵便物の種類が多すぎる" data-image-description="" data-image-caption="" data-medium-file="https://jaguchi.com/wp-content/uploads/2017/01/021-3-too-many-options-300x255.png" data-large-file="https://jaguchi.com/wp-content/uploads/2017/01/021-3-too-many-options.png" src="https://jaguchi.com/wp-content/uploads/2017/01/021-3-too-many-options.png" alt="郵便物の種類が多すぎる" class="wp-image-498" style="width:399px;height:340px" srcset="https://jaguchi.com/wp-content/uploads/2017/01/021-3-too-many-options.png 700w, https://jaguchi.com/wp-content/uploads/2017/01/021-3-too-many-options-300x255.png 300w" sizes="auto, (max-width: 700px) 100vw, 700px" /></figure>



<p class="is-style-success">【改善】関係ない選択肢は消します。</p>



<hr class="wp-block-separator has-alpha-channel-opacity is-style-dots"/>



<h3 class="wp-block-heading">4. 配達先</h3>



<p>「ご希望の配達先」はたいがい「ご自宅等」なのでラジオボタンのデフォルトをそこにしておいて欲しいんだけどなってない。</p>



<figure class="wp-block-image aligncenter is-resized"><img loading="lazy" decoding="async" width="700" height="205" data-attachment-id="499" data-permalink="https://jaguchi.com/blog/2017/01/japan-post-redelivery/021-4-no-default-radio/" data-orig-file="https://jaguchi.com/wp-content/uploads/2017/01/021-4-no-default-radio.png" data-orig-size="700,205" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="ラジオボタンのデフォルトがない" data-image-description="" data-image-caption="" data-medium-file="https://jaguchi.com/wp-content/uploads/2017/01/021-4-no-default-radio-300x88.png" data-large-file="https://jaguchi.com/wp-content/uploads/2017/01/021-4-no-default-radio.png" src="https://jaguchi.com/wp-content/uploads/2017/01/021-4-no-default-radio.png" alt="ラジオボタンのデフォルトがない" class="wp-image-499" style="width:428px;height:126px" srcset="https://jaguchi.com/wp-content/uploads/2017/01/021-4-no-default-radio.png 700w, https://jaguchi.com/wp-content/uploads/2017/01/021-4-no-default-radio-300x88.png 300w" sizes="auto, (max-width: 700px) 100vw, 700px" /></figure>



<p class="is-style-success">【改善】デフォルトを「ご自宅等」にします。</p>



<hr class="wp-block-separator has-alpha-channel-opacity is-style-dots"/>



<h2 class="wp-block-heading">5. （おまけ）荷物追跡ページ</h2>



<p>荷物追跡ページに再配達ページに飛ぶリンクがない。</p>



<p class="is-style-success">【改善】「ご不在」という文字が検出されたときは再配達依頼ボタンを挿入し、それをクリックすると伝票番号が入力済みの再配達ページに行けます。</p>



<figure class="wp-block-image aligncenter is-resized"><img loading="lazy" decoding="async" width="704" height="402" data-attachment-id="500" data-permalink="https://jaguchi.com/blog/2017/01/japan-post-redelivery/021-5-delivery-status/" data-orig-file="https://jaguchi.com/wp-content/uploads/2017/01/021-5-delivery-status.png" data-orig-size="704,402" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="荷物追跡ページに再配達ボタンを追加" data-image-description="" data-image-caption="" data-medium-file="https://jaguchi.com/wp-content/uploads/2017/01/021-5-delivery-status-300x171.png" data-large-file="https://jaguchi.com/wp-content/uploads/2017/01/021-5-delivery-status.png" src="https://jaguchi.com/wp-content/uploads/2017/01/021-5-delivery-status.png" alt="荷物追跡ページに再配達ボタンを追加" class="wp-image-500" style="width:522px;height:auto" srcset="https://jaguchi.com/wp-content/uploads/2017/01/021-5-delivery-status.png 704w, https://jaguchi.com/wp-content/uploads/2017/01/021-5-delivery-status-300x171.png 300w" sizes="auto, (max-width: 704px) 100vw, 704px" /><figcaption class="wp-element-caption">再配達依頼ボタンを追加</figcaption></figure>



<hr class="wp-block-separator has-alpha-channel-opacity is-style-dots"/>



<h2 class="wp-block-heading">ダウンロード</h2>



<ul class="wp-block-list">
<li><a href="https://jaguchi.com/uploads/JapanPostRedelivery.user.js">JapanPostRedelivery.user.js</a> (<a href="https://gist.github.com/mirka/6d2aa6a5fe835926b9bf833ec25b3b4c">Gist</a>)</li>
</ul>



<p>スクリプト冒頭の郵便番号を自分のものに書きかえてから使ってください：</p>



<pre class="wp-block-code"><code lang="javascript" class="language-javascript">var my_postcode = "1234567"; // 郵便番号</code></pre>



<hr class="wp-block-separator has-alpha-channel-opacity is-style-dots"/>



<h2 class="wp-block-heading">更新履歴</h2>



<h3 class="wp-block-heading jg-small-heading">v1.1 — 2017/01/29</h3>



<ul class="wp-block-list">
<li>入力された伝票番号のハイフンを無視</li>
</ul>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">487</post-id>	</item>
		<item>
		<title>コナミスポーツクラブのプログラム変更/代行情報を取得するAPI</title>
		<link>https://jaguchi.com/blog/2016/08/konami-api/</link>
		
		<dc:creator><![CDATA[mirka]]></dc:creator>
		<pubDate>Mon, 01 Aug 2016 08:29:04 +0000</pubDate>
				<category><![CDATA[Projects]]></category>
		<guid isPermaLink="false">https://jaguchi.com/?p=434</guid>

					<description><![CDATA[コナミスポーツクラブの代行情報をJSONで返すAPIを作ってみました。]]></description>
										<content:encoded><![CDATA[
<p>コナミスポーツの代行情報ページがいつも見つけにくいところに埋もれていて、さらに複数ページに別れてたりして非常にバッドUIなので、一発で必要な情報だけをJSONで返すAPI風のものを作ってみました。</p>



<span id="more-434"></span>



<figure class="wp-block-image aligncenter is-resized"><img loading="lazy" decoding="async" width="563" height="121" data-attachment-id="437" data-permalink="https://jaguchi.com/blog/2016/08/konami-api/konami-bad-links/" data-orig-file="https://jaguchi.com/wp-content/uploads/2016/07/konami-bad-links.png" data-orig-size="563,121" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="コナミ代行情報リンク" data-image-description="" data-image-caption="&lt;p&gt;小さいし探しにくい&lt;/p&gt;
" data-medium-file="https://jaguchi.com/wp-content/uploads/2016/07/konami-bad-links-300x64.png" data-large-file="https://jaguchi.com/wp-content/uploads/2016/07/konami-bad-links.png" src="https://jaguchi.com/wp-content/uploads/2016/07/konami-bad-links.png" alt="コナミ代行情報リンク" class="wp-image-437" srcset="https://jaguchi.com/wp-content/uploads/2016/07/konami-bad-links.png 563w, https://jaguchi.com/wp-content/uploads/2016/07/konami-bad-links-300x64.png 300w" sizes="auto, (max-width: 563px) 100vw, 563px" /><figcaption class="wp-element-caption">代行情報が見つけにくい</figcaption></figure>



<h2 class="wp-block-heading">使い方</h2>



<pre class="wp-block-code"><code lang="bash" class="language-bash">https://jaguchi.com/konami-api/{施設番号}/changes?q={検索ワード(任意)}</code></pre>



<ol class="wp-block-list">
<li>コナミの<a href="https://www.konami.com/sportsclub/shisetsu/">施設検索ページ</a>などから、施設ページのURLに含まれる6桁の施設番号を調べる。自由が丘店駅前店なら <code>006029</code>、恵比寿店なら <code>006023</code> など。</li>



<li>普段行くクラスやインストラクターの名前を検索ワードにしておくと便利。<code>田中|鈴木</code> のようにしてOR検索も可能。（たまに全然違うフォーマットになってる店舗があるみたいなのでそういうときはうまくマッチしないかも。ひとつの情報が複数行に別れてる場合など）</li>
</ol>



<hr class="wp-block-separator has-alpha-channel-opacity is-style-dots"/>



<h2 class="wp-block-heading">お試し用</h2>



<script type="text/javascript" src="https://jaguchi.com/konami-api/konami.js"></script>
<form id="konami">
	  <label for="facility_cd">施設番号 <span class="required">*</span></label>
	  <input id="facility_cd" name="facility" type="text" value="006023">
	  <label for="query">検索ワード</label>
	  <input id="query" name="q" type="text" value="ヨガ">
	  <button type="submit" class="tucson-field-submit">取得</button>
</form>
<div class="example">
	  <h3>使用例</h3>
	  <pre>curl https://jaguchi.com/konami-api/006023/changes?q=ヨガ</pre>
</div>
<div class="results hide">
	  <h3>結果</h3>
	  <pre></pre>
</div>



<hr class="wp-block-separator has-alpha-channel-opacity is-style-dots"/>



<h2 class="wp-block-heading">更新履歴</h2>



<h3 class="wp-block-heading jg-small-heading">2016/10/07</h3>



<ul class="wp-block-list">
<li>タイムテーブルのサブドメインがリダイレクトされる仕様変更に対応</li>
</ul>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">434</post-id>	</item>
		<item>
		<title>Add Spotify links on iTunes album/artist pages</title>
		<link>https://jaguchi.com/blog/2016/05/add-spotify-links-on-itunes-albumartist-pages/</link>
		
		<dc:creator><![CDATA[mirka]]></dc:creator>
		<pubDate>Sun, 01 May 2016 12:06:56 +0000</pubDate>
				<category><![CDATA[Projects]]></category>
		<category><![CDATA[iTunes]]></category>
		<category><![CDATA[Tampermonkey]]></category>
		<guid isPermaLink="false">https://jaguchi.com/en/?p=186</guid>

					<description><![CDATA[A userscript for Greasemonkey/Tampermonkey that adds Spotify links to iTunes album and artist pages.]]></description>
										<content:encoded><![CDATA[
<p>Is everyone sending you links from Apple Music? Here’s a userscript for Greasemonkey/Tampermonkey that adds Spotify links to iTunes album and artist pages.</p>



<span id="more-186"></span>



<h2 class="wp-block-heading">Download/Install</h2>



<ul class="wp-block-list">
<li><a href="https://jaguchi.com/uploads/SpotifyLinksOniTunes.user.js">SpotifyLinksOniTunes.user.js</a> (<a href="https://gist.github.com/mirka/775dee5c8a4a9fe203469a3d49d75876">Gist</a>)</li>
</ul>



<p><em>Tested in Chrome Tampermonkey and Firefox Greasemonkey. Currently broken in Safari Tampermonkey due to a combination of Apple adding CSP rules to their iTunes pages and <a href="https://github.com/Tampermonkey/tampermonkey/issues/296">Safari ignoring the CSP spec</a> <img src="https://s.w.org/images/core/emoji/15.0.3/72x72/1f641.png" alt="🙁" class="wp-smiley" style="height: 1em; max-height: 1em;" /></em></p>



<hr class="wp-block-separator has-alpha-channel-opacity is-style-dots"/>



<h2 class="wp-block-heading">Important changes in v4.0</h2>



<ul class="wp-block-list">
<li>Due to <a href="https://developer.spotify.com/news-stories/2017/01/27/removing-unauthenticated-calls-to-the-web-api/">recent changes</a> in the Spotify API authentication rules, search calls now require client credentials. Unfortunately, this means your searches must be sent through my server to make API calls on your behalf. If you have privacy concerns, you can use your own credentials and bypass my server (see &#8220;Options&#8221; section below).</li>



<li>The embedded Spotify player had to be removed due to <a href="https://en.wikipedia.org/wiki/Content_Security_Policy">Content Security Policy</a> restrictions that were added in the Apple Music redesign.</li>
</ul>



<h2 class="wp-block-heading">Options</h2>



<ul class="wp-block-list">
<li>If you want the Spotify link to open in the Web Player instead of the desktop app, look for the <code>open_in_app</code> variable at the top of the script and set it to <code>false</code>.</li>



<li>If you want to use your own credentials to communicate with the Spotify API directly, first <a href="https://developer.spotify.com/my-applications">register an application with Spotify</a>. Set up your Client ID and Secret in the &#8220;User preferences (advanced)&#8221; section at the top of the script.</li>
</ul>



<h2 class="wp-block-heading">Match accuracy</h2>



<ul class="wp-block-list">
<li>When multiple matches are found in the Spotify catalog, the first one will be used.</li>



<li>The script will try to work across different locales, but may fail to find a match when the album/artist name on the iTunes page is in an alternative language, like the Chinese <code>史密斯飞船合唱团</code> for <code>Aerosmith</code>. This is a limitation of the Spotify search API. Japanese queries seem to work most of the time, but not always.</li>



<li>The search API may have trouble finding a match due to minor naming discrepancies. If you suspect this is the case, you can always look for it manually on Spotify.</li>
</ul>



<hr class="wp-block-separator has-alpha-channel-opacity is-style-dots"/>



<h2 class="wp-block-heading">Updates</h2>



<h3 class="wp-block-heading jg-small-heading">v4.0.3 — 2018/08/03</h3>



<ul class="wp-block-list">
<li>Minor fixes for design changes</li>
</ul>



<h3 class="wp-block-heading jg-small-heading">v4.0.2 — 2017/12/25</h3>



<ul class="wp-block-list">
<li>Minor fixes for design changes</li>
</ul>



<h3 class="wp-block-heading jg-small-heading">v4.0.1 — 2017/10/29</h3>



<ul class="wp-block-list">
<li>Minor fixes for design changes</li>
</ul>



<h3 class="wp-block-heading jg-small-heading">v4.0 — 2017/06/08</h3>



<ul class="wp-block-list">
<li>Fix for changes in Spotify API authentication rules</li>



<li>Fix for new Apple Music page design</li>



<li>Remove player embedding (now impossible due to Content Security Policy restrictions by Apple)</li>



<li>Make Spotify button a search link when no match found</li>
</ul>



<h3 class="wp-block-heading jg-small-heading">v3.0 — 2017/01/29</h3>



<ul class="wp-block-list">
<li>Vastly improve album matching (Will now handle the majority of naming inconsistencies, including live albums and deluxe editions. Also tries fuzzier search queries for better matching of classical music and soundtracks. Sorry for the occasional false positives.)</li>
</ul>



<h3 class="wp-block-heading jg-small-heading">v2.0 — 2016/11/04</h3>



<ul class="wp-block-list">
<li>Add option to embed Spotify player on album pages</li>
</ul>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">186</post-id>	</item>
		<item>
		<title>アマゾンのTMG便 (ファイズ) に自動再配達電話をかける</title>
		<link>https://jaguchi.com/blog/2016/03/auto-call-amazon-tmg-phyz/</link>
		
		<dc:creator><![CDATA[mirka]]></dc:creator>
		<pubDate>Wed, 09 Mar 2016 08:36:07 +0000</pubDate>
				<category><![CDATA[Projects]]></category>
		<category><![CDATA[AppleScript]]></category>
		<guid isPermaLink="false">https://jaguchi.com/?p=418</guid>

					<description><![CDATA[TMG便／デリバリープロバイダ／PHYZ (ファイズ) に再配達依頼の電話を自動的にかけるシステムを作った。]]></description>
										<content:encoded><![CDATA[
<p>（2017年2月8日 追記 — <a href="/blog/2016/03/auto-call-amazon-tmg-phyz/#tmg-caller-web-generator">ウェブ版</a>もできました）</p>



<p>このところアマゾンからの荷物がTMG便／デリバリープロバイダ／PHYZ (ファイズ) という、正式名称もはっきりしない配送業者から来ることが増えてきた。この業者、ウェブサイトにアマゾン客専用の照会・再配達ページがあるにも関わらず、実際に追跡番号を入力してみると「お問い合わせ情報が存在しません」と表示されるだけで、登録されていたためしがない。2016年にもなって、わざわざ電話をかけないと再配達の依頼もできない。</p>



<p>私は自動受付電話が肉声電話の次に嫌いなので、少しでも心労を和らげようと Mac の <a href="https://support.apple.com/kb/PH18756">iPhone通話機能</a>を利用して半自動的に再配達電話をかける AppleScript を書いてしばらく使っている。</p>



<span id="more-418"></span>



<figure class="wp-block-image alignwide"><img loading="lazy" decoding="async" width="1736" height="1332" data-attachment-id="423" data-permalink="https://jaguchi.com/blog/2016/03/auto-call-amazon-tmg-phyz/018-options/" data-orig-file="https://jaguchi.com/wp-content/uploads/2016/03/018-options.jpg" data-orig-size="1736,1332" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="018-options" data-image-description="" data-image-caption="" data-medium-file="https://jaguchi.com/wp-content/uploads/2016/03/018-options-300x230.jpg" data-large-file="https://jaguchi.com/wp-content/uploads/2016/03/018-options-1024x786.jpg" src="https://jaguchi.com/wp-content/uploads/2016/03/018-options.jpg" alt="入力画面" class="wp-image-423" srcset="https://jaguchi.com/wp-content/uploads/2016/03/018-options.jpg 1736w, https://jaguchi.com/wp-content/uploads/2016/03/018-options-300x230.jpg 300w, https://jaguchi.com/wp-content/uploads/2016/03/018-options-768x589.jpg 768w, https://jaguchi.com/wp-content/uploads/2016/03/018-options-1024x786.jpg 1024w, https://jaguchi.com/wp-content/uploads/2016/03/018-options-434x333.jpg 434w, https://jaguchi.com/wp-content/uploads/2016/03/018-options-868x666.jpg 868w" sizes="auto, (max-width: 1736px) 100vw, 1736px" /><figcaption class="wp-element-caption">AppleScript 版のダイアログ</figcaption></figure>



<p>表示されるダイアログに追跡番号をコピペして、希望日時を選択すると、iPhone経由で自動的に発信して数字を全部入力してくれる。最後に音声案内が依頼内容をまとめて復唱して「よろしければ1を…」みたいに言ってくるので、それを一応確認して自分でキーパッドの “1” を押して終わりという感じ。気づかない間に電話システムが変わってたりしたら困るから最後の確認だけ手動にしてるけど、無鉄砲な人はここの段まで自動化しちゃっていいと思う。</p>



<hr class="wp-block-separator has-alpha-channel-opacity is-style-dots"/>



<h2 class="wp-block-heading" id="tmg-caller-web-generator">ウェブ版も作ってみた</h2>



<p>【2017年2月8日 追記】Googleのページランクが想定外に高くなってしまい、なんか申し訳ないのでAppleScriptを使わずにウェブから電話をかけられるのも作りました。電話発信リンクに対応したスマートフォンやパソコンから使えます。</p>



<script type="text/javascript" src="https://jaguchi.com/tmg-phyz-caller/tmg-phyz-caller.js"></script>

<form id="tmg-phyz-caller">
	<h3>TMG再配達電話ジェネレーター</h3>
	<label for="tmg-tracking">追跡番号（12桁の半角数字）</label>
	<input id="tmg-tracking" title="半角数字12桁の追跡番号を入力してください" maxlength="12" name="tracking" pattern="\d*" required="" type="text">
	<fieldset class="radio-row">
		<legend>
			希望日
		</legend>
		<label>
			<input id="tmg-radio-today" checked="checked" name="day" type="radio" value="today" data-com="">
			当日
		</label>
		<label>
			<input id="tmg-radio-tomorrow" name="day" type="radio" value="tomorrow" data-com="">
			翌日
		</label>
	</fieldset>
	<label for="tmg-timeslot">希望時間</label>
	<select id="tmg-timeslot">
		<option value="1">9〜12時</option>
		<option value="2">12〜14時</option>
		<option value="3">14〜16時</option>
		<option value="4">16〜18時</option>
		<option value="5">18〜20時</option>
		<option value="6">20〜21時</option>
		<option value="7">指定時間なし</option>
	</select>
<p class="help-text">（受付時間: 9〜18時は当日9時まで、18〜21時は当日18時まで）</p>
<p><button type="submit">電話番号を生成する</button></p>

	<div id="tmg-phyz-caller-result" class="hide result">
		<a>再配達依頼の自動電話をかける →</a><br>
		<p class="help-text">
			（最後に依頼内容を復唱されるのでそれを確認して “1” を押してください）
		</p>
	</div>
</form>



<hr class="wp-block-separator has-alpha-channel-opacity is-style-dots"/>



<h2 class="wp-block-heading">AppleScript版</h2>



<pre class="wp-block-code"><code lang="applescript" class="language-applescript">-- 指定した内容でTMG便に再配達依頼の電話をかける。最後に依頼内容を復唱されるのでそのときに"1"を押して終わり。
-- 2017年2月8日 更新
property dialog_title : "TMG便 - 再配達依頼"
property phone_no : "050-5525-7445"
property my_days : {"当日", "翌日"}
property my_timeslots : {"9〜12時", "12〜14時", "14〜16時", "16〜18時", "18〜20時", "20〜21時", "指定時間なし"}

tell application "System Events"
	activate
	
	-- 追跡番号
	set track_no to text returned of (display dialog "追跡番号" default answer "" with title dialog_title)
	
	if (count of track_no) is not 12 then
		display alert dialog_title message "追跡番号が12桁ではありません"
		error number -128 -- exit
	end if
	
	-- 希望日
	set my_day_response to (choose from list my_days with title dialog_title with prompt "希望日:" default items (item 1 of my_days))
	if my_day_response is false then error number -128 -- exit
	set my_day_code to my getIndexInArray((item 1 of my_day_response), my_days)
	
	-- 希望時間
	set my_timeslot_response to (choose from list my_timeslots with title dialog_title with prompt "※ 受付時間" &amp; return &amp; "9〜18時は当日9時まで" &amp; return &amp; "18〜21時は当日18時まで" &amp; return &amp; return &amp; "希望時間:" default items (item 1 of my_timeslots))
	if my_timeslot_response is false then error number -128 -- exit
	set my_timeslot_code to my getIndexInArray((item 1 of my_timeslot_response), my_timeslots)
	
	-- 確認
	display dialog "【追跡番号】" &amp; track_no &amp; return &amp; "【希望日時】" &amp; (item 1 of my_day_response) &amp; " " &amp; (item 1 of my_timeslot_response) &amp; return &amp; return &amp; "この内容で発信しますか？" with title dialog_title
	
	-- 現在時刻を元に調整
	set current_time to time of (current date)
	if current_time &gt; (18 * 3600) then -- past 18:00
		set day_string to ""
	else
		set day_string to my_day_code &amp; ",,,1,,,"
	end if
	
	-- 発信
	open location "tel:" &amp; phone_no &amp; ",,,,,," &amp; track_no &amp; "#,,,,,,,1" &amp; ",,," &amp; day_string &amp; my_timeslot_code &amp; ",,,,1"
	
end tell

on getIndexInArray(my_item, my_array)
	repeat with i from 1 to the count of my_array
		if item i of my_array is my_item then return i
	end repeat
	return 0
end getIndexInArray</code></pre>



<p>TMGサイトの一時的なトラブルかと思って我慢していたけど、何ヶ月経っても直らないので早く直してほしい。</p>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">418</post-id>	</item>
		<item>
		<title>Slack Plugin for Keyboard Maestro</title>
		<link>https://jaguchi.com/blog/2015/03/slack-plugin-for-keyboard-maestro/</link>
		
		<dc:creator><![CDATA[mirka]]></dc:creator>
		<pubDate>Fri, 20 Mar 2015 17:14:06 +0000</pubDate>
				<category><![CDATA[Projects]]></category>
		<category><![CDATA[Keyboard Maestro]]></category>
		<guid isPermaLink="false">https://jaguchi.com/en/?p=172</guid>

					<description><![CDATA[This is a handy plug-in action I’ve been using to post messages to Slack from Keyboard Maestro. It makes it super easy to integrate automated Slack posts in your workflows, or even set up an array of bots with different names and icons. Download on GitHub Update (Aug 3, 2020) — My Keyboard Maestro actions [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p>This is a handy plug-in action I’ve been using to post messages to <a href="http://slack.com/">Slack</a> from <a href="http://www.keyboardmaestro.com/">Keyboard Maestro</a>.</p>



<span id="more-172"></span>



<p>It makes it super easy to integrate automated Slack posts in your workflows, or even set up an array of bots with different names and icons.</p>



<h2 class="wp-block-heading">Download on GitHub</h2>



<p><em>Update (Aug 3, 2020) — My Keyboard Maestro actions are now </em><a href="https://github.com/mirka/keyboard-maestro-plugin-actions"><em>hosted on GitHub</em></a><em>. The rest of this page may be out of date.</em></p>



<h2 class="wp-block-heading">How to use</h2>



<p>Make sure you have an <a href="https://api.slack.com/incoming-webhooks">Incoming Webhook integration</a> set up. If you don’t, <a href="https://my.slack.com/services/new/incoming-webhook/">make one</a>. (The settings here don’t really matter because the target channel, username, and icon can all be overridden from the Keyboard Maestro action.)</p>



<ul class="wp-block-list"><li><strong>Webhook URL</strong>: Paste the URL (https://hooks.slack.com/services/…) here</li><li><strong>Channel or DM</strong>: Choose a #channelname to post to, or a @username for direct messages (Tip: For testing purposes, put your own username here so nobody else will see the posts!)</li><li><strong>Username</strong>: A name for your bot</li><li><strong>Icon Type</strong>: Icons can either be an Emoji or pulled from a URL</li><li><strong>Icon</strong>: If you chose Emoji in the previous field, put an <a href="https://slack.zendesk.com/hc/en-us/articles/202931348-Using-emoji-and-emoticons">emoji shortcut name</a> here. Otherwise specify an image URL.</li></ul>



<h2 class="wp-block-heading">Download</h2>



<ul class="wp-block-list"><li><a href="https://jaguchi.com/uploads/Post_to_Slack.zip">Post to Slack</a> <em>— updated 2015/03/24</em></li></ul>



<p>Drop the .zip file on the Keyboard Maestro dock icon to install. <em>Requires Keyboard Maestro 6.</em></p>



<h2 class="wp-block-heading">Updates</h2>



<p>To update an existing action, remove it from the Keyboard Maestro Actions folder (<code>~/Library/Application Support/Keyboard Maestro/Keyboard Maestro Actions</code>) and reinstall the new version.</p>



<h3 class="jg-small-heading wp-block-heading">2015/03/24</h3>



<ul class="wp-block-list"><li>Escape double quotes in Username/Message fields</li><li>Preserve line breaks in Message field</li></ul>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">172</post-id>	</item>
		<item>
		<title>ファイル転送サイトから自動ダウンロード</title>
		<link>https://jaguchi.com/blog/2014/06/autodownloader-jp/</link>
		
		<dc:creator><![CDATA[mirka]]></dc:creator>
		<pubDate>Sun, 01 Jun 2014 14:28:51 +0000</pubDate>
				<category><![CDATA[Projects]]></category>
		<category><![CDATA[Tampermonkey]]></category>
		<guid isPermaLink="false">https://jaguchi.com/?p=355</guid>

					<description><![CDATA[宅ふぁいる便、GigaFile便、Firestorage などの各種ファイル転送サービスから、規約同意ボタンやリンク表示ボタンなどを飛ばしてファイルの自動ダウンロードを試みる Greasemonkey スクリプトです。 対応サイト ダウンロード サイトの仕様変更などで使えなくなってるサービスがあったら教えてください。 更新履歴 今まで Userscripts.org で公開していましたが、サイトの不具合が長期化しているのでここにミラーします。 v1.1.12 —&#160;2018/11/12 v1.1.11 — 2017/01/26 v1.1.10 — 2016/05/02 v1.1.9 — 2015/09/16 v1.1.8 — 2015/04/12 v1.1.7 — 2014/07/06 v1.1.6 — 2014/06/01 v1.1.5 v1.1.4 v1.1.3 v1.1.2 v1.1.1 v1.1]]></description>
										<content:encoded><![CDATA[
<p>宅ふぁいる便、GigaFile便、Firestorage などの各種ファイル転送サービスから、規約同意ボタンやリンク表示ボタンなどを飛ばしてファイルの自動ダウンロードを試みる Greasemonkey スクリプトです。</p>



<span id="more-355"></span>



<figure class="wp-block-image jg-image-bordered"><img decoding="async" src="https://jaguchi.com/wp-content/uploads/2014/06/015-shared_link.png" alt="メールで送られたリンク" class="wp-image-357"/><figcaption class="wp-element-caption">メールの共有リンクをクリックするだけでダウンロード開始</figcaption></figure>



<h2 class="wp-block-heading">対応サイト</h2>



<ul class="wp-block-list">
<li>Firestorage</li>



<li>宅ふぁいる便</li>



<li>宅ふぁいる便プレミアム</li>



<li>宅ふぁいる便ビジネスプラス</li>



<li>FilePost</li>



<li>GigaFile便</li>



<li>おくりん坊</li>



<li>データ便</li>
</ul>



<h2 class="wp-block-heading">ダウンロード</h2>



<ul class="wp-block-list">
<li><a href="https://jaguchi.com/uploads/AutoDownloaderJP.user.js">AutoDownloaderJP.user.js</a> (<a href="https://gist.github.com/mirka/3aa99cc04fefe7034288">Gist</a>)</li>
</ul>



<p>サイトの仕様変更などで使えなくなってるサービスがあったら教えてください。</p>



<hr class="wp-block-separator has-alpha-channel-opacity is-style-dots"/>



<h2 class="wp-block-heading">更新履歴</h2>



<p>今まで <a href="http://userscripts.org:8080/scripts/show/134261">Userscripts.org で公開</a>していましたが、サイトの不具合が長期化しているのでここにミラーします。</p>



<h3 class="wp-block-heading jg-small-heading">v1.1.12 —&nbsp;2018/11/12</h3>



<ul class="wp-block-list">
<li>GigaFile便のHTTPS化に対応</li>
</ul>



<h3 class="wp-block-heading jg-small-heading">v1.1.11 — 2017/01/26</h3>



<ul class="wp-block-list">
<li>GigaFile便 v5 に対応</li>
</ul>



<h3 class="wp-block-heading jg-small-heading">v1.1.10 — 2016/05/02</h3>



<ul class="wp-block-list">
<li>宅ふぁいる便の混雑時用サーバ (taku.filesend.to) に対応</li>
</ul>



<h3 class="wp-block-heading jg-small-heading">v1.1.9 — 2015/09/16</h3>



<ul class="wp-block-list">
<li>宅ふぁいる便の非会員登録版、会員登録版（プレミアム）の仕様分離に対応</li>



<li>宅ふぁいる便の一括ダウンロードボタンに対応</li>
</ul>



<h3 class="wp-block-heading jg-small-heading">v1.1.8 — 2015/04/12</h3>



<ul class="wp-block-list">
<li>Firestorage ワンタイムURLに対応</li>



<li>GigaFile便 v4 に対応</li>
</ul>



<h3 class="wp-block-heading jg-small-heading">v1.1.7 — 2014/07/06</h3>



<ul class="wp-block-list">
<li>データ便でのバグを修正</li>



<li>コードの整理</li>
</ul>



<h3 class="wp-block-heading jg-small-heading">v1.1.6 — 2014/06/01</h3>



<ul class="wp-block-list">
<li>GigaFile便の仕様変更に対応</li>
</ul>



<h3 class="wp-block-heading jg-small-heading">v1.1.5</h3>



<ul class="wp-block-list">
<li>宅ふぁいる便の仕様変更に対応</li>
</ul>



<h3 class="wp-block-heading jg-small-heading">v1.1.4</h3>



<ul class="wp-block-list">
<li>GigaFile便の仕様変更に対応</li>
</ul>



<h3 class="wp-block-heading jg-small-heading">v1.1.3</h3>



<ul class="wp-block-list">
<li>宅ふぁいる便ビジネスプラス (www.takufile.com) に対応</li>
</ul>



<h3 class="wp-block-heading jg-small-heading">v1.1.2</h3>



<ul class="wp-block-list">
<li>宅ふぁいる便の新デザインに対応</li>
</ul>



<h3 class="wp-block-heading jg-small-heading">v1.1.1</h3>



<ul class="wp-block-list">
<li>Firestorageの短縮URL（xfs.jp）に対応</li>
</ul>



<h3 class="wp-block-heading jg-small-heading">v1.1</h3>



<ul class="wp-block-list">
<li>おくりん坊 (okurin.bitpark.co.jp)、データ便 (datadeliver.net) に対応</li>



<li>FilePostの一部URLからダウンロードされなかった問題を修正</li>
</ul>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">355</post-id>	</item>
		<item>
		<title>TextSoap Actions for Keyboard Maestro</title>
		<link>https://jaguchi.com/blog/2014/06/textsoap-actions-for-keyboard-maestro/</link>
		
		<dc:creator><![CDATA[mirka]]></dc:creator>
		<pubDate>Sat, 31 May 2014 16:28:33 +0000</pubDate>
				<category><![CDATA[Projects]]></category>
		<category><![CDATA[Keyboard Maestro]]></category>
		<guid isPermaLink="false">https://jaguchi.com/en/?p=159</guid>

					<description><![CDATA[Here are two Plug-in Actions for using TextSoap cleaners in Keyboard Maestro. Download on GitHub Update (Aug 3, 2020) — My Keyboard Maestro actions are now hosted on GitHub. The rest of this page may be out of date. How to use Put the full name of a TextSoap cleaner in the Cleaner field. Text [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p>Here are two Plug-in Actions for using <a href="http://www.unmarked.com/textsoap/">TextSoap</a> cleaners in <a href="http://www.keyboardmaestro.com/">Keyboard Maestro</a>.</p>



<span id="more-159"></span>



<h2 class="wp-block-heading">Download on GitHub</h2>



<p><em>Update (Aug 3, 2020) — My Keyboard Maestro actions are now </em><a href="https://github.com/mirka/keyboard-maestro-plugin-actions"><em>hosted on GitHub</em></a><em>. The rest of this page may be out of date.</em></p>



<h2 class="wp-block-heading">How to use</h2>



<p>Put the full name of a TextSoap cleaner in the Cleaner field. <a href="https://wiki.keyboardmaestro.com/Tokens">Text tokens</a> can also be used here.</p>



<p>Note that the “Clean Plain Text” version will <em>not</em> retain any formatting in rich text input, even if a clipboard is specified. To keep rich text formatting in tact or to apply rich text cleaners, you must use the “Clean Clipboard” action.</p>



<h2 class="wp-block-heading">Download</h2>



<ul class="wp-block-list"><li><a href="https://jaguchi.com/uploads/Clean_Clipboard_with_TextSoap.zip">Clean Clipboard with TextSoap</a></li><li><a href="https://jaguchi.com/uploads/Clean_Plain_Text_with_TextSoap.zip">Clean Plain Text with TextSoap</a></li></ul>



<p>Drop the .zip file on the Keyboard Maestro dock icon to install. <em>Requires TextSoap 8 and Keyboard Maestro 6+.</em></p>



<h2 class="wp-block-heading">Updates</h2>



<p>To update an existing action, remove it from the Keyboard Maestro Actions folder (<code>~/Library/Application Support/Keyboard Maestro/Keyboard Maestro Actions</code>) and reinstall the new version.</p>



<h3 class="jg-small-heading wp-block-heading">2017/01/01</h3>



<ul class="wp-block-list"><li>Updated for TextSoap 8</li></ul>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">159</post-id>	</item>
	</channel>
</rss>

<!--
Performance optimized by W3 Total Cache. Learn more: https://www.boldgrid.com/w3-total-cache/?utm_source=w3tc&utm_medium=footer_comment&utm_campaign=free_plugin

Page Caching using Disk: Enhanced 

Served from: jaguchi.com @ 2026-05-10 21:54:24 by W3 Total Cache
-->