cnblog_back_up_to_markdown 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +3 -0
- data/README.md +28 -9
- data/cnblog_back_up_to_markdown.gemspec +4 -1
- data/lib/cnblog_back_up_to_markdown/version.rb +1 -1
- metadata +39 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 288ba4180f843ef5f6cbf4cfcb125f56f7b6a129
|
4
|
+
data.tar.gz: 632039ea4b0082cc3dab9485e6ad8ab48e33b933
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e8850fe6c08fa68d272573eba0eb2df4ab6ebf228569ea69e40482175c576cb59e0c8deebb938c761420e0eb6f38d7182466f129516d142a86782dbf04221846
|
7
|
+
data.tar.gz: 57d59680c726a95edbba7230a78d8346786e668320e1a4cca22ca93be358c702d4c6cf9012eb82ff5fe30c8367e0d8f64b68d0f0b15e9330a382f574c449a536
|
data/.travis.yml
ADDED
data/README.md
CHANGED
@@ -1,14 +1,23 @@
|
|
1
|
-
|
1
|
+
## Summary
|
2
|
+
[![Gem Version](https://badge.fury.io/rb/cnblog_back_up_to_markdown.svg)](https://badge.fury.io/rb/cnblog_back_up_to_markdown)
|
3
|
+
[![Build Status](https://travis-ci.org/haoxilu/cnblog_back_up_to_markdown.svg?branch=master)](https://travis-ci.org/haoxilu/cnblog_back_up_to_markdown)
|
4
|
+
[![codecov.io](https://codecov.io/github/haoxilu/cnblog_back_up_to_markdown/coverage.svg?branch=master)](https://codecov.io/github/haoxilu/cnblog_back_up_to_markdown?branch=master)
|
2
5
|
|
3
|
-
|
6
|
+
Convert [cnblog bakcup](http://i.cnblogs.com/BlogBackup.aspx) to markdown or markdown file.
|
4
7
|
|
5
|
-
|
8
|
+
Github: [https://github.com/haoxilu/cnblog_back_up_to_markdown](https://github.com/haoxilu/cnblog_back_up_to_markdown)
|
9
|
+
|
10
|
+
Ruby Gem: [https://rubygems.org/gems/cnblog_back_up_to_markdown](https://rubygems.org/gems/cnblog_back_up_to_markdown)
|
11
|
+
## Requirements
|
12
|
+
1. [Nokogiri](http://nokogiri.org/)
|
13
|
+
2. Ruby 1.9.3 or higher
|
6
14
|
|
7
15
|
## Installation
|
8
16
|
|
9
17
|
Add this line to your application's Gemfile:
|
10
18
|
|
11
19
|
```ruby
|
20
|
+
gem 'reverse_markdown'
|
12
21
|
gem 'cnblog_back_up_to_markdown'
|
13
22
|
```
|
14
23
|
|
@@ -22,17 +31,27 @@ Or install it yourself as:
|
|
22
31
|
|
23
32
|
## Usage
|
24
33
|
|
25
|
-
|
34
|
+
### Ruby
|
35
|
+
|
36
|
+
require
|
26
37
|
|
27
|
-
|
38
|
+
```ruby
|
39
|
+
require 'cnblog_back_up_to_markdown'
|
40
|
+
```
|
28
41
|
|
29
|
-
|
42
|
+
use
|
30
43
|
|
31
|
-
|
44
|
+
```ruby
|
45
|
+
file_path = File.expand_path("app/controllers/CNBlogs_BlogBackup_131_201311_201602.xml")
|
46
|
+
File.open(file_path) do |f|
|
47
|
+
@articles = CnblogBackUpToMarkdown::convert(f)
|
48
|
+
end
|
49
|
+
```
|
32
50
|
|
33
|
-
|
51
|
+
### CommandLine
|
52
|
+
It's also possible to convert cnblog's backup file to mrakdown using this library.
|
34
53
|
|
35
|
-
|
54
|
+
cnblog_parser convert CNBlogs_BlogBackup_131_201311_201602.xml
|
36
55
|
|
37
56
|
|
38
57
|
## License
|
@@ -28,9 +28,12 @@ Gem::Specification.new do |spec|
|
|
28
28
|
spec.executables << 'cnblog_parser'
|
29
29
|
spec.require_paths = ["lib"]
|
30
30
|
|
31
|
+
spec.add_dependency 'nokogiri'
|
32
|
+
spec.add_dependency "reverse_markdown", '~> 1.0.1'
|
33
|
+
|
31
34
|
spec.add_development_dependency "bundler", "~> 1.11"
|
32
35
|
spec.add_development_dependency "rake", "~> 10.0"
|
33
36
|
spec.add_development_dependency "rspec", '~> 3.4'
|
34
|
-
spec.add_development_dependency "reverse_markdown", '~> 1.0.1'
|
35
37
|
spec.add_development_dependency "thor", '~> 0.19.1'
|
38
|
+
spec.add_development_dependency "codecov"
|
36
39
|
end
|
metadata
CHANGED
@@ -1,15 +1,43 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cnblog_back_up_to_markdown
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- haoxilu
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-02-
|
11
|
+
date: 2016-02-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: nokogiri
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: reverse_markdown
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 1.0.1
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 1.0.1
|
13
41
|
- !ruby/object:Gem::Dependency
|
14
42
|
name: bundler
|
15
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -53,33 +81,33 @@ dependencies:
|
|
53
81
|
- !ruby/object:Gem::Version
|
54
82
|
version: '3.4'
|
55
83
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
84
|
+
name: thor
|
57
85
|
requirement: !ruby/object:Gem::Requirement
|
58
86
|
requirements:
|
59
87
|
- - "~>"
|
60
88
|
- !ruby/object:Gem::Version
|
61
|
-
version:
|
89
|
+
version: 0.19.1
|
62
90
|
type: :development
|
63
91
|
prerelease: false
|
64
92
|
version_requirements: !ruby/object:Gem::Requirement
|
65
93
|
requirements:
|
66
94
|
- - "~>"
|
67
95
|
- !ruby/object:Gem::Version
|
68
|
-
version:
|
96
|
+
version: 0.19.1
|
69
97
|
- !ruby/object:Gem::Dependency
|
70
|
-
name:
|
98
|
+
name: codecov
|
71
99
|
requirement: !ruby/object:Gem::Requirement
|
72
100
|
requirements:
|
73
|
-
- - "
|
101
|
+
- - ">="
|
74
102
|
- !ruby/object:Gem::Version
|
75
|
-
version: 0
|
103
|
+
version: '0'
|
76
104
|
type: :development
|
77
105
|
prerelease: false
|
78
106
|
version_requirements: !ruby/object:Gem::Requirement
|
79
107
|
requirements:
|
80
|
-
- - "
|
108
|
+
- - ">="
|
81
109
|
- !ruby/object:Gem::Version
|
82
|
-
version: 0
|
110
|
+
version: '0'
|
83
111
|
description: 将博客园备份xml文件通过命令转为markdown文件,或者将博客园备份xml直接转为可以调用的对象
|
84
112
|
email:
|
85
113
|
- mail@haoxilu.net
|
@@ -90,6 +118,7 @@ extra_rdoc_files: []
|
|
90
118
|
files:
|
91
119
|
- ".gitignore"
|
92
120
|
- ".rspec"
|
121
|
+
- ".travis.yml"
|
93
122
|
- CODE_OF_CONDUCT.md
|
94
123
|
- Gemfile
|
95
124
|
- LICENSE.txt
|