power-build 0.0.1 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +0 -1
- data/Gemfile +1 -0
- data/README.md +76 -4
- data/Rakefile +7 -0
- data/bin/power +0 -0
- data/lib/assets/css/bootstrap.css +6566 -0
- data/lib/assets/css/bootstrap.min.css +5 -0
- data/lib/assets/css/custom.css +40 -0
- data/lib/assets/fonts/glyphicons-halflings-regular.eot +0 -0
- data/lib/assets/fonts/glyphicons-halflings-regular.svg +288 -0
- data/lib/assets/fonts/glyphicons-halflings-regular.ttf +0 -0
- data/lib/assets/fonts/glyphicons-halflings-regular.woff +0 -0
- data/lib/assets/fonts/glyphicons-halflings-regular.woff2 +0 -0
- data/lib/assets/js/bootstrap.js +2306 -0
- data/lib/assets/js/bootstrap.min.js +7 -0
- data/lib/assets/js/custom.js +0 -0
- data/lib/assets/js/jquery.js +4 -0
- data/lib/assets/partials/_footer.html.erb +8 -0
- data/lib/assets/partials/_head.html.erb +10 -0
- data/lib/assets/partials/_navbar.html.erb +32 -0
- data/lib/assets/power-build.config +15 -0
- data/lib/assets/templates/category.html.erb +28 -0
- data/lib/assets/templates/index.html.erb +30 -0
- data/lib/assets/templates/show.html.erb +26 -0
- data/lib/power-build/base.rb +57 -1
- data/lib/power-build/constructor.rb +217 -0
- data/lib/power-build/github_manager.rb +43 -0
- data/lib/power-build/version.rb +1 -1
- metadata +23 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4deaba60aee516b39ec1f141c758e4afeed77dac
|
4
|
+
data.tar.gz: 71c47bd357385c7186ded93c4f76e21b1844859a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 961f890c061123509f04ec56a8aca9664275082a2e20828dc05b9933cc005abe241a299b291284f96492e41f9b2dc6520f04fb23a8ad09b2836ee1ed99311b60
|
7
|
+
data.tar.gz: 433c70b5a2708c735f83d8881c0e9586126190093e1760b9de597f97b986bfe42fe962a8fa4ad06c9a537bf6a9f5a51645c9ad690d059c5d6b1721f34008bd00
|
data/.gitignore
CHANGED
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -2,10 +2,13 @@
|
|
2
2
|
|
3
3
|
Power Build is a photo album builder which generates a site based on the images in a project. It works as a command line application.
|
4
4
|
|
5
|
+
#### Visit [Demo Site](http://cstony0917.github.io/warofpic/) for a general understanding.
|
6
|
+
|
5
7
|
## Requirement
|
6
8
|
|
7
|
-
1. Ruby
|
8
|
-
2.
|
9
|
+
1. Ruby version 2.0 or higher
|
10
|
+
2. Mac or Linux (Nothing has been tested on Windows.)
|
11
|
+
3. This tool is for hosting on [GitHub pages](https://pages.github.com/). Other sites may not be compatible.
|
9
12
|
|
10
13
|
## Installation
|
11
14
|
|
@@ -17,7 +20,7 @@ $gem install power-build
|
|
17
20
|
|
18
21
|
or manually write `gem 'power-build'` in the Gemfile before you run `$bundle`.
|
19
22
|
|
20
|
-
##
|
23
|
+
## Commands
|
21
24
|
|
22
25
|
In the root of your project, run:
|
23
26
|
|
@@ -31,4 +34,73 @@ It creates a config file in your project directory. You can adjust the content d
|
|
31
34
|
$power build
|
32
35
|
```
|
33
36
|
|
34
|
-
You can skip the `build` and just run `power`. This command generates a static site which allows you to host on github pages. Basically it creates a `index.html` and a folder `
|
37
|
+
You can skip the `build` and just run `power`. This command generates a static site which allows you to host on github pages. Basically it creates a `index.html` and a folder `assets` with other pages in it.
|
38
|
+
|
39
|
+
```
|
40
|
+
$power delete
|
41
|
+
```
|
42
|
+
|
43
|
+
Clean all files generated by power-build.
|
44
|
+
|
45
|
+
## Config
|
46
|
+
|
47
|
+
The config file looks like this:
|
48
|
+
|
49
|
+
```
|
50
|
+
{
|
51
|
+
"title": "Your Site Title",
|
52
|
+
|
53
|
+
// Displaying the source on you nav-bar
|
54
|
+
"host_link": "https://github.com/nkj20932/power-build",
|
55
|
+
"host_display_text": "GitHub",
|
56
|
+
|
57
|
+
// Select the folder you store images
|
58
|
+
"root_folder": "storage",
|
59
|
+
|
60
|
+
// Website language: either "zh-tw" or "en"
|
61
|
+
"language": "zh-tw"
|
62
|
+
}
|
63
|
+
|
64
|
+
```
|
65
|
+
|
66
|
+
1. Remember to keep the file content in JSON format. Don't break it.
|
67
|
+
2. Currently there are only two languages for display: English and Traditional Chinese.
|
68
|
+
3. `root_folder` for the images should be in your root folder. Otherwise the links and images will not be displayed. Check the folder structure in the next section.
|
69
|
+
|
70
|
+
## Folder Structure
|
71
|
+
|
72
|
+
Before site generation, you need to include at least the folder of your images:
|
73
|
+
|
74
|
+
```
|
75
|
+
My_project_folder
|
76
|
+
|-- image_root_folder
|
77
|
+
```
|
78
|
+
|
79
|
+
If so, after site generation, your folder will look like this:
|
80
|
+
|
81
|
+
```
|
82
|
+
My_project_folder
|
83
|
+
|-- image_root_folder
|
84
|
+
|-- power-build.config
|
85
|
+
|-- assets
|
86
|
+
|-- index.html
|
87
|
+
```
|
88
|
+
|
89
|
+
However, in your image folder, the images should be stored by categories like this:
|
90
|
+
|
91
|
+
```
|
92
|
+
image_root_folder
|
93
|
+
|-- category_1
|
94
|
+
| |-- image_1
|
95
|
+
| |-- image_2
|
96
|
+
| |-- image_3
|
97
|
+
|
|
98
|
+
|-- category_2
|
99
|
+
|-- category_3
|
100
|
+
```
|
101
|
+
|
102
|
+
Only the structure is followed can the site be generated in the correct format as in the [demo](http://cstony0917.github.io/warofpic/).
|
103
|
+
|
104
|
+
## Issues & Contribution
|
105
|
+
|
106
|
+
The project follows MIT Licence. Any issue, pull-request, feature-request, or comment is welcome.
|
data/Rakefile
CHANGED
data/bin/power
CHANGED
File without changes
|