Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 4c09ec0
Showing
4 changed files
with
80 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>CFBundleExecutable</key> | ||
<string>core.sh</string> | ||
<key>CFBundleIconFile</key> | ||
<string>icon.icns</string> | ||
<key>CFBundlePackageType</key> | ||
<string>APPL</string> | ||
<key>CFBundleSignature</key> | ||
<string>????</string> | ||
</dict> | ||
</plist> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/sh | ||
|
||
/Applications/Gyazolife.app/Contents/MacOS/gyazolife & | ||
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/usr/bin/env perl | ||
use strict; | ||
use warnings; | ||
use Config::Pit; | ||
use WebService::Hatena::Fotolife; | ||
|
||
my $config = pit_get('hatena.ne.jp'); | ||
my $filename = '/tmp/gyazolife.png'; | ||
unlink $filename if -e $filename; | ||
|
||
if (!system "screencapture -i $filename") { | ||
my $hatena = WebService::Hatena::Fotolife->new; | ||
$hatena->username($config->{username}); | ||
$hatena->password($config->{password}); | ||
|
||
my ($date) = $hatena->createEntry( | ||
title => $ARGV[0], | ||
filename => $filename, | ||
folder => $config->{fotolife}{folder} || '', | ||
) =~ /(\d{14})$/; | ||
my $url = sprintf "http://f.hatena.ne.jp/%s/%s", $config->{username}, $date; | ||
|
||
unlink $filename; | ||
system "echo $url | pbcopy"; | ||
system "open $url"; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# Gyazolife | ||
|
||
gyazoっぽい感じでフォトライフにスクリーンショットをアップロードします。 | ||
|
||
## 依存モジュール | ||
|
||
以下のモジュールをあらかじめCPANからインストールしてください。 | ||
|
||
- WebService::Hatena::Fotolife | ||
- Config::Pit | ||
|
||
## 使い方 | ||
|
||
Config::PitをCPANらインストールした後、 | ||
|
||
$ ppit set hatena.ne.jp | ||
|
||
とすると、エディタが起動するので、以下のようなYAMLを記述してください。 | ||
|
||
--- | ||
"username": はてなID | ||
"password": パスワード | ||
"fotolife": | ||
"folder": アップロード先フォルダ(なければ空でいいです) | ||
|
||
あとは、Gyazolife.appを/Application以下にコピーして適当に実行してください。 | ||
|
||
## COPYRIGHT AND LICENSE (The MIT License) | ||
|
||
Copyright (c) Kintaro Kuribayashi | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |