Upgrade to Pro — share decks privately, control downloads, hide ads and more …

入力した CIDR のネットワーク・アドレスを表示する Alfred ワークフローを作った

Sponsored · Your Podcast. Everywhere. Effortlessly. Share. Educate. Inspire. Entertain. You do you. We'll handle the rest. →
lorentzca
November 12, 2017

入力した CIDR のネットワーク・アドレスを表示する Alfred ワークフローを作った

FFLT の資料です。

lorentzca

November 12, 2017

Transcript

13 slides
  1. ͳΜ͔ͷॲཧΛ͢Δ Alfred ͷ Script Filter Λ࢖͏ͱ೚ҙͷίʔυΛ࢖ͬͯ݁ՌΛ Alfred ʹ౉͢͜ͱ͕ग़དྷΔ • ࠓճͷ৔߹͸Ϣʔβʔ͕ೖྗͨ͠

    CIDR ΛҾ਺ͱͯ͠ Go Ͱ࡞ ͬͨπʔϧʹ౉͠ɺ • ωοτϫʔΫɾΞυϨεΛ json Ͱฦ͢ ॲཧΛߦ͏ ※ Go ͷ net ύοέʔδΛ࢖༻ͯ͠ CIDR ͷॲཧΛ͍ͯ͠Δɻ
  2. ͳΜ͔ͷॲཧΛ͢Δ Script FilterͰ࡞੒ͨ͠σʔλΛ Alfred ΁౉͢ࡍͷϑΥʔϚοτ͸ json ͔ xml Λબ΂Δɻjson ͸

    Alfred 3 ͔ΒରԠͨ͠ɻ ! json ܗࣜͷϑΥʔϚοτͷྫ͸ҎԼ(࠷௿ݶඞཁͳͷ͸ {"items": [{"title": "hoge"}]} )ɻ {"items": [ { "title": "hoge", "arg": "hoge" } ]} ※ arg ͕ॏཁɻ
  3. ·ͱΊ • Alfred ͸ॊೈʹ৭ʑग़དྷΔ ! • ޷͖ͳεΫϦϓτΛ࢖ͬͯͳΜ͔͢Δࡍʹ͸ɺ Script Filter Λ

    ࢖͏͜ͱͱ json ϑΥʔϚοτ Λ࢖͏͜ͱɺ arg Φϓγϣϯ Λ ࢖͏͜ͱ͕ॏཁ • ωοτϫʔΫɾΞυϨεҎ֎΋දࣔͰ͖ΔΑ͏ʹ͍ͨ͠
  4. ࢀߟϦϯΫ Go • net - The Go Programming Language •

    json - The Go Programming Language Alfred • Features Overview - Alfred Help and Support • Script Filter - Workflow Input Objects - Alfred Help and Support • Script Filter JSON Format - Workflow Input Objects - Alfred

More Decks by lorentzca

Other Decks in Programming