fast_excel 0.1.4 → 0.1.5
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/.gitignore +5 -2
- data/Makefile +14 -0
- data/README.md +7 -2
- data/Rakefile +10 -0
- data/extconf.rb +0 -0
- data/fast_excel.gemspec +3 -1
- data/lib/fast_excel/binding.rb +3 -7
- data/lib/rubygems_plugin.rb +3 -0
- data/libxlsxwriter/.gitignore +49 -0
- data/libxlsxwriter/.indent.pro +125 -0
- data/libxlsxwriter/.travis.yml +25 -0
- data/libxlsxwriter/CONTRIBUTING.md +226 -0
- data/libxlsxwriter/Changes.txt +557 -0
- data/libxlsxwriter/LICENSE.txt +89 -0
- data/libxlsxwriter/Makefile +156 -0
- data/libxlsxwriter/Readme.md +78 -0
- data/libxlsxwriter/cocoapods/libxlsxwriter-umbrella.h +30 -0
- data/libxlsxwriter/cocoapods/libxlsxwriter.modulemap +7 -0
- data/libxlsxwriter/include/xlsxwriter/app.h +79 -0
- data/libxlsxwriter/include/xlsxwriter/chart.h +3476 -0
- data/libxlsxwriter/include/xlsxwriter/common.h +372 -0
- data/libxlsxwriter/include/xlsxwriter/content_types.h +74 -0
- data/libxlsxwriter/include/xlsxwriter/core.h +51 -0
- data/libxlsxwriter/include/xlsxwriter/custom.h +52 -0
- data/libxlsxwriter/include/xlsxwriter/drawing.h +111 -0
- data/libxlsxwriter/include/xlsxwriter/format.h +1214 -0
- data/libxlsxwriter/include/xlsxwriter/hash_table.h +76 -0
- data/libxlsxwriter/include/xlsxwriter/packager.h +80 -0
- data/libxlsxwriter/include/xlsxwriter/relationships.h +77 -0
- data/libxlsxwriter/include/xlsxwriter/shared_strings.h +83 -0
- data/libxlsxwriter/include/xlsxwriter/styles.h +77 -0
- data/libxlsxwriter/include/xlsxwriter/theme.h +47 -0
- data/libxlsxwriter/include/xlsxwriter/third_party/ioapi.h +214 -0
- data/libxlsxwriter/include/xlsxwriter/third_party/queue.h +694 -0
- data/libxlsxwriter/include/xlsxwriter/third_party/tmpfileplus.h +53 -0
- data/libxlsxwriter/include/xlsxwriter/third_party/tree.h +801 -0
- data/libxlsxwriter/include/xlsxwriter/third_party/zip.h +375 -0
- data/libxlsxwriter/include/xlsxwriter/utility.h +166 -0
- data/libxlsxwriter/include/xlsxwriter/workbook.h +757 -0
- data/libxlsxwriter/include/xlsxwriter/worksheet.h +2641 -0
- data/libxlsxwriter/include/xlsxwriter/xmlwriter.h +178 -0
- data/libxlsxwriter/include/xlsxwriter.h +23 -0
- data/libxlsxwriter/lib/.gitignore +0 -0
- data/libxlsxwriter/libxlsxwriter.podspec +47 -0
- data/libxlsxwriter/src/Makefile +130 -0
- data/libxlsxwriter/src/app.c +443 -0
- data/libxlsxwriter/src/chart.c +6346 -0
- data/libxlsxwriter/src/content_types.c +345 -0
- data/libxlsxwriter/src/core.c +293 -0
- data/libxlsxwriter/src/custom.c +224 -0
- data/libxlsxwriter/src/drawing.c +746 -0
- data/libxlsxwriter/src/format.c +729 -0
- data/libxlsxwriter/src/hash_table.c +223 -0
- data/libxlsxwriter/src/packager.c +948 -0
- data/libxlsxwriter/src/relationships.c +245 -0
- data/libxlsxwriter/src/shared_strings.c +266 -0
- data/libxlsxwriter/src/styles.c +1088 -0
- data/libxlsxwriter/src/theme.c +348 -0
- data/libxlsxwriter/src/utility.c +515 -0
- data/libxlsxwriter/src/workbook.c +1930 -0
- data/libxlsxwriter/src/worksheet.c +5022 -0
- data/libxlsxwriter/src/xmlwriter.c +355 -0
- data/libxlsxwriter/third_party/minizip/Makefile +44 -0
- data/libxlsxwriter/third_party/minizip/Makefile.am +45 -0
- data/libxlsxwriter/third_party/minizip/Makefile.orig +25 -0
- data/libxlsxwriter/third_party/minizip/MiniZip64_Changes.txt +6 -0
- data/libxlsxwriter/third_party/minizip/MiniZip64_info.txt +74 -0
- data/libxlsxwriter/third_party/minizip/README.txt +5 -0
- data/libxlsxwriter/third_party/minizip/configure.ac +32 -0
- data/libxlsxwriter/third_party/minizip/crypt.h +131 -0
- data/libxlsxwriter/third_party/minizip/ioapi.c +247 -0
- data/libxlsxwriter/third_party/minizip/ioapi.h +208 -0
- data/libxlsxwriter/third_party/minizip/iowin32.c +456 -0
- data/libxlsxwriter/third_party/minizip/iowin32.h +28 -0
- data/libxlsxwriter/third_party/minizip/make_vms.com +25 -0
- data/libxlsxwriter/third_party/minizip/miniunz.c +660 -0
- data/libxlsxwriter/third_party/minizip/miniunzip.1 +63 -0
- data/libxlsxwriter/third_party/minizip/minizip.1 +46 -0
- data/libxlsxwriter/third_party/minizip/minizip.c +520 -0
- data/libxlsxwriter/third_party/minizip/minizip.pc.in +12 -0
- data/libxlsxwriter/third_party/minizip/mztools.c +291 -0
- data/libxlsxwriter/third_party/minizip/mztools.h +37 -0
- data/libxlsxwriter/third_party/minizip/unzip.c +2125 -0
- data/libxlsxwriter/third_party/minizip/unzip.h +437 -0
- data/libxlsxwriter/third_party/minizip/zip.c +2007 -0
- data/libxlsxwriter/third_party/minizip/zip.h +367 -0
- data/libxlsxwriter/third_party/tmpfileplus/Makefile +42 -0
- data/libxlsxwriter/third_party/tmpfileplus/tmpfileplus.c +342 -0
- data/libxlsxwriter/third_party/tmpfileplus/tmpfileplus.h +53 -0
- data/libxlsxwriter/version.txt +1 -0
- metadata +89 -6
- data/binaries/libxlsxwriter-alpine.so +0 -0
- data/binaries/libxlsxwriter-darwin.dylib +0 -0
- data/binaries/libxlsxwriter-glibc.so +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 5fea186d154ccc93b112e497f6d2eb19f6f1471c
|
|
4
|
+
data.tar.gz: f2a918430b64e7fe453e48b11e18fcf72cf105a7
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5d3d835819ec9dcff29dfec369535e16af37cf5b2627c16508b4ca6242c629a7ee407682e729a00f541a775af4b85fea4344c82ca2a5d8ba41ac3be3f5d180a9
|
|
7
|
+
data.tar.gz: 3c83478ba13197ee50be02c29c5af4c694a1c72da2ee0120d1f9e8cb667ff095850bca22200ca42746cd5fe7c00a4050102dd2f2cb38ebfe28be4808958f0e11
|
data/.gitignore
CHANGED
data/Makefile
ADDED
data/README.md
CHANGED
|
@@ -2,7 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
```ruby
|
|
4
4
|
workbook = FastExcel.open("hello_world_ffi.xlsx", constant_memory: true)
|
|
5
|
-
|
|
5
|
+
workbook.default_format.set(
|
|
6
|
+
font_size: 0, # user's default
|
|
7
|
+
font_family: "Arial"
|
|
8
|
+
)
|
|
9
|
+
|
|
10
|
+
worksheet = workbook.add_worksheet("Example Report")
|
|
6
11
|
|
|
7
12
|
bold = workbook.bold_cell_format
|
|
8
13
|
worksheet.set_column(0, 0, FastExcel::DEF_COL_WIDTH, bold)
|
|
@@ -34,5 +39,5 @@ end
|
|
|
34
39
|
workbook.close
|
|
35
40
|
```
|
|
36
41
|
|
|
37
|
-
This repositiry and gem contain
|
|
42
|
+
This repositiry and gem contain sources of [libxlsxwriter](https://github.com/jmcnamara/libxlsxwriter)
|
|
38
43
|
|
data/Rakefile
CHANGED
|
@@ -24,4 +24,14 @@ namespace :build do
|
|
|
24
24
|
system("docker cp #{last_container_id}:/srv/libxlsxwriter/lib/libxlsxwriter.so ./binaries/libxlsxwriter-alpine.so")
|
|
25
25
|
system("docker rm #{last_container_id}")
|
|
26
26
|
end
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
task :sync do
|
|
30
|
+
require 'fileutils'
|
|
31
|
+
FileUtils.rm_rf("./libxlsxwriter")
|
|
32
|
+
system("git clone --depth 10 git@github.com:Paxa/libxlsxwriter.git")
|
|
33
|
+
Dir.chdir("./libxlsxwriter") do
|
|
34
|
+
system("git show --pretty='format:%cd %h' --date=iso --quiet > version.txt")
|
|
35
|
+
FileUtils.rm_rf("./.git")
|
|
36
|
+
end
|
|
27
37
|
end
|
data/extconf.rb
ADDED
|
File without changes
|
data/fast_excel.gemspec
CHANGED
|
@@ -1,18 +1,20 @@
|
|
|
1
1
|
Gem::Specification.new do |s|
|
|
2
2
|
s.name = "fast_excel"
|
|
3
|
-
s.version = "0.1.
|
|
3
|
+
s.version = "0.1.5"
|
|
4
4
|
s.author = ["Pavel Evstigneev"]
|
|
5
5
|
s.email = ["pavel.evst@gmail.com"]
|
|
6
6
|
s.homepage = "https://github.com/paxa/fast_excel"
|
|
7
7
|
s.summary = %q{Ultra Fast Excel Writter}
|
|
8
8
|
s.description = "Wrapper for libxlsxwriter using ffi"
|
|
9
9
|
s.license = 'MIT'
|
|
10
|
+
s.has_rdoc = false
|
|
10
11
|
s.required_ruby_version = '~> 2.0'
|
|
11
12
|
|
|
12
13
|
s.files = `git ls-files`.split("\n")
|
|
13
14
|
s.test_files = []
|
|
14
15
|
|
|
15
16
|
s.require_paths = ["lib"]
|
|
17
|
+
s.extensions = ["extconf.rb"]
|
|
16
18
|
|
|
17
19
|
s.add_runtime_dependency "ffi", ["> 1.9", "< 2"]
|
|
18
20
|
end
|
data/lib/fast_excel/binding.rb
CHANGED
|
@@ -6,16 +6,12 @@ module Libxlsxwriter
|
|
|
6
6
|
extend FFI::Library
|
|
7
7
|
|
|
8
8
|
LIB_FILENAME = if RUBY_PLATFORM =~ /darwin/
|
|
9
|
-
"libxlsxwriter
|
|
9
|
+
"libxlsxwriter.dylib"
|
|
10
10
|
else
|
|
11
|
-
|
|
12
|
-
"libxlsxwriter-alpine.so"
|
|
13
|
-
else
|
|
14
|
-
"libxlsxwriter-glibc.so"
|
|
15
|
-
end
|
|
11
|
+
"libxlsxwriter.so"
|
|
16
12
|
end
|
|
17
13
|
|
|
18
|
-
ffi_lib File.expand_path("./../../../
|
|
14
|
+
ffi_lib File.expand_path("./../../../libxlsxwriter/lib/#{LIB_FILENAME}", __FILE__)
|
|
19
15
|
|
|
20
16
|
def self.attach_function(name, *_)
|
|
21
17
|
begin; super; rescue FFI::NotFoundError => e
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
*.a
|
|
2
|
+
*.o
|
|
3
|
+
*.so
|
|
4
|
+
*.to
|
|
5
|
+
*.lo
|
|
6
|
+
*.la
|
|
7
|
+
*.dylib
|
|
8
|
+
*.dll
|
|
9
|
+
test_*
|
|
10
|
+
!test_*.c
|
|
11
|
+
!test_*.cpp
|
|
12
|
+
!test_*.py
|
|
13
|
+
*.tar.gz
|
|
14
|
+
*~
|
|
15
|
+
TAGS
|
|
16
|
+
.#*
|
|
17
|
+
*#
|
|
18
|
+
~*xlsx
|
|
19
|
+
*.xlsx
|
|
20
|
+
*.bak
|
|
21
|
+
!test/functional/xlsx_files/*.xlsx
|
|
22
|
+
*.pyc
|
|
23
|
+
.cproject
|
|
24
|
+
.project
|
|
25
|
+
.pydevproject
|
|
26
|
+
.settings/
|
|
27
|
+
.DS_Store
|
|
28
|
+
__pycache__
|
|
29
|
+
.cache
|
|
30
|
+
docs/html
|
|
31
|
+
docs/latex
|
|
32
|
+
.deps
|
|
33
|
+
.dirstamp
|
|
34
|
+
_temp.c
|
|
35
|
+
examples/*
|
|
36
|
+
!examples/*.c
|
|
37
|
+
!examples/logo.png
|
|
38
|
+
!examples/Makefile
|
|
39
|
+
cov-int
|
|
40
|
+
libxlsxwriter-coverity.tgz
|
|
41
|
+
|
|
42
|
+
third_party/zlib-1.2.8/configure.log
|
|
43
|
+
third_party/zlib-1.2.8/contrib/minizip/miniunz
|
|
44
|
+
third_party/zlib-1.2.8/contrib/minizip/minizip
|
|
45
|
+
third_party/zlib-1.2.8/example
|
|
46
|
+
third_party/zlib-1.2.8/examplesh
|
|
47
|
+
third_party/zlib-1.2.8/minigzip
|
|
48
|
+
third_party/zlib-1.2.8/minigzipsh
|
|
49
|
+
third_party/zlib-1.2.8/zlib.pc
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Indent rules for libxlsxwriter.
|
|
3
|
+
*
|
|
4
|
+
* The rules for user defined typedefs can be update as follows:
|
|
5
|
+
*
|
|
6
|
+
perl -i -pe 'print and last if /[l]ibxlsxwriter typedefs/' .indent.pro
|
|
7
|
+
ack -h typedef include/xlsxwriter/*.h src/*.c | perl -lne 'print "-T $1" if /\w+\s+\w+\s+(\w+)/' | sort >> .indent.pro
|
|
8
|
+
*
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
/* Command line options used with GNU indent 2.2.10 */
|
|
12
|
+
--braces-on-if-line
|
|
13
|
+
--braces-on-struct-decl-line
|
|
14
|
+
--case-indentation 4
|
|
15
|
+
--continue-at-parentheses
|
|
16
|
+
--declaration-comment-column 0
|
|
17
|
+
--format-first-column-comments
|
|
18
|
+
--honour-newlines
|
|
19
|
+
--ignore-profile
|
|
20
|
+
--indent-label 0
|
|
21
|
+
--indent-level 4
|
|
22
|
+
--no-space-after-function-call-names
|
|
23
|
+
--no-tabs
|
|
24
|
+
--swallow-optional-blank-lines
|
|
25
|
+
|
|
26
|
+
/* Typedefs used in the code. */
|
|
27
|
+
-T int8_t
|
|
28
|
+
-T int16_t
|
|
29
|
+
-T int32_t
|
|
30
|
+
-T int64_t
|
|
31
|
+
-T uint8_t
|
|
32
|
+
-T uint16_t
|
|
33
|
+
-T uint32_t
|
|
34
|
+
-T uint64_t
|
|
35
|
+
-T ssize_t
|
|
36
|
+
-T size_t
|
|
37
|
+
-T time_t
|
|
38
|
+
|
|
39
|
+
-T LIST_ENTRY
|
|
40
|
+
-T RB_ENTRY
|
|
41
|
+
-T SLIST_ENTRY
|
|
42
|
+
-T STAILQ_ENTRY
|
|
43
|
+
-T TAILQ_ENTRY
|
|
44
|
+
|
|
45
|
+
/* libxlsxwriter typedefs. */
|
|
46
|
+
-T lxw_app
|
|
47
|
+
-T lxw_autofilter
|
|
48
|
+
-T lxw_border
|
|
49
|
+
-T lxw_cell
|
|
50
|
+
-T lxw_chart
|
|
51
|
+
-T lxw_chart_axis
|
|
52
|
+
-T lxw_chart_axis_display_unit
|
|
53
|
+
-T lxw_chart_axis_label_position
|
|
54
|
+
-T lxw_chart_axis_tick_mark
|
|
55
|
+
-T lxw_chart_axis_tick_position
|
|
56
|
+
-T lxw_chart_blank
|
|
57
|
+
-T lxw_chart_error_bar_cap
|
|
58
|
+
-T lxw_chart_error_bar_direction
|
|
59
|
+
-T lxw_chart_error_bar_type
|
|
60
|
+
-T lxw_chart_fill
|
|
61
|
+
-T lxw_chart_font
|
|
62
|
+
-T lxw_chart_gridline
|
|
63
|
+
-T lxw_chart_label_position
|
|
64
|
+
-T lxw_chart_label_separator
|
|
65
|
+
-T lxw_chart_legend
|
|
66
|
+
-T lxw_chart_legend_position
|
|
67
|
+
-T lxw_chart_line
|
|
68
|
+
-T lxw_chart_line_dash_type
|
|
69
|
+
-T lxw_chart_marker
|
|
70
|
+
-T lxw_chart_marker_type
|
|
71
|
+
-T lxw_chart_pattern
|
|
72
|
+
-T lxw_chart_pattern_type
|
|
73
|
+
-T lxw_chart_point
|
|
74
|
+
-T lxw_chart_series
|
|
75
|
+
-T lxw_chart_title
|
|
76
|
+
-T lxw_chart_trendline_type
|
|
77
|
+
-T lxw_chart_type
|
|
78
|
+
-T lxw_col_options
|
|
79
|
+
-T lxw_col_t
|
|
80
|
+
-T lxw_color_t
|
|
81
|
+
-T lxw_content_types
|
|
82
|
+
-T lxw_core
|
|
83
|
+
-T lxw_custom
|
|
84
|
+
-T lxw_custom_property
|
|
85
|
+
-T lxw_datetime
|
|
86
|
+
-T lxw_defined_name
|
|
87
|
+
-T lxw_doc_properties
|
|
88
|
+
-T lxw_drawing
|
|
89
|
+
-T lxw_drawing_coords
|
|
90
|
+
-T lxw_drawing_object
|
|
91
|
+
-T lxw_error
|
|
92
|
+
-T lxw_fill
|
|
93
|
+
-T lxw_font
|
|
94
|
+
-T lxw_format
|
|
95
|
+
-T lxw_hash_element
|
|
96
|
+
-T lxw_hash_table
|
|
97
|
+
-T lxw_header_footer_options
|
|
98
|
+
-T lxw_heading_pair
|
|
99
|
+
-T lxw_image_options
|
|
100
|
+
-T lxw_merged_range
|
|
101
|
+
-T lxw_packager
|
|
102
|
+
-T lxw_panes
|
|
103
|
+
-T lxw_part_name
|
|
104
|
+
-T lxw_print_area
|
|
105
|
+
-T lxw_protection
|
|
106
|
+
-T lxw_rel_tuple
|
|
107
|
+
-T lxw_relationships
|
|
108
|
+
-T lxw_repeat_cols
|
|
109
|
+
-T lxw_repeat_rows
|
|
110
|
+
-T lxw_row
|
|
111
|
+
-T lxw_row_col_options
|
|
112
|
+
-T lxw_row_t
|
|
113
|
+
-T lxw_selection
|
|
114
|
+
-T lxw_series_data_point
|
|
115
|
+
-T lxw_series_error_bars
|
|
116
|
+
-T lxw_series_range
|
|
117
|
+
-T lxw_sst
|
|
118
|
+
-T lxw_styles
|
|
119
|
+
-T lxw_theme
|
|
120
|
+
-T lxw_tuple
|
|
121
|
+
-T lxw_workbook
|
|
122
|
+
-T lxw_workbook_options
|
|
123
|
+
-T lxw_worksheet
|
|
124
|
+
-T lxw_worksheet_init_data
|
|
125
|
+
-T lxw_worksheet_name
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
language: c
|
|
2
|
+
|
|
3
|
+
compiler:
|
|
4
|
+
- clang
|
|
5
|
+
- gcc
|
|
6
|
+
|
|
7
|
+
env:
|
|
8
|
+
- CFLAGS='-Werror'
|
|
9
|
+
- NO_VALGRIND=1 USE_STANDARD_TMPFILE=1 CFLAGS='-Werror'
|
|
10
|
+
- NO_VALGRIND=1 CFLAGS='-Werror -m32'
|
|
11
|
+
|
|
12
|
+
install:
|
|
13
|
+
- sudo pip install pytest
|
|
14
|
+
- sudo apt-get update
|
|
15
|
+
- sudo apt-get install -y gcc-multilib
|
|
16
|
+
- sudo apt-get install -y zlib1g-dev
|
|
17
|
+
- sudo apt-get install -y zlib1g-dev:i386
|
|
18
|
+
- sudo apt-get install -y gcc
|
|
19
|
+
- sudo apt-get install -y valgrind
|
|
20
|
+
|
|
21
|
+
script:
|
|
22
|
+
- make V=1
|
|
23
|
+
- make test_functional V=1
|
|
24
|
+
- make test_unit V=1
|
|
25
|
+
- make test_valgrind V=1
|
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
# libxlsxwriter: Reporting Bugs and submitting Pull Requests
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## Reporting Bugs
|
|
5
|
+
|
|
6
|
+
Here are some tips on reporting bugs in `libxlsxwriter`.
|
|
7
|
+
|
|
8
|
+
### Upgrade to the latest version of the library
|
|
9
|
+
|
|
10
|
+
Upgrade to the latest version of the library since the bug you are reporting
|
|
11
|
+
may already be fixed.
|
|
12
|
+
|
|
13
|
+
Check the [Changes][changes] section of the documentation to see what has
|
|
14
|
+
changed in the latest versions.
|
|
15
|
+
|
|
16
|
+
[changes]: http://libxlsxwriter.github.io/changes.html
|
|
17
|
+
|
|
18
|
+
You can check which version of `libxlsxwriter` that you are using by checking
|
|
19
|
+
the `xlsxwriter.h` header file or by adding the following to your program:
|
|
20
|
+
|
|
21
|
+
```C
|
|
22
|
+
#include <stdio.h>
|
|
23
|
+
#include "xlsxwriter.h"
|
|
24
|
+
|
|
25
|
+
int main() {
|
|
26
|
+
|
|
27
|
+
printf("Libxlsxwriter version = %s\n", LXW_VERSION);
|
|
28
|
+
|
|
29
|
+
return 0;
|
|
30
|
+
}
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
### Read the documentation
|
|
35
|
+
|
|
36
|
+
Read or search the `libxlsxwriter` [documentation][docs] to see if the issue
|
|
37
|
+
you are encountering is already explained.
|
|
38
|
+
|
|
39
|
+
[docs]: http://libxlsxwriter.github.io/index.html
|
|
40
|
+
|
|
41
|
+
### Look at the example programs
|
|
42
|
+
|
|
43
|
+
There are many [examples programs][examples] in the distribution. Try to
|
|
44
|
+
identify an example program that corresponds to your query and adapt it to use
|
|
45
|
+
as a bug report.
|
|
46
|
+
|
|
47
|
+
[examples]: http://libxlsxwriter.github.io/examples.html
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
### Use the xlsxwriter Issue Tracker
|
|
51
|
+
|
|
52
|
+
The [libxlsxwriter issue tracker][issues] is on GitHub.
|
|
53
|
+
|
|
54
|
+
[issues]: https://github.com/jmcnamara/libxlsxwriter/issues
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
### Tips for submitting a bug report
|
|
58
|
+
|
|
59
|
+
1. Describe the problem as clearly and as concisely as possible.
|
|
60
|
+
2. Include a sample program. This is probably the most important step.
|
|
61
|
+
It is generally easier to describe a problem in code than in written
|
|
62
|
+
prose.
|
|
63
|
+
3. The sample program should be as small as possible to demonstrate the
|
|
64
|
+
problem. Don't copy and paste large non-relevant sections of your
|
|
65
|
+
program.
|
|
66
|
+
|
|
67
|
+
A sample bug report is shown below. This format helps analyze and respond to
|
|
68
|
+
the bug report more quickly.
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
> Subject: Issue with SOMETHING
|
|
72
|
+
>
|
|
73
|
+
> Greetings,
|
|
74
|
+
>
|
|
75
|
+
> I am using libxlsxwriter to do SOMETHING but it appears to do SOMETHING ELSE.
|
|
76
|
+
>
|
|
77
|
+
> I am using CC version X.Y.Z, OS = uname and libxlsxwriter x.y.z.
|
|
78
|
+
>
|
|
79
|
+
> Here is some code that demonstrates the problem:
|
|
80
|
+
>
|
|
81
|
+
>
|
|
82
|
+
>```C
|
|
83
|
+
>#include "xlsxwriter.h"
|
|
84
|
+
>
|
|
85
|
+
>int main() {
|
|
86
|
+
>
|
|
87
|
+
> lxw_workbook *workbook = workbook_new("bug_report.xlsx");
|
|
88
|
+
> lxw_worksheet *worksheet = workbook_add_worksheet(workbook, NULL);
|
|
89
|
+
>
|
|
90
|
+
> worksheet_write_string(worksheet, 0, 0, "Hello", NULL);
|
|
91
|
+
> worksheet_write_number(worksheet, 1, 0, 123, NULL);
|
|
92
|
+
>
|
|
93
|
+
> return workbook_close(workbook);
|
|
94
|
+
>}
|
|
95
|
+
>```
|
|
96
|
+
>
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
# Pull Requests and Contributing to Libxlsxwriter
|
|
100
|
+
|
|
101
|
+
All patches and pull requests are welcome but in general you should start with
|
|
102
|
+
an issue tracker to describe what you intend to do before you do it.
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
### Getting Started
|
|
106
|
+
|
|
107
|
+
1. Pull requests and new feature proposals must start with an [issue
|
|
108
|
+
tracker][issues]. This serves as the focal point for the design discussion.
|
|
109
|
+
2. Describe what you plan to do. If there are API changes add some code
|
|
110
|
+
example to demonstrate them.
|
|
111
|
+
3. Fork the repository.
|
|
112
|
+
4. Run all the tests to make sure the current code works on your system using
|
|
113
|
+
`make test`. See the [Running the Test Suite][tests] section of the docs
|
|
114
|
+
for instructions.
|
|
115
|
+
5. Create a feature branch for your new feature.
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
[tests]: http://libxlsxwriter.github.io/running_the_tests.html
|
|
119
|
+
|
|
120
|
+
### Code Style
|
|
121
|
+
|
|
122
|
+
The code style is mainly K&R style with 4 space indents.
|
|
123
|
+
|
|
124
|
+
The author uses GNU indent (`gindent`) 2.2.10 with the following options:
|
|
125
|
+
|
|
126
|
+
```
|
|
127
|
+
--braces-on-if-line
|
|
128
|
+
--braces-on-struct-decl-line
|
|
129
|
+
--case-indentation 4
|
|
130
|
+
--continue-at-parentheses
|
|
131
|
+
--declaration-comment-column 0
|
|
132
|
+
--format-first-column-comments
|
|
133
|
+
--honour-newlines
|
|
134
|
+
--ignore-profile
|
|
135
|
+
--indent-label 0
|
|
136
|
+
--indent-level 4
|
|
137
|
+
--no-space-after-function-call-names
|
|
138
|
+
--no-tabs
|
|
139
|
+
--swallow-optional-blank-lines
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
The [indent configuration file][indentpro] is available in the repo. The code
|
|
143
|
+
can be indented automatically if the same version of `gindent` is used with
|
|
144
|
+
the following make command:
|
|
145
|
+
|
|
146
|
+
```shell
|
|
147
|
+
make indent
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
Note, make sure you have backed up your files or added them to the index
|
|
151
|
+
before running this command.
|
|
152
|
+
|
|
153
|
+
In general follow the existing style in the code.
|
|
154
|
+
|
|
155
|
+
[indentpro]: https://github.com/jmcnamara/libxlsxwriter/blob/master/.indent.pro
|
|
156
|
+
|
|
157
|
+
### Writing and Running Tests
|
|
158
|
+
|
|
159
|
+
Any significant features should be accompanied by a test. See the `test`
|
|
160
|
+
directory and the [Running the Test Suite][tests] section of the docs for
|
|
161
|
+
details of the test setup.
|
|
162
|
+
|
|
163
|
+
The tests can be run as follows:
|
|
164
|
+
|
|
165
|
+
```shell
|
|
166
|
+
make test
|
|
167
|
+
```
|
|
168
|
+
Same as:
|
|
169
|
+
|
|
170
|
+
```shell
|
|
171
|
+
make test_unit
|
|
172
|
+
make test_functional
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
The functional tests require the Python module [pytest][pytest] as a test runner.
|
|
176
|
+
|
|
177
|
+
If you have `valgrind` installed you can use the test suite to check for memory leaks:
|
|
178
|
+
|
|
179
|
+
```shell
|
|
180
|
+
make test_valgrind
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
When you push your changes they will also be tested automatically using
|
|
184
|
+
[Travis CI][travis].
|
|
185
|
+
|
|
186
|
+
[Travis]: https://travis-ci.org/jmcnamara/libxlsxwriter/
|
|
187
|
+
[pytest]: http://pytest.org/
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
### Documentation
|
|
191
|
+
|
|
192
|
+
The `libxlsxwriter` documentation is written in Doxygen format in the header
|
|
193
|
+
files and in additional `.dox` files in the `docs/src` directory of the
|
|
194
|
+
repo. The documentation can be built as follows:
|
|
195
|
+
|
|
196
|
+
```shell
|
|
197
|
+
make docs
|
|
198
|
+
open docs/html/index.html
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
### Example programs
|
|
203
|
+
|
|
204
|
+
If applicable add an example program to the `examples` directory. Example
|
|
205
|
+
files can be built using:
|
|
206
|
+
|
|
207
|
+
```shell
|
|
208
|
+
make docs
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
### Copyright and License
|
|
212
|
+
|
|
213
|
+
Copyright remains with the original author. Do not include additional
|
|
214
|
+
copyright claims or Licensing requirements. GitHub and the `git` repository
|
|
215
|
+
will record your contribution and it will be acknowledged it in the Changes
|
|
216
|
+
file.
|
|
217
|
+
|
|
218
|
+
|
|
219
|
+
### Submitting the Pull Request
|
|
220
|
+
|
|
221
|
+
If your change involves several incremental `git` commits then `rebase` or
|
|
222
|
+
`squash` them onto another branch so that the Pull Request is a single commit
|
|
223
|
+
or a small number of logical commits.
|
|
224
|
+
|
|
225
|
+
Push your changes to GitHub and submit the Pull Request with a hash link to
|
|
226
|
+
the to the Issue tracker that was opened above.
|