forked from open-xml-templating/pizzip
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
143 lines (128 loc) · 3.57 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
---
title: Pizzip
layout: default
section: main
---
<div class="row">
<div class="col-md-5">
PizZip is a javascript library for creating, reading and editing .zip files, with a
lovely and simple API.
</div>
<div class="col-md-7">
<p>
<strong>Current version</strong> : v2.6.1
</p>
<p>
<strong>License</strong> : PizZip is dual-licensed. You may use it under the
MIT license <em>or</em> the GPLv3 license. See
<a href="https://raw.github.com/open-xml-templating/pizzip/master/LICENSE.markdown">LICENSE.markdown</a>.
</p>
</div>
<div class="row">
<div class="col-md-5">
<h3>Example</h3>
<script type="text/javascript">
imgData = "R0lGODdhBQAFAIACAAAAAP/eACwAAAAABQAFAAACCIwPkWerClIBADs=";
jQuery(function($) {
if(!PizZip.support.blob) {
$("#demo-not-supported").removeClass("hidden");
$("#demo").hide();
return;
}
$("#demo").click(function () {
try {
eval($("#demo-code").val());
$("#status")
.removeClass()
.addClass("text-success")
.text("Done!");
}
catch (e) {
$("#status")
.removeClass()
.addClass("text-danger")
.text(e);
}
});
});
</script>
<textarea class="form-control" id="demo-code" rows="7" spellcheck="false">
var zip = new PizZip();
zip.file("Hello.txt", "Hello World\n");
var img = zip.folder("images");
img.file("smile.gif", imgData, {base64: true});
var content = zip.generate({type:"blob"});
// see FileSaver.js
saveAs(content, "example.zip");</textarea>
<button id="demo" class="btn btn-primary">Run!</button>
<span id="status"></span>
<div id="demo-not-supported" class="alert alert-danger hidden">
This browser doesn't support blobs, this demo won't work :(
See <a href="{{site.baseurl}}/documentation/howto/write_zip.html" class="alert-link">here for more info</a>.
</div>
</div>
<div class="col-md-7">
<h3>Installation</h3>
<p>
<strong>With npm</strong> : <code>npm install pizzip</code>
</p>
<p>
<strong>Manually</strong> : <a href="http://github.com/open-xml-templating/pizzip/zipball/master">download PizZip</a>
and include the file <code>dist/pizzip.js</code> or <code>dist/pizzip.min.js</code>
</p>
<br>
<p>
Installed ? Great ! You can now check our
<a href="{{site.baseurl}}/documentation/examples.html">guides and examples !</a>
</p>
</div>
</div>
<h3>Support</h3>
<table class="browser_support">
<tr>
<th class="support_op">Opera</th>
<th class="support_ff">Firefox</th>
<th class="support_sf">Safari</th>
<th class="support_cr">Chrome</th>
<th class="support_ie">Internet Explorer</th>
<th class="support_nd">Node.js</th>
</tr>
<tr>
<td>Yes</td>
<td>Yes</td>
<td>Yes</td>
<td>Yes</td>
<td>Yes</td>
<td>Yes</td>
</tr>
<tr>
<td>Tested with the latest version</td>
<td>Tested with 3.0 / 3.6 / latest version</td>
<td>Tested with the latest version</td>
<td>Tested with the latest version</td>
<td>Tested with IE 6 / 7 / 8 / 9 / 10</td>
<td>Tested with node.js 0.8 and 0.10</td>
</tr>
</table>
<h3>Getting help</h3>
<p>
Having trouble ? We'd like to help !
</p>
<ul>
<li>
Try the <a href="{{site.baseurl}}/documentation/faq.html">FAQ</a>, it has
answers to common questions.
</li>
<li>
If you're looking for informations about a specific method, try the
<a href="{{site.baseurl}}/documentation/api_pizzip.html">documentation</a>.
</li>
<li>
Check the
<a href="{{site.baseurl}}/documentation/examples.html">examples</a>.
</li>
<li>
Report bugs in our
<a href="https://github.com/open-xml-templating/pizzip/issues">Bug tracker</a>.
</li>
</ul>