atig 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (171) hide show
  1. data/.gitignore +24 -0
  2. data/Gemfile +3 -0
  3. data/README.mkdn +52 -0
  4. data/Rakefile +15 -0
  5. data/atig.gemspec +25 -0
  6. data/bin/atig +74 -0
  7. data/docs/OMakefile +32 -0
  8. data/docs/OMakeroot +45 -0
  9. data/docs/_static/allow.png +0 -0
  10. data/docs/_static/emacs.png +0 -0
  11. data/docs/_static/irc_setting.png +0 -0
  12. data/docs/_static/irssi.png +0 -0
  13. data/docs/_static/limechat.png +0 -0
  14. data/docs/_static/limechat_s.png +0 -0
  15. data/docs/_static/oauth_channel.png +0 -0
  16. data/docs/_static/screenshot.png +0 -0
  17. data/docs/_static/structure.png +0 -0
  18. data/docs/_static/verify.png +0 -0
  19. data/docs/changelog.rst +96 -0
  20. data/docs/commandline_options.rst +21 -0
  21. data/docs/commands.rst +84 -0
  22. data/docs/conf.py +194 -0
  23. data/docs/config.rst +159 -0
  24. data/docs/feature.rst +41 -0
  25. data/docs/graphics.graffle +1995 -0
  26. data/docs/hacking_guide.rst +43 -0
  27. data/docs/index.rst +109 -0
  28. data/docs/irc.rst +31 -0
  29. data/docs/options.rst +75 -0
  30. data/docs/quickstart.rst +89 -0
  31. data/docs/resize.sh +7 -0
  32. data/docs/tiarra.rst +2 -0
  33. data/docs/tig.rst +21 -0
  34. data/lib/atig.rb +19 -0
  35. data/lib/atig/agent.rb +8 -0
  36. data/lib/atig/agent/agent.rb +38 -0
  37. data/lib/atig/agent/clenup.rb +23 -0
  38. data/lib/atig/agent/dm.rb +35 -0
  39. data/lib/atig/agent/following.rb +45 -0
  40. data/lib/atig/agent/full_list.rb +20 -0
  41. data/lib/atig/agent/list.rb +55 -0
  42. data/lib/atig/agent/list_status.rb +46 -0
  43. data/lib/atig/agent/mention.rb +13 -0
  44. data/lib/atig/agent/other_list.rb +18 -0
  45. data/lib/atig/agent/own_list.rb +18 -0
  46. data/lib/atig/agent/stream_follow.rb +38 -0
  47. data/lib/atig/agent/timeline.rb +13 -0
  48. data/lib/atig/agent/user_stream.rb +31 -0
  49. data/lib/atig/basic_twitter.rb +116 -0
  50. data/lib/atig/bitly.rb +52 -0
  51. data/lib/atig/channel.rb +5 -0
  52. data/lib/atig/channel/channel.rb +17 -0
  53. data/lib/atig/channel/dm.rb +14 -0
  54. data/lib/atig/channel/list.rb +76 -0
  55. data/lib/atig/channel/mention.rb +20 -0
  56. data/lib/atig/channel/retweet.rb +28 -0
  57. data/lib/atig/channel/timeline.rb +74 -0
  58. data/lib/atig/command.rb +21 -0
  59. data/lib/atig/command/autofix.rb +58 -0
  60. data/lib/atig/command/command.rb +24 -0
  61. data/lib/atig/command/command_helper.rb +95 -0
  62. data/lib/atig/command/destroy.rb +44 -0
  63. data/lib/atig/command/dm.rb +31 -0
  64. data/lib/atig/command/favorite.rb +27 -0
  65. data/lib/atig/command/info.rb +50 -0
  66. data/lib/atig/command/limit.rb +15 -0
  67. data/lib/atig/command/location.rb +23 -0
  68. data/lib/atig/command/name.rb +18 -0
  69. data/lib/atig/command/option.rb +37 -0
  70. data/lib/atig/command/refresh.rb +18 -0
  71. data/lib/atig/command/reply.rb +37 -0
  72. data/lib/atig/command/retweet.rb +63 -0
  73. data/lib/atig/command/search.rb +51 -0
  74. data/lib/atig/command/spam.rb +26 -0
  75. data/lib/atig/command/status.rb +41 -0
  76. data/lib/atig/command/thread.rb +44 -0
  77. data/lib/atig/command/time.rb +32 -0
  78. data/lib/atig/command/uptime.rb +32 -0
  79. data/lib/atig/command/user.rb +42 -0
  80. data/lib/atig/command/user_info.rb +27 -0
  81. data/lib/atig/command/version.rb +49 -0
  82. data/lib/atig/command/whois.rb +39 -0
  83. data/lib/atig/db/db.rb +60 -0
  84. data/lib/atig/db/followings.rb +131 -0
  85. data/lib/atig/db/listenable.rb +22 -0
  86. data/lib/atig/db/lists.rb +76 -0
  87. data/lib/atig/db/roman.rb +30 -0
  88. data/lib/atig/db/sized_uniq_array.rb +62 -0
  89. data/lib/atig/db/sql.rb +35 -0
  90. data/lib/atig/db/statuses.rb +147 -0
  91. data/lib/atig/db/transaction.rb +47 -0
  92. data/lib/atig/exception_util.rb +26 -0
  93. data/lib/atig/gateway.rb +62 -0
  94. data/lib/atig/gateway/channel.rb +99 -0
  95. data/lib/atig/gateway/session.rb +326 -0
  96. data/lib/atig/http.rb +95 -0
  97. data/lib/atig/ifilter.rb +7 -0
  98. data/lib/atig/ifilter/expand_url.rb +74 -0
  99. data/lib/atig/ifilter/retweet.rb +14 -0
  100. data/lib/atig/ifilter/retweet_time.rb +16 -0
  101. data/lib/atig/ifilter/sanitize.rb +18 -0
  102. data/lib/atig/ifilter/strip.rb +15 -0
  103. data/lib/atig/ifilter/utf7.rb +26 -0
  104. data/lib/atig/ifilter/xid.rb +36 -0
  105. data/lib/atig/levenshtein.rb +49 -0
  106. data/lib/atig/monkey.rb +4 -0
  107. data/lib/atig/oauth-patch.rb +40 -0
  108. data/lib/atig/oauth.rb +55 -0
  109. data/lib/atig/ofilter.rb +4 -0
  110. data/lib/atig/ofilter/escape_url.rb +102 -0
  111. data/lib/atig/ofilter/footer.rb +20 -0
  112. data/lib/atig/ofilter/geo.rb +17 -0
  113. data/lib/atig/ofilter/short_url.rb +47 -0
  114. data/lib/atig/option.rb +90 -0
  115. data/lib/atig/scheduler.rb +79 -0
  116. data/lib/atig/search.rb +22 -0
  117. data/lib/atig/search_twitter.rb +21 -0
  118. data/lib/atig/sized_hash.rb +33 -0
  119. data/lib/atig/stream.rb +66 -0
  120. data/lib/atig/twitter.rb +79 -0
  121. data/lib/atig/twitter_struct.rb +63 -0
  122. data/lib/atig/unu.rb +27 -0
  123. data/lib/atig/update_checker.rb +53 -0
  124. data/lib/atig/url_escape.rb +62 -0
  125. data/lib/atig/util.rb +16 -0
  126. data/lib/atig/version.rb +3 -0
  127. data/lib/memory_profiler.rb +77 -0
  128. data/spec/command/autofix_spec.rb +35 -0
  129. data/spec/command/destroy_spec.rb +98 -0
  130. data/spec/command/dm_spec.rb +28 -0
  131. data/spec/command/favorite_spec.rb +55 -0
  132. data/spec/command/limit_spec.rb +27 -0
  133. data/spec/command/location_spec.rb +25 -0
  134. data/spec/command/name_spec.rb +19 -0
  135. data/spec/command/option_spec.rb +133 -0
  136. data/spec/command/refresh_spec.rb +22 -0
  137. data/spec/command/reply_spec.rb +79 -0
  138. data/spec/command/retweet_spec.rb +66 -0
  139. data/spec/command/spam_spec.rb +27 -0
  140. data/spec/command/status_spec.rb +44 -0
  141. data/spec/command/thread_spec.rb +91 -0
  142. data/spec/command/time_spec.rb +52 -0
  143. data/spec/command/uptime_spec.rb +55 -0
  144. data/spec/command/user_info_spec.rb +42 -0
  145. data/spec/command/user_spec.rb +50 -0
  146. data/spec/command/version_spec.rb +67 -0
  147. data/spec/command/whois_spec.rb +78 -0
  148. data/spec/db/followings_spec.rb +100 -0
  149. data/spec/db/listenable_spec.rb +32 -0
  150. data/spec/db/lists_spec.rb +104 -0
  151. data/spec/db/roman_spec.rb +17 -0
  152. data/spec/db/sized_uniq_array_spec.rb +63 -0
  153. data/spec/db/statuses_spec.rb +180 -0
  154. data/spec/ifilter/expand_url_spec.rb +44 -0
  155. data/spec/ifilter/retweet_spec.rb +28 -0
  156. data/spec/ifilter/retweet_time_spec.rb +25 -0
  157. data/spec/ifilter/sanitize_spec.rb +25 -0
  158. data/spec/ifilter/sid_spec.rb +29 -0
  159. data/spec/ifilter/strip_spec.rb +23 -0
  160. data/spec/ifilter/tid_spec.rb +29 -0
  161. data/spec/ifilter/utf7_spec.rb +30 -0
  162. data/spec/levenshtein_spec.rb +24 -0
  163. data/spec/ofilter/escape_url_spec.rb +50 -0
  164. data/spec/ofilter/footer_spec.rb +32 -0
  165. data/spec/ofilter/geo_spec.rb +33 -0
  166. data/spec/ofilter/short_url_spec.rb +127 -0
  167. data/spec/option_spec.rb +91 -0
  168. data/spec/sized_hash_spec.rb +45 -0
  169. data/spec/spec_helper.rb +35 -0
  170. data/spec/update_checker_spec.rb +55 -0
  171. metadata +326 -0
