middle_drive 0.0.1 → 0.0.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/README.md +12 -7
- data/bin/middle_drive +21 -6
- data/img/spreadsheet.png +0 -0
- data/lib/middle_drive/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ae7dbdefe594f689969acb1a2b40ad63e6e0d950
|
4
|
+
data.tar.gz: e98c9f4473c43bfff27a9e5767b1255048eac2b9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7c90da3f1721d1e4dd50fe805c02bccd5698e7ba39fec2b15c6953e4560201ad4be3c47a0a10c08857d06522073bf5cbfdb75daa165e5f8f8e7e776140f245d3
|
7
|
+
data.tar.gz: bd5362f1dfc25035650dfcc10b7a7ac86ec7d79c3646e8dec574d12c24bb7414c4d08966e5557ecc983c4d5c026adb178b6f9a3634e9d96d7f3c6bc2a689a158
|
data/README.md
CHANGED
@@ -21,19 +21,24 @@ Then run
|
|
21
21
|
|
22
22
|
## Setup
|
23
23
|
|
24
|
-
|
24
|
+
### Middleman setup
|
25
25
|
|
26
|
-
|
26
|
+
middle_drive init
|
27
27
|
|
28
|
-
|
28
|
+
### Google drive setup conventions
|
29
29
|
|
30
|
-
|
30
|
+
- create a new collection in your google drive. Name it the same like in `middle_drive.yml`'s `site.collection` value.
|
31
|
+
- create google spreadsheet named `pages` inside this collection. You can name it differently if you specify it for `site.pages`
|
32
|
+
- each tab in this spreadsheet represents a page
|
33
|
+
- value in first row and first column represents a template which will be used by middleman
|
34
|
+

|
31
35
|
|
32
|
-
|
36
|
+
## Usage
|
33
37
|
|
34
|
-
|
38
|
+
middle_drive
|
35
39
|
|
36
|
-
|
40
|
+
This command will sync images and page information from your Google Drive collection which was set in
|
41
|
+
`middle_drive.yml` file.
|
37
42
|
|
38
43
|
## TODO
|
39
44
|
- http://middlemanapp.com/advanced/local-data/
|
data/bin/middle_drive
CHANGED
@@ -7,12 +7,27 @@ elsif ARGV[0] == 'init'
|
|
7
7
|
current_user_dir = Dir.pwd
|
8
8
|
gem_dir = "#{File.dirname(__FILE__)}/.."
|
9
9
|
|
10
|
-
|
11
|
-
|
10
|
+
middle_drive_yml = "#{current_user_dir}/middle_drive.yml"
|
11
|
+
middleman_config = "#{current_user_dir}/config.rb"
|
12
12
|
|
13
|
-
|
14
|
-
|
13
|
+
cmd_middle_drive_settings = "cp #{gem_dir}/middle_drive.SAMPLE.yml #{middle_drive_yml}"
|
14
|
+
cmd_middleman_config = "cp #{gem_dir}/config.MIDDLEMAN.rb #{middleman_config}"
|
15
15
|
|
16
|
-
|
17
|
-
|
16
|
+
unless File.exist?(middle_drive_yml)
|
17
|
+
p 'Writing middle_drive.yml'
|
18
|
+
system(cmd_middle_drive_settings)
|
19
|
+
end
|
20
|
+
|
21
|
+
unless File.exist?(middle_drive_yml)
|
22
|
+
p 'Writing config.rb for'
|
23
|
+
system(cmd_middleman_config)
|
24
|
+
end
|
25
|
+
|
26
|
+
gitignore = "#{current_user_dir}/.gitignore"
|
27
|
+
already_ignored = File.open(gitignore).each_line.any? { |line| line.chomp == 'middle_drive.yml'}
|
28
|
+
|
29
|
+
unless already_ignored
|
30
|
+
p 'Putting middle_drive.yml to your .gitignore'
|
31
|
+
system("echo middle_drive.yml >> #{current_user_dir}/.gitignore")
|
32
|
+
end
|
18
33
|
end
|
data/img/spreadsheet.png
ADDED
Binary file
|
data/lib/middle_drive/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: middle_drive
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ziga Vidic
|
@@ -70,6 +70,7 @@ files:
|
|
70
70
|
- build/locales/.gitkeep
|
71
71
|
- build/source/images/.gitkeep
|
72
72
|
- config.MIDDLEMAN.rb
|
73
|
+
- img/spreadsheet.png
|
73
74
|
- lib/middle_drive.rb
|
74
75
|
- lib/middle_drive/config.rb
|
75
76
|
- lib/middle_drive/image.rb
|