apkg-to-csv 2.0.0 → 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +1 -1
- data/Gemfile.lock +48 -30
- data/README.md +2 -2
- data/apkg-to-csv.gemspec +28 -15
- data/bin/apkg-to-csv +8 -3
- data/lib/apkg_to_csv/version.rb +1 -1
- data/lib/apkg_to_csv.rb +3 -3
- metadata +12 -13
- data/.github/workflows/test.yml +0 -34
- data/.rubocop.yml +0 -14
- data/.ruby-version +0 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c5ef82e151659d25b01cd75e22665f274bae7e4cffe40840016d6a90c3c9a53d
|
4
|
+
data.tar.gz: 5bdc0d47d16ce3ee4f7fa81dccd260d765f715992c9c1a5f2a5b21fb8ef8e4f6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b253c4c3f87c967d9ef6c9221d1b832ba8e96cae86dc43cbad8fdda74d371a6a37b1f1531f89602ed29ac4c76641b607bdee7e189ab2e2737ba7501ade3a0ad1
|
7
|
+
data.tar.gz: d27bee3c3186d4dc9a15008a53c7dfef93e851e6a35198c8401608493b7703460ced2cce0ce02a4d1132944a3f26d7afe36f61684de8be7739822b77229346b7
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,59 +1,77 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
apkg-to-csv (
|
5
|
-
rubyzip (~> 2.3
|
6
|
-
sqlite3 (~> 1.
|
4
|
+
apkg-to-csv (2.1.0)
|
5
|
+
rubyzip (~> 2.3)
|
6
|
+
sqlite3 (~> 1.6)
|
7
7
|
|
8
8
|
GEM
|
9
9
|
remote: https://rubygems.org/
|
10
10
|
specs:
|
11
|
+
activesupport (7.0.4.3)
|
12
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
13
|
+
i18n (>= 1.6, < 2)
|
14
|
+
minitest (>= 5.1)
|
15
|
+
tzinfo (~> 2.0)
|
11
16
|
ast (2.4.2)
|
12
|
-
bundler-audit (0.9.
|
17
|
+
bundler-audit (0.9.1)
|
13
18
|
bundler (>= 1.2.0, < 3)
|
14
19
|
thor (~> 1.0)
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
parallel (1.
|
21
|
-
parser (3.
|
20
|
+
concurrent-ruby (1.2.2)
|
21
|
+
i18n (1.12.0)
|
22
|
+
concurrent-ruby (~> 1.0)
|
23
|
+
json (2.6.3)
|
24
|
+
minitest (5.18.0)
|
25
|
+
parallel (1.22.1)
|
26
|
+
parser (3.2.2.0)
|
22
27
|
ast (~> 2.4.1)
|
23
|
-
rack (
|
24
|
-
rainbow (3.
|
25
|
-
regexp_parser (2.
|
28
|
+
rack (3.0.7)
|
29
|
+
rainbow (3.1.1)
|
30
|
+
regexp_parser (2.8.0)
|
26
31
|
rexml (3.2.5)
|
27
|
-
rubocop (1.
|
32
|
+
rubocop (1.50.2)
|
33
|
+
json (~> 2.3)
|
28
34
|
parallel (~> 1.10)
|
29
|
-
parser (>= 3.
|
35
|
+
parser (>= 3.2.0.0)
|
30
36
|
rainbow (>= 2.2.2, < 4.0)
|
31
37
|
regexp_parser (>= 1.8, < 3.0)
|
32
|
-
rexml
|
33
|
-
rubocop-ast (>= 1.
|
38
|
+
rexml (>= 3.2.5, < 4.0)
|
39
|
+
rubocop-ast (>= 1.28.0, < 2.0)
|
34
40
|
ruby-progressbar (~> 1.7)
|
35
|
-
unicode-display_width (>=
|
36
|
-
rubocop-ast (1.
|
37
|
-
parser (>= 3.
|
38
|
-
rubocop-performance (1.
|
41
|
+
unicode-display_width (>= 2.4.0, < 3.0)
|
42
|
+
rubocop-ast (1.28.0)
|
43
|
+
parser (>= 3.2.1.0)
|
44
|
+
rubocop-performance (1.17.1)
|
39
45
|
rubocop (>= 1.7.0, < 2.0)
|
40
46
|
rubocop-ast (>= 0.4.0)
|
41
|
-
rubocop-rails (2.
|
47
|
+
rubocop-rails (2.19.1)
|
48
|
+
activesupport (>= 4.2.0)
|
42
49
|
rack (>= 1.1)
|
43
|
-
rubocop (>=
|
44
|
-
|
50
|
+
rubocop (>= 1.33.0, < 2.0)
|
51
|
+
rubocop-rake (0.6.0)
|
52
|
+
rubocop (~> 1.0)
|
53
|
+
ruby-progressbar (1.13.0)
|
45
54
|
rubyzip (2.3.2)
|
46
|
-
sqlite3 (1.
|
47
|
-
|
48
|
-
|
55
|
+
sqlite3 (1.6.2-arm64-darwin)
|
56
|
+
sqlite3 (1.6.2-x86_64-darwin)
|
57
|
+
thor (1.2.1)
|
58
|
+
tzinfo (2.0.6)
|
59
|
+
concurrent-ruby (~> 1.0)
|
60
|
+
unicode-display_width (2.4.2)
|
61
|
+
zfletch-style (1.0.0)
|
62
|
+
rubocop (~> 1.50)
|
63
|
+
rubocop-performance (~> 1.17)
|
64
|
+
rubocop-rails (~> 2.19)
|
65
|
+
rubocop-rake (~> 0.6)
|
49
66
|
|
50
67
|
PLATFORMS
|
68
|
+
arm64-darwin-22
|
51
69
|
x86_64-darwin-19
|
52
70
|
|
53
71
|
DEPENDENCIES
|
54
72
|
apkg-to-csv!
|
55
73
|
bundler-audit
|
56
|
-
|
74
|
+
zfletch-style
|
57
75
|
|
58
76
|
BUNDLED WITH
|
59
|
-
2.
|
77
|
+
2.4.12
|
data/README.md
CHANGED
@@ -11,7 +11,7 @@ It can be difficult to work with these decks without first importing them into A
|
|
11
11
|
|
12
12
|
## Requirements
|
13
13
|
|
14
|
-
* `ruby >=
|
14
|
+
* `ruby >= 3.0`
|
15
15
|
|
16
16
|
## Installation
|
17
17
|
|
@@ -30,4 +30,4 @@ bundle install
|
|
30
30
|
|
31
31
|
## Running Tests
|
32
32
|
|
33
|
-
* `bundle exec
|
33
|
+
* `bundle exec ./test/test.rb`
|
data/apkg-to-csv.gemspec
CHANGED
@@ -1,26 +1,39 @@
|
|
1
1
|
require_relative 'lib/apkg_to_csv/version'
|
2
2
|
|
3
3
|
Gem::Specification.new do |spec|
|
4
|
-
spec.name
|
5
|
-
spec.version
|
6
|
-
spec.
|
7
|
-
spec.
|
4
|
+
spec.name = 'apkg-to-csv'
|
5
|
+
spec.version = ApkgToCsv::VERSION
|
6
|
+
spec.licenses = ['MIT']
|
7
|
+
spec.authors = ['zfletch']
|
8
|
+
spec.email = ['zf.rubygems@gmail.com']
|
8
9
|
|
9
|
-
spec.summary
|
10
|
-
spec.
|
11
|
-
spec.
|
12
|
-
spec.required_ruby_version =
|
10
|
+
spec.summary = 'Convert Anki decks to CSV'
|
11
|
+
spec.description = 'Convert Anki deck (.apkg) files to comma-separated values (.csv) files.'
|
12
|
+
spec.homepage = 'https://github.com/zfletch/apkg-to-csv'
|
13
|
+
spec.required_ruby_version = '>= 3.0'
|
13
14
|
|
14
15
|
spec.metadata['homepage_uri'] = spec.homepage
|
15
16
|
spec.metadata['source_code_uri'] = spec.homepage
|
17
|
+
spec.metadata['changelog_uri'] = "#{spec.homepage}/releases"
|
18
|
+
spec.metadata['rubygems_mfa_required'] = 'true'
|
16
19
|
|
17
|
-
spec.files =
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
20
|
+
spec.files = [
|
21
|
+
'Gemfile',
|
22
|
+
'Gemfile.lock',
|
23
|
+
'LICENSE',
|
24
|
+
'README.md',
|
25
|
+
'apkg-to-csv.gemspec',
|
26
|
+
'bin/apkg-to-csv',
|
27
|
+
'lib/apkg_to_csv.rb',
|
28
|
+
'lib/apkg_to_csv/csv.rb',
|
29
|
+
'lib/apkg_to_csv/model.rb',
|
30
|
+
'lib/apkg_to_csv/note.rb',
|
31
|
+
'lib/apkg_to_csv/version.rb',
|
32
|
+
]
|
22
33
|
spec.require_paths = ['lib']
|
34
|
+
spec.bindir = 'bin'
|
35
|
+
spec.executables = ['apkg-to-csv']
|
23
36
|
|
24
|
-
spec.add_dependency 'rubyzip', '~> 2.3
|
25
|
-
spec.add_dependency 'sqlite3', '~> 1.
|
37
|
+
spec.add_dependency 'rubyzip', '~> 2.3'
|
38
|
+
spec.add_dependency 'sqlite3', '~> 1.6'
|
26
39
|
end
|
data/bin/apkg-to-csv
CHANGED
@@ -17,10 +17,15 @@ tempfile = Tempfile.new('db')
|
|
17
17
|
|
18
18
|
Zip::File.open(filename) do |zip_file|
|
19
19
|
zip_file.each do |entry|
|
20
|
-
if entry.name == 'collection.
|
21
|
-
|
22
|
-
|
20
|
+
if entry.name == 'collection.anki21b'
|
21
|
+
puts 'Please export with "Support older Anki versions" checked'
|
22
|
+
break
|
23
23
|
end
|
24
|
+
next unless entry.name == 'collection.anki2' || entry.name == 'collection.anki21'
|
25
|
+
|
26
|
+
tempfile.write(entry.get_input_stream.read)
|
27
|
+
file_written = true
|
28
|
+
break
|
24
29
|
end
|
25
30
|
end
|
26
31
|
|
data/lib/apkg_to_csv/version.rb
CHANGED
data/lib/apkg_to_csv.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
require_relative '
|
2
|
-
require_relative '
|
3
|
-
require_relative '
|
1
|
+
require_relative 'apkg_to_csv/model'
|
2
|
+
require_relative 'apkg_to_csv/note'
|
3
|
+
require_relative 'apkg_to_csv/csv'
|
4
4
|
|
5
5
|
module ApkgToCsv
|
6
6
|
def self.csv(db)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: apkg-to-csv
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- zfletch
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-10-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rubyzip
|
@@ -16,29 +16,29 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 2.3
|
19
|
+
version: '2.3'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 2.3
|
26
|
+
version: '2.3'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: sqlite3
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 1.
|
33
|
+
version: '1.6'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 1.
|
41
|
-
description:
|
40
|
+
version: '1.6'
|
41
|
+
description: Convert Anki deck (.apkg) files to comma-separated values (.csv) files.
|
42
42
|
email:
|
43
43
|
- zf.rubygems@gmail.com
|
44
44
|
executables:
|
@@ -46,9 +46,6 @@ executables:
|
|
46
46
|
extensions: []
|
47
47
|
extra_rdoc_files: []
|
48
48
|
files:
|
49
|
-
- ".github/workflows/test.yml"
|
50
|
-
- ".rubocop.yml"
|
51
|
-
- ".ruby-version"
|
52
49
|
- Gemfile
|
53
50
|
- Gemfile.lock
|
54
51
|
- LICENSE
|
@@ -66,6 +63,8 @@ licenses:
|
|
66
63
|
metadata:
|
67
64
|
homepage_uri: https://github.com/zfletch/apkg-to-csv
|
68
65
|
source_code_uri: https://github.com/zfletch/apkg-to-csv
|
66
|
+
changelog_uri: https://github.com/zfletch/apkg-to-csv/releases
|
67
|
+
rubygems_mfa_required: 'true'
|
69
68
|
post_install_message:
|
70
69
|
rdoc_options: []
|
71
70
|
require_paths:
|
@@ -74,15 +73,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
74
73
|
requirements:
|
75
74
|
- - ">="
|
76
75
|
- !ruby/object:Gem::Version
|
77
|
-
version:
|
76
|
+
version: '3.0'
|
78
77
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
79
78
|
requirements:
|
80
79
|
- - ">="
|
81
80
|
- !ruby/object:Gem::Version
|
82
81
|
version: '0'
|
83
82
|
requirements: []
|
84
|
-
rubygems_version: 3.
|
83
|
+
rubygems_version: 3.4.12
|
85
84
|
signing_key:
|
86
85
|
specification_version: 4
|
87
|
-
summary: Convert Anki
|
86
|
+
summary: Convert Anki decks to CSV
|
88
87
|
test_files: []
|
data/.github/workflows/test.yml
DELETED
@@ -1,34 +0,0 @@
|
|
1
|
-
name: test
|
2
|
-
|
3
|
-
on: [push, pull_request]
|
4
|
-
|
5
|
-
jobs:
|
6
|
-
test:
|
7
|
-
runs-on: ubuntu-latest
|
8
|
-
|
9
|
-
strategy:
|
10
|
-
matrix:
|
11
|
-
ruby-version: [3.0, 2.7, 2.6, 2.5]
|
12
|
-
|
13
|
-
steps:
|
14
|
-
- uses: actions/checkout@v2
|
15
|
-
|
16
|
-
- name: Set up Ruby
|
17
|
-
uses: ruby/setup-ruby@477b21f02be01bcb8030d50f37cfec92bfa615b6
|
18
|
-
with:
|
19
|
-
ruby-version: ${{ matrix.ruby-version }}
|
20
|
-
|
21
|
-
- name: Delete lockfile (to make sure it works with gem install)
|
22
|
-
run: rm Gemfile.lock
|
23
|
-
|
24
|
-
- name: Install dependencies
|
25
|
-
run: bundle install
|
26
|
-
|
27
|
-
- name: Run tests
|
28
|
-
run: bundle exec bash ./test/test.sh
|
29
|
-
|
30
|
-
- name: Lint code
|
31
|
-
run: bundle exec rubocop
|
32
|
-
|
33
|
-
- name: Audit code
|
34
|
-
run: bundle exec bundler-audit check --update
|
data/.rubocop.yml
DELETED
data/.ruby-version
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
3.0.0
|