data/.gitignore ADDED
@@ -0,0 +1,24 @@
1
+ *~
2
+ *.omc
3
+ .omakedb
4
+ .omakedb.lock
5
+ _build
6
+ *.db
7
+ .DS_Store
8
+ .gem
9
+ *.rbc
10
+ .bundle
11
+ .config
12
+ .yardoc
13
+ Gemfile.lock
14
+ InstalledFiles
15
+ _yardoc
16
+ coverage
17
+ doc/
18
+ lib/bundler/man
19
+ pkg
20
+ rdoc
21
+ spec/reports
22
+ test/tmp
23
+ test/version_tmp
24
+ tmp
data/Gemfile ADDED
@@ -0,0 +1,3 @@
1
+ source :rubygems
2
+
3
+ gemspec
data/README.mkdn ADDED
@@ -0,0 +1,52 @@
1
+ Atig.rb - Another Twitter Irc Gateway
2
+ ===========================================
3
+
4
+ OVERVIEW
5
+ --------
6
+ Atig.rb is Twitter Irc Gateway.
7
+
8
+ Atig.rb is forked from cho45's tig.rb. We improve some features of tig.rb.
9
+
10
+ PREREQUISITES
11
+ -------------
12
+
13
+ * Ruby 1.8 or 1.9
14
+ * sqlite3-ruby
15
+ * json(when use Ruby 1.8)
16
+ * rspec(for unit test)
17
+ * rake(for unit test)
18
+
19
+ HOW TO USE
20
+ ----------
21
+
22
+ You type:
23
+
24
+ $ cd atig
25
+ $ ruby atig.rb -d
26
+ I, [2010-04-05T07:22:07.861527 #62002] INFO -- : Host: localhost Port:16668
27
+
28
+ and access localhost:16668 by Irc client.
29
+
30
+ DOCUMENTS
31
+ ---------
32
+ See `docs/`, if you could read Japanese.
33
+
34
+ BRANCH POLICY
35
+ -------------
36
+
37
+ * master: a branch for current release.
38
+ * testing: a branch for next release.
39
+ * other branches: feature branch
40
+
41
+ LICENCE
42
+ -------
43
+ This program is free software; you can redistribute it and/or
44
+ modify it under Ruby Lincence.
45
+
46
+ AUTHOR
47
+ ------
48
+ MIZUNO "mzp" Hiroki (mzp@happyabc.org)
49
+
50
+ AVAILABILITY
51
+ ------------
52
+ The complete atig.rb distribution can be accessed at this[http://mzp.github.com/atig/]..
data/Rakefile ADDED
@@ -0,0 +1,15 @@
1
+ # -*- mode:ruby -*-
2
+ require 'rubygems'
3
+ require 'rake'
4
+ require 'rake/clean'
5
+ require 'rake/packagetask'
6
+ require 'rspec/core/rake_task'
7
+ require "bundler/gem_tasks"
8
+
9
+ RSpec::Core::RakeTask.new do |t|
10
+ t.rspec_opts = ['--color']
11
+ t.pattern = 'spec/**/*_spec.rb'
12
+ end
13
+
14
+ task :default => [:spec]
15
+ task :package => [:clean]
data/atig.gemspec ADDED
@@ -0,0 +1,25 @@
1
+ # -*- encoding: utf-8 -*-
2
+ require File.expand_path('../lib/atig/version', __FILE__)
3
+
4
+ Gem::Specification.new do |gem|
5
+ gem.authors = ["SHIBATA Hiroshi"]
6
+ gem.email = ["shibata.hiroshi@gmail.com"]
7
+ gem.description = %q{Atig.rb is Twitter Irc Gateway.}
8
+ gem.summary = %q{Atig.rb is forked from cho45's tig.rb. We improve some features of tig.rb.}
9
+ gem.homepage = "https://github.com/mzp/atig"
10
+
11
+ gem.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
12
+ gem.files = `git ls-files`.split("\n")
13
+ gem.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
14
+ gem.name = "atig"
15
+ gem.require_paths = ["lib"]
16
+ gem.version = Atig::VERSION
17
+
18
+ gem.add_dependency 'sqlite3-ruby', ['~> 1.2.5']
19
+ gem.add_dependency 'net-irc', ['>= 0']
20
+ gem.add_dependency 'oauth', ['>= 0']
21
+
22
+ gem.add_dependency 'rake', ['>= 0'] unless defined? Rake
23
+ gem.add_dependency 'json', ['>= 0'] unless defined? JSON
24
+ gem.add_development_dependency 'rspec', ['>= 0']
25
+ end
data/bin/atig ADDED
@@ -0,0 +1,74 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ self_file =
4
+ if File.symlink?(__FILE__)
5
+ require 'pathname'
6
+ Pathname.new(__FILE__).realpath
7
+ else
8
+ __FILE__
9
+ end
10
+ $:.unshift(File.dirname(self_file) + "/../lib")
11
+
12
+ require "optparse"
13
+
14
+ opts = {
15
+ :port => 16668,
16
+ :host => "localhost",
17
+ :log => nil,
18
+ :debug => false,
19
+ :foreground => false,
20
+ :conf => '~/.atig/config',
21
+ }
22
+
23
+ OptionParser.new do |parser|
24
+ parser.instance_eval do
25
+ self.banner = <<EOB.gsub(/^\t+/, "")
26
+ age: #{$0} [opts]
27
+ EOB
28
+ separator ""
29
+
30
+ separator "Options:"
31
+ on("-p", "--port [PORT=#{opts[:port]}]", "port number to listen") do |port|
32
+ opts[:port] = port
33
+ end
34
+
35
+ on("-h", "--host [HOST=#{opts[:host]}]", "host name or IP address to listen") do |host|
36
+ opts[:host] = host
37
+ end
38
+
39
+ on("-l", "--log LOG", "log file") do |log|
40
+ opts[:log] = log
41
+ end
42
+
43
+ on("--debug", "Enable debug mode") do |debug|
44
+ opts[:log] ||= $stderr
45
+ opts[:debug] = true
46
+ end
47
+
48
+ on("--memprof", "Enable memory profiler") do|_|
49
+ require 'memory_profiler'
50
+ require 'fileutils'
51
+ FileUtils.mkdir_p "log"
52
+ MemoryProfiler.start(:string_debug => true)
53
+ end
54
+
55
+ on("-c","--conf [file=#{opts[:conf]}]", "atig configuration file; default is '~/.atig/config'") do|name|
56
+ opts[:conf] = name
57
+ end
58
+
59
+ parse!(ARGV)
60
+ end
61
+ end
62
+
63
+ require 'logger'
64
+ opts[:logger] = Logger.new(opts[:log], "weekly")
65
+ opts[:logger].level = opts[:debug] ? Logger::DEBUG : Logger::INFO
66
+
67
+ conf = File.expand_path opts[:conf]
68
+ if File.exist? conf then
69
+ opts[:logger].info "Loading #{conf}"
70
+ load conf
71
+ end
72
+
73
+ require 'atig'
74
+ Net::IRC::Server.new(opts[:host], opts[:port], Atig::Gateway::Session, opts).start
data/docs/OMakefile ADDED
@@ -0,0 +1,32 @@
1
+ # OMakefile for Sphinx documentation
2
+ #
3
+
4
+ # You can set these variables from the command line.
5
+ SPHINXOPTS =
6
+ SPHINXBUILD = sphinx-build
7
+ PAPER =
8
+ BUILDDIR = _build
9
+
10
+ # Internal variables.
11
+ PAPEROPT_a4 = -D latex_paper_size=a4
12
+ ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_a4) $(SPHINXOPTS) .
13
+
14
+ SRCS[] =
15
+ index
16
+ config
17
+ options
18
+ tiarra
19
+ commandline_options
20
+ commands
21
+ quickstart
22
+ feature
23
+ irc
24
+ changelog
25
+ tig
26
+
27
+ .PHONY : clean
28
+ .DEFAULT: $(addsuffix .rst, $(SRCS))
29
+ $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
30
+
31
+ clean:
32
+ rm -rf $(BUILDDIR)/html/* *~
data/docs/OMakeroot ADDED
@@ -0,0 +1,45 @@
1
+ ########################################################################
2
+ # Permission is hereby granted, free of charge, to any person
3
+ # obtaining a copy of this file, to deal in the File without
4
+ # restriction, including without limitation the rights to use,
5
+ # copy, modify, merge, publish, distribute, sublicense, and/or
6
+ # sell copies of the File, and to permit persons to whom the
7
+ # File is furnished to do so, subject to the following condition:
8
+ #
9
+ # THE FILE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
10
+ # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
11
+ # OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
12
+ # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
13
+ # DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
14
+ # OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE FILE OR
15
+ # THE USE OR OTHER DEALINGS IN THE FILE.
16
+
17
+ ########################################################################
18
+ # The standard OMakeroot file.
19
+ # You will not normally need to modify this file.
20
+ # By default, your changes should be placed in the
21
+ # OMakefile in this directory.
22
+ #
23
+ # If you decide to modify this file, note that it uses exactly
24
+ # the same syntax as the OMakefile.
25
+ #
26
+
27
+ #
28
+ # Include the standard installed configuration files.
29
+ # Any of these can be deleted if you are not using them,
30
+ # but you probably want to keep the Common file.
31
+ #
32
+ open build/C
33
+ open build/OCaml
34
+ open build/LaTeX
35
+
36
+ #
37
+ # The command-line variables are defined *after* the
38
+ # standard configuration has been loaded.
39
+ #
40
+ DefineCommandVars()
41
+
42
+ #
43
+ # Include the OMakefile in this directory.
44
+ #
45
+ .SUBDIRS: .
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -0,0 +1,96 @@
1
+ 更新履歴
2
+ ==============
3
+
4
+ v0.3.2(2010-10-10)
5
+ ------------------------------
6
+ http://github.com/mzp/atig/tree/v0.3.2
7
+
8
+ 機能追加
9
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
10
+ - :doc:`config`: `Atig::IFilter::RetweetTime` を追加しました
11
+
12
+ 機能修正
13
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
14
+ - DBのデータ削除の周期を減らしました
15
+ - DMチャンネルでのDMの送信に対応しました
16
+ - :doc:`commands`: `limit` にリセットされる日付を表示するようにした (thx. `hirose31`_ )
17
+ - :doc:`config`: 自動展開するURLにhtn.to, goo.glを追加
18
+
19
+ .. _hirose31: http://twitter.com/hirose31
20
+
21
+ v0.3.1(2010-07-26)
22
+ ------------------------------
23
+ http://github.com/mzp/atig/tree/v0.3.1
24
+
25
+ 機能追加
26
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
27
+ - :doc:`commands`: `refresh` を追加しました
28
+ - :doc:`commands`: `spam` を追加しました
29
+ - :doc:`agent` : 他人のリストをフォローできるようになりました
30
+
31
+ 機能修正
32
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
33
+ - キャッシュを/tmp/atigに置くように変更しました。
34
+ - 定期的にキャッシュ中の古い内容を削除するように変更しました。
35
+
36
+ バグ修正
37
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
38
+ - アンフォローしたユーザがキャッシュ中に残るバグを修正
39
+
40
+
41
+ v0.3.0(2010-06-12)
42
+ ------------------------------
43
+ http://github.com/mzp/atig/tree/v0.3.0
44
+
45
+ 機能追加
46
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
47
+ - :doc:`commands`: `search` を追加しました。(thx. `xeres`_ )
48
+
49
+ .. _xeres: http://blog.xeres.jp/2010/06/04/atig_rb-tweet-search/
50
+
51
+ 機能修正
52
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
53
+ - キャッシュとして用いているSQLiteのDBにインデックスを貼るようにしました。(thx. `L_star`_ )
54
+ - 定期的にGCを起動し、メモリ消費量を抑えるようにしました。
55
+ - 誤ったBit.lyのAPIキーを指定した際のエラーメッセージを分かりやすくしました。( `Issues 1`_ )
56
+
57
+ .. _L_Star: http://d.hatena.ne.jp/mzp/20100407#c
58
+ .. _Issues 1: http://github.com/mzp/atig/issues/closed#issue/1
59
+
60
+ バグ修正
61
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
62
+
63
+
64
+
65
+ v0.2.1(2010-04-17)
66
+ ------------------------------
67
+ http://github.com/mzp/atig/tree/v0.2.1
68
+
69
+ 機能追加
70
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
71
+ - :doc:`commands`: `autofix`, `location` を追加しました。
72
+ - :doc:`irc`: `/topic` が `/me autofix` のエイリアスになりました。
73
+ - 最新の発言を削除した場合、トピック(topic)をひとつ前に戻すようにした
74
+
75
+ v0.2(2010-04-11)
76
+ ------------------------------
77
+ http://github.com/mzp/atig/tree/v0.2
78
+
79
+ 機能追加
80
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
81
+ - :doc:`options`: `sid` を追加した。
82
+ - :doc:`config`: `Atig::IFilter::Sid` を追加した。
83
+ - :doc:`options`: `old_style_reply` を追加した。
84
+ - :doc:`commands`: `reply`, `retweet`, `destory`, `fav`, `unfav`, `thread` でスクリーンネームやsidを利用できるようにした。
85
+
86
+ バグ修正
87
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
88
+ - followingの取得時にSSL Verified Errorが発生する不具合を修正
89
+
90
+ v0.1
91
+ ------------------------------
92
+
93
+ http://github.com/mzp/atig/tree/v0.1
94
+
95
+ - 最初のリリース
96
+
@@ -0,0 +1,21 @@
1
+ コマンドラインオプション
2
+ ==============================
3
+
4
+ 書式
5
+ ------------------------------
6
+ ::
7
+
8
+ ruby atig.rb [opts]
9
+
10
+ オプション
11
+ ------------------------------
12
+ `-p`, `--port` ``PORT``
13
+ 起動するポート番号を指定します。デフォルトは16668です。
14
+ `-h`, `--host` ``HOST``
15
+ 起動するホスト名、またはIPアドレスを指定します。デフォルトはlocalhostです。
16
+ `-l`, `--log` ``LOG``
17
+ ログを記録するファイル名を指定します。
18
+ `--debug`
19
+ デバッグモードを有効にします。
20
+ `-c`, `--conf` ``filename``
21
+ ロードする設定ファイルを指定します。詳しくは doc:`conf` を参照してください。
data/docs/commands.rst ADDED
@@ -0,0 +1,84 @@
1
+ CTCP ACTION
2
+ ==================================
3
+
4
+ 概要
5
+ ------------------------------
6
+
7
+ CTCP ACTIONによって、特定の発言への返信などが行なえます。
8
+
9
+ CTCP ACTIONの送り方はクライアントによって異なりますが、LimeChatやirssi
10
+ では ``/me`` です。 例えば、replyコマンド送信する場合は ``/me reply a`` のようになります。
11
+
12
+ 発言関係
13
+ ------------------------------
14
+ 発言の指定方法について
15
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
16
+
17
+ 以下で ``tweet`` と書かれている部分では、次の書式が利用できます。
18
+
19
+ - `a`: 一致するtidを持つ発言を指します。
20
+ - `nick:a`: 一致するsidを持つ発言を指します。
21
+ - `nick`: @nickの最新の発言を指します。
22
+ - `@nick`: @nickの最新の発言を指します。
23
+
24
+ コマンド
25
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
26
+ reply ``tweet`` ``comment`` (別名: mention, re, rp)
27
+ ``tweet`` に対して返信します。
28
+ retweet ``tweet`` [``comment``] (別名: rt, ort)
29
+ ``tweet`` をリツイートします。
30
+ コメントが省略された場合は、公式リツイートになります。
31
+ destroy ``tweet`` (別名: remove, rm)
32
+ ``tweet`` を削除する。 ``tweet`` の発言が自分のものでない場合はエラーになります。
33
+ fav ``tweet``
34
+ ``tweet`` をお気に入りに追加します。
35
+ unfav ``tweet``
36
+ ``tweet`` をお気に入りから削除します。
37
+ thread ``tweet`` [``count``]
38
+ ``tweet`` のin_reply_toを辿って、最大 ``count`` 件の会話を表示します。
39
+ ``count`` が省略された場合は10件になります。 ``count`` は20件以上を指定しても無視されます。
40
+ autofix ``comment`` (別名: topic)
41
+ 最新の発言が ``comment`` と類似している場合はその発言を削除し、 ``comment`` を発言として投稿します。
42
+ autofix! ``tweet`` (別名: topic!)
43
+ 最新の発言を削除し、 ``comment`` を発言として投稿します。
44
+ search [ ``option`` ] ``text`` (別名: s)
45
+ ``text`` を含む発言を検索します。
46
+ オプションは ``:lang=<国コード>`` のみサポートしています。``/me s :lang=ja hoge`` だと日本人のツイートのみを検索します。
47
+
48
+
49
+ ユーザ関係
50
+ ------------------------------
51
+ userinfo ``screen_name`` (別名: bio)
52
+ ``screen_name`` のユーザのプロフィールを表示します。
53
+ version ``screen_name``
54
+ ``screen_name`` のクライアントの情報を表示します。最新の発言に用いたクライアント名を表示します。
55
+ time ``screen_name``
56
+ ``screen_name`` のタイムゾーン情報を表示します。
57
+ user ``screen_name`` [``count``] (別名: u)
58
+ ``screen_name`` のユーザの最新の発言 ``count`` 件を表示します。
59
+ ``count`` が省略された場合は20件になります。 ``count`` は
60
+ 200件以上を指定しても無視されます。
61
+ spam ``screen_name``
62
+ ``screen_name`` のユーザをスパムアカウントとして通報します。
63
+
64
+ プロフィール関連
65
+ ------------------------------
66
+ location ``place`` (別名: in, location)
67
+ 自分の現在地を ``place`` に更新します。
68
+ name ``name``
69
+ 自分の名前を ``name`` に更新します。
70
+
71
+ システム関係
72
+ ------------------------------
73
+ uptime
74
+ atig.rbの連続起動時間を表示します。
75
+ limit (別名: limits, rls)
76
+ 残りのAPIへのアクセス可能回数を表示します。
77
+ opt (別名: opts, option, options)
78
+ 設定された :doc:`options` 一覧を表示します。
79
+ opt ``name`` (別名: opts, option, options)
80
+ 名前 ``name`` の :doc:`options` が持つ値を表示します。
81
+ opt ``name`` ``value`` (別名: opts, option, options)
82
+ 名前 ``name`` の :doc:`options` が持つ値を ``value`` に更新します。
83
+ refresh
84
+ フォローしているユーザ一覧を再読み込みさせます。