ayadn 0.6.4 → 1.0.0
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.
- checksums.yaml +4 -4
- data/.gitignore +20 -0
- data/.rspec +2 -0
- data/.travis.yml +17 -0
- data/Gemfile +14 -0
- data/Guardfile +26 -0
- data/LICENSE.txt +22 -0
- data/MANUAL.md +946 -0
- data/README.md +26 -411
- data/Rakefile +6 -0
- data/ayadn.gemspec +39 -0
- data/bin/ayadn +3 -3
- data/lib/ayadn.rb +12 -25
- data/lib/ayadn/action.rb +1121 -0
- data/lib/ayadn/alias.rb +106 -0
- data/lib/ayadn/api.rb +312 -301
- data/lib/ayadn/app.rb +429 -365
- data/lib/ayadn/authorize.rb +127 -28
- data/lib/ayadn/blacklist.rb +116 -0
- data/lib/ayadn/cnx.rb +105 -0
- data/lib/ayadn/databases.rb +110 -0
- data/lib/ayadn/descriptions.rb +1043 -0
- data/lib/ayadn/endpoints.rb +220 -153
- data/lib/ayadn/errors.rb +37 -0
- data/lib/ayadn/extend.rb +4 -10
- data/lib/ayadn/fileops.rb +48 -0
- data/lib/ayadn/logs.rb +32 -0
- data/lib/ayadn/pinboard.rb +46 -35
- data/lib/ayadn/post.rb +229 -212
- data/lib/ayadn/scroll.rb +251 -0
- data/lib/ayadn/set.rb +377 -0
- data/lib/ayadn/settings.rb +195 -0
- data/lib/ayadn/status.rb +226 -165
- data/lib/ayadn/switch.rb +72 -0
- data/lib/ayadn/version.rb +4 -0
- data/lib/ayadn/view.rb +506 -269
- data/lib/ayadn/workers.rb +362 -0
- data/spec/helpers.rb +19 -0
- data/spec/mock/@ericd.json +160 -0
- data/spec/mock/@m.json +45 -0
- data/spec/mock/checkins.json +1856 -0
- data/spec/mock/fwr_@ayadn.json +1077 -0
- data/spec/mock/posted.json +1 -0
- data/spec/mock/stream.json +1 -0
- data/spec/spec_helper.rb +14 -0
- data/spec/unit/api_spec.rb +61 -0
- data/spec/unit/databases_spec.rb +5 -0
- data/spec/unit/descriptions_spec.rb +9 -0
- data/spec/unit/endpoints_spec.rb +35 -0
- data/spec/unit/post_spec.rb +136 -0
- data/spec/unit/status_spec.rb +9 -0
- data/spec/unit/view_spec.rb +119 -0
- data/spec/unit/workers_spec.rb +147 -0
- metadata +216 -40
- data/CHANGELOG.md +0 -250
- data/CONTRIBUTORS.md +0 -5
- data/LICENSE.md +0 -14
- data/lib/ayadn/adn_files.rb +0 -84
- data/lib/ayadn/client-http.rb +0 -226
- data/lib/ayadn/colors.rb +0 -62
- data/lib/ayadn/config.yml +0 -35
- data/lib/ayadn/debug.rb +0 -36
- data/lib/ayadn/files.rb +0 -184
- data/lib/ayadn/get-api.rb +0 -43
- data/lib/ayadn/help.rb +0 -152
- data/lib/ayadn/list.rb +0 -89
- data/lib/ayadn/main.rb +0 -542
- data/lib/ayadn/requires.rb +0 -12
- data/lib/ayadn/skip.rb +0 -27
- data/lib/ayadn/tools.rb +0 -208
- data/lib/ayadn/user-stream.rb +0 -91
- data/lib/ayadn/view-channels.rb +0 -120
- data/lib/ayadn/view-interactions.rb +0 -57
- data/lib/ayadn/view-object.rb +0 -195
- data/lib/experiments.rb +0 -109
@@ -0,0 +1,195 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
module Ayadn
|
3
|
+
class Settings
|
4
|
+
|
5
|
+
AYADN_CLIENT_ID = "hFsCGArAjgJkYBHTHbZnUvzTmL4vaLHL"
|
6
|
+
|
7
|
+
class << self
|
8
|
+
attr_accessor :options, :config
|
9
|
+
attr_reader :user_token
|
10
|
+
end
|
11
|
+
|
12
|
+
def self.load_config
|
13
|
+
db = Daybreak::DB.new(Dir.home + "/ayadn/accounts.db")
|
14
|
+
active = db['ACTIVE']
|
15
|
+
home = db[active][:path]
|
16
|
+
@config = {
|
17
|
+
paths: {
|
18
|
+
home: home,
|
19
|
+
log: "#{home}/log",
|
20
|
+
db: "#{home}/db",
|
21
|
+
pagination: "#{home}/pagination",
|
22
|
+
config: "#{home}/config",
|
23
|
+
auth: "#{home}/auth",
|
24
|
+
downloads: "#{home}/downloads",
|
25
|
+
backup: "#{home}/backup",
|
26
|
+
posts: "#{home}/backup/posts",
|
27
|
+
messages: "#{home}/backup/messages",
|
28
|
+
lists: "#{home}/backup/lists"
|
29
|
+
},
|
30
|
+
identity: {
|
31
|
+
id: db[active][:id],
|
32
|
+
username: db[active][:username],
|
33
|
+
handle: db[active][:handle]
|
34
|
+
}
|
35
|
+
}
|
36
|
+
db.close
|
37
|
+
@options = self.defaults
|
38
|
+
end
|
39
|
+
|
40
|
+
def self.get_token
|
41
|
+
if self.has_token_file?
|
42
|
+
@user_token = self.read_token_file
|
43
|
+
else
|
44
|
+
puts Status.not_authorized
|
45
|
+
exit
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
def self.init_config
|
50
|
+
@config[:version] = VERSION
|
51
|
+
@config[:platform] = RbConfig::CONFIG['host_os']
|
52
|
+
self.config_file
|
53
|
+
self.create_api_file
|
54
|
+
self.create_version_file
|
55
|
+
end
|
56
|
+
|
57
|
+
def self.save_config
|
58
|
+
File.write(@config[:paths][:config] + "/config.yml", @options.to_yaml)
|
59
|
+
end
|
60
|
+
|
61
|
+
def self.has_token_file?
|
62
|
+
File.exist?(@config[:paths][:auth] + "/token")
|
63
|
+
end
|
64
|
+
|
65
|
+
def self.read_token_file
|
66
|
+
File.read(@config[:paths][:auth] + "/token")
|
67
|
+
end
|
68
|
+
|
69
|
+
def self.config_file
|
70
|
+
config_file = @config[:paths][:config] + "/config.yml"
|
71
|
+
if File.exist?(config_file)
|
72
|
+
# TODO: system to merge existing config file when future category are added
|
73
|
+
begin
|
74
|
+
@options = YAML.load(File.read(config_file))
|
75
|
+
rescue => e
|
76
|
+
Errors.global_error("myconfig/load config.yml", nil, e)
|
77
|
+
end
|
78
|
+
else
|
79
|
+
begin
|
80
|
+
self.write_config_file(config_file, @options)
|
81
|
+
rescue => e
|
82
|
+
Errors.global_error("myconfig/create config.yml from defaults", nil, e)
|
83
|
+
end
|
84
|
+
end
|
85
|
+
end
|
86
|
+
|
87
|
+
def self.create_api_file
|
88
|
+
api_file = @config[:paths][:config] + "/api.json"
|
89
|
+
if File.exist?(api_file)
|
90
|
+
if ( File.ctime(api_file) < (Time.now - 172800) ) #48h in secs
|
91
|
+
self.new_api_file(api_file)
|
92
|
+
end
|
93
|
+
else
|
94
|
+
self.new_api_file(api_file)
|
95
|
+
end
|
96
|
+
self.read_api(api_file)
|
97
|
+
end
|
98
|
+
|
99
|
+
def self.create_version_file
|
100
|
+
File.write(@config[:paths][:config] + "/version.yml", {version: @config[:version]}.to_yaml)
|
101
|
+
end
|
102
|
+
|
103
|
+
def self.restore_defaults
|
104
|
+
self.load_config
|
105
|
+
File.write(@config[:paths][:config] + "/config.yml", @options.to_yaml)
|
106
|
+
end
|
107
|
+
|
108
|
+
private
|
109
|
+
|
110
|
+
def self.new_api_file(api_file)
|
111
|
+
api = API.new
|
112
|
+
resp = api.get_config
|
113
|
+
api.check_response_meta_code(resp)
|
114
|
+
File.write(api_file, resp['data'].to_json)
|
115
|
+
end
|
116
|
+
|
117
|
+
def self.read_api(api_file)
|
118
|
+
content = JSON.parse(File.read(api_file))
|
119
|
+
@config[:post_max_length] = content['post']['text_max_length']
|
120
|
+
@config[:message_max_length] = content['message']['text_max_length']
|
121
|
+
end
|
122
|
+
|
123
|
+
def self.has_version_file?
|
124
|
+
File.exist?(@config[:paths][:config] + "/version.yml")
|
125
|
+
end
|
126
|
+
|
127
|
+
def self.read_version_file
|
128
|
+
YAML.load(File.read(@config[:paths][:config] + "/version.yml"))
|
129
|
+
end
|
130
|
+
|
131
|
+
def self.write_config_file(config_file, options)
|
132
|
+
File.write(config_file, options.to_yaml)
|
133
|
+
end
|
134
|
+
|
135
|
+
def self.defaults
|
136
|
+
{
|
137
|
+
timeline: {
|
138
|
+
directed: 1,
|
139
|
+
deleted: 0,
|
140
|
+
html: 0,
|
141
|
+
annotations: 1,
|
142
|
+
show_source: true,
|
143
|
+
show_symbols: true,
|
144
|
+
show_real_name: true,
|
145
|
+
show_date: true
|
146
|
+
},
|
147
|
+
counts: {
|
148
|
+
default: 50,
|
149
|
+
unified: 50,
|
150
|
+
global: 50,
|
151
|
+
checkins: 50,
|
152
|
+
conversations: 50,
|
153
|
+
photos: 50,
|
154
|
+
trending: 50,
|
155
|
+
mentions: 50,
|
156
|
+
convo: 50,
|
157
|
+
posts: 50,
|
158
|
+
messages: 50,
|
159
|
+
search: 100,
|
160
|
+
whoreposted: 50,
|
161
|
+
whostarred: 50,
|
162
|
+
whatstarred: 100,
|
163
|
+
files: 66
|
164
|
+
},
|
165
|
+
formats: {
|
166
|
+
table: {
|
167
|
+
width: 75
|
168
|
+
}
|
169
|
+
},
|
170
|
+
colors: {
|
171
|
+
id: :blue,
|
172
|
+
index: :red,
|
173
|
+
username: :green,
|
174
|
+
name: :magenta,
|
175
|
+
date: :cyan,
|
176
|
+
link: :yellow,
|
177
|
+
dots: :blue,
|
178
|
+
hashtags: :cyan,
|
179
|
+
mentions: :red,
|
180
|
+
source: :cyan,
|
181
|
+
symbols: :green
|
182
|
+
},
|
183
|
+
backup: {
|
184
|
+
auto_save_sent_posts: false,
|
185
|
+
auto_save_sent_messages: false,
|
186
|
+
auto_save_lists: false
|
187
|
+
},
|
188
|
+
scroll: {
|
189
|
+
timer: 3
|
190
|
+
}
|
191
|
+
}
|
192
|
+
end
|
193
|
+
|
194
|
+
end
|
195
|
+
end
|
data/lib/ayadn/status.rb
CHANGED
@@ -1,166 +1,227 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
1
|
# encoding: utf-8
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
end
|
2
|
+
module Ayadn
|
3
|
+
class Status
|
4
|
+
def self.done
|
5
|
+
"\nDone.\n".color(:green)
|
6
|
+
end
|
7
|
+
def self.downloaded(name)
|
8
|
+
"\nFile downloaded in #{Settings.config[:paths][:downloads]}/#{name}\n".color(:green)
|
9
|
+
end
|
10
|
+
def self.downloading
|
11
|
+
"Downloading from ADN...\n".inverse
|
12
|
+
end
|
13
|
+
def self.posting
|
14
|
+
"Posting to ADN...\n".inverse
|
15
|
+
end
|
16
|
+
def self.deleting_post(post_id)
|
17
|
+
"\nDeleting post #{post_id}\n".inverse
|
18
|
+
end
|
19
|
+
def self.unfollowing(username)
|
20
|
+
"\nUnfollowing #{username}\n".inverse
|
21
|
+
end
|
22
|
+
def self.following(username)
|
23
|
+
"\nFollowing #{username}\n".inverse
|
24
|
+
end
|
25
|
+
def self.unmuting(username)
|
26
|
+
"\nUnmuting #{username}\n".inverse
|
27
|
+
end
|
28
|
+
def self.muting(username)
|
29
|
+
"\nMuting #{username}\n".inverse
|
30
|
+
end
|
31
|
+
def self.unblocking(username)
|
32
|
+
"\nUnblocking #{username}\n".inverse
|
33
|
+
end
|
34
|
+
def self.blocking(username)
|
35
|
+
"\nBlocking #{username}\n".inverse
|
36
|
+
end
|
37
|
+
def self.unreposting(post_id)
|
38
|
+
"\nUnreposting #{post_id}\n".inverse
|
39
|
+
end
|
40
|
+
def self.reposting(post_id)
|
41
|
+
"\nReposting #{post_id}\n".inverse
|
42
|
+
end
|
43
|
+
def self.unstarring(post_id)
|
44
|
+
"\nUnstarring #{post_id}\n".inverse
|
45
|
+
end
|
46
|
+
def self.starring(post_id)
|
47
|
+
"\nStarring #{post_id}\n".inverse
|
48
|
+
end
|
49
|
+
def self.not_deleted(post_id)
|
50
|
+
"Could not delete post #{post_id} (post isn't yours, or is already deleted)\n".color(:red)
|
51
|
+
end
|
52
|
+
def self.not_starred(post_id)
|
53
|
+
"Could not star post #{post_id} (post doesn't exist, or is already starred)\n".color(:red)
|
54
|
+
end
|
55
|
+
def self.not_unreposted(post_id)
|
56
|
+
"Could not unrepost post #{post_id} (post isn't yours, isn't a repost, or has been deleted)\n".color(:red)
|
57
|
+
end
|
58
|
+
def self.not_reposted(post_id)
|
59
|
+
"Could not repost post #{post_id} (post has been deleted?)\n".color(:red)
|
60
|
+
end
|
61
|
+
def self.not_unstarred(post_id)
|
62
|
+
"Could not unstar post #{post_id} (post isn't yours, isn't starred, or has been deleted)\n".color(:red)
|
63
|
+
end
|
64
|
+
def self.not_unfollowed(post_id)
|
65
|
+
"Could not unfollow user #{username} (doesn't exist, or wasn't already followed)\n".color(:red)
|
66
|
+
end
|
67
|
+
def self.not_followed(post_id)
|
68
|
+
"Could not follow user #{username} (doesn't exist, or you already follow)\n".color(:red)
|
69
|
+
end
|
70
|
+
def self.not_unmuted(post_id)
|
71
|
+
"Could not unmute user #{username} (doesn't exist, or wasn't already muted)\n".color(:red)
|
72
|
+
end
|
73
|
+
def self.not_muted(post_id)
|
74
|
+
"Could not mute user #{username} (doesn't exist, or is already muted)\n".color(:red)
|
75
|
+
end
|
76
|
+
def self.not_unblocked(post_id)
|
77
|
+
"Could not unblock user #{username} (doesn't exist, or wasn't already blocked)\n".color(:red)
|
78
|
+
end
|
79
|
+
def self.not_blocked(post_id)
|
80
|
+
"Could not block user #{username} (doesn't exist, or is already blocked)\n".color(:red)
|
81
|
+
end
|
82
|
+
def self.deleted(post_id)
|
83
|
+
"\nPost #{post_id} has been deleted.\n".color(:green)
|
84
|
+
end
|
85
|
+
def self.starred(post_id)
|
86
|
+
"\nPost #{post_id} has been starred.\n".color(:green)
|
87
|
+
end
|
88
|
+
def self.unreposted(post_id)
|
89
|
+
"\nPost #{post_id} has been unreposted.\n".color(:green)
|
90
|
+
end
|
91
|
+
def self.reposted(post_id)
|
92
|
+
"\nPost #{post_id} has been reposted.\n".color(:green)
|
93
|
+
end
|
94
|
+
def self.unstarred(post_id)
|
95
|
+
"\nPost #{post_id} has been unstarred.\n".color(:green)
|
96
|
+
end
|
97
|
+
def self.unfollowed(username)
|
98
|
+
"\nUser #{username} has been unfollowed.\n".color(:green)
|
99
|
+
end
|
100
|
+
def self.followed(username)
|
101
|
+
"\nUser #{username} has been followed.\n".color(:green)
|
102
|
+
end
|
103
|
+
def self.unmuted(username)
|
104
|
+
"\nUser #{username} has been unmuted.\n".color(:green)
|
105
|
+
end
|
106
|
+
def self.muted(username)
|
107
|
+
"\nUser #{username} has been muted.\n".color(:green)
|
108
|
+
end
|
109
|
+
def self.unblocked(username)
|
110
|
+
"\nUser #{username} has been unblocked.\n".color(:green)
|
111
|
+
end
|
112
|
+
def self.blocked(username)
|
113
|
+
"\nUser #{username} has been blocked.\n".color(:green)
|
114
|
+
end
|
115
|
+
def self.error_missing_username
|
116
|
+
"\nYou have to specify a username.\n".color(:red)
|
117
|
+
end
|
118
|
+
def self.error_missing_post_id
|
119
|
+
"\nYou have to specify a post id.\n".color(:red)
|
120
|
+
end
|
121
|
+
def self.error_missing_channel_id
|
122
|
+
"\nYou have to specify a channel id.\n".color(:red)
|
123
|
+
end
|
124
|
+
def self.error_missing_hashtag
|
125
|
+
"\nYou have to specify one or more hashtag(s).\n".color(:red)
|
126
|
+
end
|
127
|
+
def self.error_missing_parameters
|
128
|
+
"\nYou have to submit valid items. See 'ayadn -sg' for a list of valid parameters and values.\n".color(:red)
|
129
|
+
end
|
130
|
+
def self.empty_list
|
131
|
+
"\n\nThe list is empty.\n\n".color(:red)
|
132
|
+
end
|
133
|
+
def self.not_found
|
134
|
+
"\n\n404 NOT FOUND - Object does not exist or has been deleted\n\n"
|
135
|
+
end
|
136
|
+
def self.stopped
|
137
|
+
"\n\nStopped.".color(:red)
|
138
|
+
end
|
139
|
+
def self.yourpost
|
140
|
+
"\nYour post:\n\n".color(:cyan)
|
141
|
+
end
|
142
|
+
def self.replying_to(post_id)
|
143
|
+
"\nReplying to post #{post_id}...\n".color(:green)
|
144
|
+
end
|
145
|
+
def self.readline
|
146
|
+
"\nType your text. ".color(:cyan) + "[CTRL+D] ".color(:green) + "to validate, ".color(:cyan) + "[CTRL+C] ".color(:red) + "to cancel.\n\n".color(:cyan)
|
147
|
+
end
|
148
|
+
def self.classic
|
149
|
+
"\nType your text. ".color(:cyan) + "[ENTER] ".color(:green) + "to validate, ".color(:cyan) + "[CTRL+C] ".color(:red) + "to cancel.\n\n".color(:cyan)
|
150
|
+
end
|
151
|
+
def self.reply
|
152
|
+
"\n#{Settings.config[:post_max_length]} ".color(:yellow) + "characters maximum. If the original post has mentions, you text will be inserted after the first one. Markdown links are supported.\n\n"
|
153
|
+
end
|
154
|
+
def self.post
|
155
|
+
"\n#{Settings.config[:post_max_length]} ".color(:yellow) + "characters maximum. Markdown links are supported.\n\n"
|
156
|
+
end
|
157
|
+
def self.message
|
158
|
+
"\n#{Settings.config[:message_max_length]} ".color(:yellow) + "characters maximum. Markdown links are supported.\n\n"
|
159
|
+
end
|
160
|
+
# def self.method_missing(meth, args)
|
161
|
+
# "\nThe command '#{meth} #{args}' doesn't exist.\n".color(:red)
|
162
|
+
# end
|
163
|
+
def self.valid_colors(colors_list)
|
164
|
+
"\nThe valid colors are: #{colors_list}\n".color(:cyan)
|
165
|
+
end
|
166
|
+
def self.not_mutable
|
167
|
+
"\nThis parameter is not modifiable for the time being, sorry.\n".color(:red)
|
168
|
+
end
|
169
|
+
def self.must_be_integer
|
170
|
+
"\nThis paramater must be an integer between 1 and 200.\n".color(:red)
|
171
|
+
end
|
172
|
+
def self.no_new_posts
|
173
|
+
"\nNo new posts since your last visit.\n\n".color(:cyan)
|
174
|
+
end
|
175
|
+
def self.type_and_target_missing
|
176
|
+
"\nYou have to submit a TYPE (mention, hashtag, client name) and a TARGET (a @username, a hashtag, a client name)\n\n".color(:red)
|
177
|
+
end
|
178
|
+
def self.wrong_arguments
|
179
|
+
"\nYou have to submit valid arguments.\n\n".color(:red)
|
180
|
+
end
|
181
|
+
def self.no_pin_creds
|
182
|
+
"\nAyadn couldn't find your Pinboard credentials.\n".color(:red)
|
183
|
+
end
|
184
|
+
def self.pin_creds_saved
|
185
|
+
"\n\nCredentials successfully encoded and saved in database.\n\n".color(:green)
|
186
|
+
end
|
187
|
+
def self.saving_pin
|
188
|
+
"\nSaving post text and links to Pinboard...\n\n".color(:yellow)
|
189
|
+
end
|
190
|
+
def self.error_only_osx
|
191
|
+
"\nThis feature only works with Mac OS X and iTunes, sorry.\n\n".color(:red)
|
192
|
+
end
|
193
|
+
def self.empty_fields
|
194
|
+
"\nCanceled: couldn't get enough information (empty field).\n\n".color(:red)
|
195
|
+
end
|
196
|
+
def self.canceled
|
197
|
+
"\n\nCanceled.\n\n".color(:cyan)
|
198
|
+
end
|
199
|
+
def self.not_authorized
|
200
|
+
"\nYou need to authorize Ayadn before using it.\n\nPlease run 'ayadn authorize' :)\n\n".color(:red)
|
201
|
+
end
|
202
|
+
def self.wtf
|
203
|
+
"\nSomething wrong happened. :(\n\n".color(:red)
|
204
|
+
end
|
205
|
+
def self.redirecting
|
206
|
+
"\nPost is a repost. Redirecting...\n\n".color(:cyan)
|
207
|
+
end
|
208
|
+
def self.nobody_reposted
|
209
|
+
"\nNobody reposted this post.\n\n".color(:red)
|
210
|
+
end
|
211
|
+
def self.nobody_starred
|
212
|
+
"\nNobody starred this post.\n\n".color(:red)
|
213
|
+
end
|
214
|
+
def self.not_your_repost
|
215
|
+
"\nThis post isn't one of your reposts.\n\n".color(:red)
|
216
|
+
end
|
217
|
+
def self.not_your_starred
|
218
|
+
"\nThis isn't one of your starred posts.\n\n".color(:red)
|
219
|
+
end
|
220
|
+
def self.auto
|
221
|
+
view = "\nEntering the auto posting mode.\n\n".color(:cyan)
|
222
|
+
view << "In this mode, each line you type (each time you hit ENTER!) is automatically posted to ADN.\n\n".color(:cyan)
|
223
|
+
view << "At any moment, starting now, hit CTRL+C to exit.\n\n".color(:yellow)
|
224
|
+
view << "\n\t--AUTO POSTING MODE ACTIVATED--\n\n".color(:red)
|
225
|
+
end
|
226
|
+
end
|
227
|
+
end
|