auto_pilot 0.2.0 → 0.2.2
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/Gemfile +1 -0
- data/README.md +20 -33
- data/bin/autopilot +0 -1
- data/lib/auto_pilot/api.rb +1 -1
- data/lib/auto_pilot/templates/auto_pilot_config.rb +3 -6
- data/lib/auto_pilot/util/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 31f0a871e61e3a2789c986aca15b456ab86ee2d2
|
4
|
+
data.tar.gz: 190c3264df5b5e4e95972bf3b44d162907e0762b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5cbf091386da4bf9babf69b2ae3742f0c9d4baf565e7d474ac68ae7cebcfee26b600fd662004ffdf9241d058aef2677a85808da1f0cdd24c1e3a7539b899314e
|
7
|
+
data.tar.gz: 48d446d702430bcc55785819fd242fd6a5c37068f8a3fe0988487f0458be4071f98969549d45417e6f76e717b9a95b869acf5d12dd59d9de4e82179962ac4c95
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -5,47 +5,34 @@
|
|
5
5
|
[](https://codeclimate.com/github/lfender6445/auto_pilot)
|
6
6
|
-->
|
7
7
|
|
8
|
-
use this ruby gem to convert your [stackoverflow](http://www.stackoverflow.com/) profile to a [jekyll blog](
|
8
|
+
use this ruby gem to convert your [stackoverflow](http://www.stackoverflow.com/) profile to a [jekyll blog](http://jekyllrb.com/)
|
9
9
|
|
10
|
+
in its current form, autopilot will fetch questions you've answered (with a score greater than 0) and convert them to markdown or html
|
10
11
|
|
11
|
-
# usage
|
12
|
-
supports conversion to html or [markdown](https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet)
|
12
|
+
# install + usage
|
13
13
|
|
14
|
-
|
14
|
+
- add `gem 'auto_pilot', '~> 0.2.0'` to gemfile
|
15
|
+
- install via `bundle`
|
16
|
+
- run `autopilot` from command line
|
15
17
|
|
16
|
-
|
18
|
+
from there, you can [configure](https://github.com/lfender6445/auto_pilot/blob/master/lib/auto_pilot/templates/auto_pilot_config.rb) auto_pilot's performance
|
17
19
|
|
18
|
-
|
19
|
-
gem 'auto_pilot'
|
20
|
-
```
|
20
|
+
it is recommended you [sign up for an API key](http://stackapps.com/apps/oauth/register) prior to use
|
21
21
|
|
22
|
-
|
22
|
+
## screenshots
|
23
|
+
- [side by side](http://i.imgur.com/Ffbzequ.png)
|
24
|
+
- [question view](http://i.imgur.com/O206sol.png)
|
23
25
|
|
24
|
-
|
26
|
+
## contributing
|
25
27
|
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
## Usage
|
31
|
-
|
32
|
-
TODO: Write usage instructions here
|
33
|
-
|
34
|
-
## Contributing
|
35
|
-
|
36
|
-
1. Fork it ( https://github.com/[my-github-username]/auto_pilot/fork )
|
37
|
-
2. Create your feature branch (`git checkout -b my-new-feature`)
|
38
|
-
3. Commit your changes (`git commit -am 'Add some feature'`)
|
39
|
-
4. Push to the branch (`git push origin my-new-feature`)
|
40
|
-
5. Create a new Pull Request
|
28
|
+
1. fork it
|
29
|
+
2. create your feature branch
|
30
|
+
3. commit your changes
|
41
31
|
|
42
32
|
## todo
|
43
33
|
|
44
|
-
|
45
|
-
|
46
|
-
support
|
47
|
-
|
48
|
-
|
49
|
-
# api
|
50
|
-
api.stackexchange.com/2.1
|
51
|
-
|
34
|
+
- support date of answer in filenames
|
35
|
+
- get questions after date 2015-03-01
|
36
|
+
- support embed of original question url
|
37
|
+
- add documenation for template customization
|
38
|
+
- add demo repo
|
data/bin/autopilot
CHANGED
data/lib/auto_pilot/api.rb
CHANGED
@@ -62,7 +62,7 @@ module AutoPilot
|
|
62
62
|
|
63
63
|
def filtered(answers)
|
64
64
|
if answers.length > 0
|
65
|
-
filtered_answers = answers.flatten.uniq.select { |answer| answer.score > 0 }
|
65
|
+
filtered_answers = answers.flatten.uniq.select { |answer| answer.score > (AutoPilot.configuration.score_threshold || 0) }
|
66
66
|
[].tap do |arr|
|
67
67
|
filtered_answers.each do |answer|
|
68
68
|
arr << { answer_id: answer.answer_id, question_id: answer.question_id }
|
@@ -4,19 +4,16 @@ AutoPilot.configure do |config|
|
|
4
4
|
config.key = nil
|
5
5
|
# string - a stackoverflow username
|
6
6
|
config.user = 'username'
|
7
|
-
#
|
7
|
+
# integer - score must be greater than threshold in order to qualify for download
|
8
|
+
config.score_threshold = -1
|
9
|
+
# string - where to put markdown or html files
|
8
10
|
config.folder = 'stackoverflow'
|
9
11
|
# array - convert to [:md], [:html], or both eg [:md, :html]
|
10
12
|
config.format = [:md]
|
11
13
|
# boolean - prevent frontmatter from being added to markdown files
|
12
14
|
config.disable_front_matter = false
|
13
15
|
# integer - max pages when crawling paginated answers on your user page
|
14
|
-
# config.max_pages = 50
|
15
16
|
config.max_pages = 2
|
16
17
|
# integer - time to wait between http requests (optional, eg 3 is 3 seconds)
|
17
18
|
config.throttle = 3
|
18
|
-
|
19
|
-
# TODO: support date confiugrations
|
20
|
-
# hash - retrieve questions and answers within a date range eg { start: '2000-01-00', end: '2015-03-05' }
|
21
|
-
# config.date = { start: '2000-01-00', end: Time.now.to_s.split(' ').first }
|
22
19
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: auto_pilot
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Luke Fender
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-03-
|
11
|
+
date: 2015-03-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|