1# sc-im
2Spreadsheet Calculator Improvised, aka sc-im, is an ncurses based, vim-like spreadsheet calculator.
3
4sc-im is based on [sc](https://en.wikipedia.org/wiki/Sc_(spreadsheet_calculator)), whose original authors are James Gosling and Mark Weiser, and mods were later added by Chuck Martin.
5
6## Some of the features of sc-im
7
8- Vim movements commands for editing cell content.
9- UNDO / REDO.
10- 65.536 rows and 702 columns supported. (The number of rows can be expanded to 1.048.576 if wished).
11- CSV / TAB delimited / XLSX file import and export. ODS import. Markdown export.
12- Key-mappings.
13- Autobackup.
14- Direct color support - specifing the RGB values, screen colors can be customized by user, even at runtime.
15- Colorize cells or give them format such as bold, italic or underline.
16- Wide character support. The following alphabets are supported: English, Spanish, French, Italian, German, Portuguese, Russian, Ukrainian, Greek, Turkish, Czech, Japanese, Chinese.
17- Sort of rows.
18- Filter of rows.
19- Subtotals.
20- Cell shifting.
21- Clipboard support.
22- GNUPlot interaction.
23- Scripting support with LUA. Also with triggers and c dynamic linked modules.
24- Implement external functions in the language you prefer and use them in SC-IM.
25- Use SC-IM as a non-interactive calculator, reading its input from an external script.
26
27
28## Quick start
29
30|        Key       |                 Purpose                 |
31|------------------|-----------------------------------------|
32|         =        | Insert a numeric value                  |
33|         \        | Insert a text value                     |
34|         e        | Edit a numeric value                    |
35|         E        | Edit a string value                     |
36|         x        | Delete current cell content             |
37|        :q        | Quit the app                            |
38|        :h        | See help                                |
39|  :w filename.sc  | Save current spreadsheet in sc format   |
40|         j        | Move down                               |
41|         k        | Move up                                 |
42|         h        | Move left                               |
43|         l        | Move right                              |
44|      gtab12      | go to cell AB12                         |
45|         u        | undo last change                        |
46|        C-r       | redo last change undone                 |
47|        yy        | Copy current cell                       |
48|         v        | select a range using cursor/hjkl keys   |
49|         p        | paste a previously yanked cell or range |
50|        ir        | insert row                              |
51|        ic        | insert column                           |
52|        dr        | delete row                              |
53|        dc        | delete column                           |
54
55## Screenshots
56![demo image](screenshots/scim6.png?raw=true)
57![demo image](screenshots/scim-plot-graph.gif?raw=true)
58![demo image](screenshots/scim5.png?raw=true)
59![demo image](screenshots/scim4.png?raw=true)
60![demo image](screenshots/scimp2.png?raw=true)
61![demo image](screenshots/scimp3.png?raw=true)
62
63## Installation
64
65### Dependencies
66
67* Requirements:
68
69  - `ncurses` (best if compiled with wide chars support)
70  - `bison` or `yacc`
71  - `gcc`
72  - `make`
73  - `pkg-config` and `which` (for make to do its job)
74
75* Optionals:
76
77  - `tmux` / `xclip` / `pbpaste` (for clipboard copy/paste)
78  - `gnuplot` (for plots)
79  - `libxlsxreader` (for xls support)
80  - `xlsxwriter` (for xlsx export support)
81  - `libxml-2.0` and `libzip` (for xlsx/ods import support)
82  - `lua` (for Lua scripting)
83  - threads support (in case you want to test this in Minix, just disable autobackup and HAVE_PTHREAD)
84
85### Manual
86
87* Edit [`src/Makefile`](src/Makefile) according to your system and needs:
88```
89    vim src/Makefile
90```
91
92* Run `make`:
93```
94    make -C src
95```
96
97* Optional: You can install the binary `sc-im` in your system by typing with a privileged user:
98```
99    make -C src install
100```
101
102### Building on OS X
103
104You can follow the instructions as above, but if you would like Lua scripting
105support, you will need to install Lua 5.1, which you can do with,
106
107```
108    brew install lua@5.1
109```
110
111And then follow the instructions as above.
112
113### Homebrew for OSX users
114
115```
116brew tap nickolasburr/pfa
117brew install sc-im
118```
119
120### Ubuntu with XLSX import & export
121
122See [this wiki page](https://github.com/andmarti1424/sc-im/wiki/Ubuntu-with-XLSX-import-&-export).
123
124### Configuration
125
126The `scimrc` file can be used to configure `sc-im`. The file should be placed in the `~/.config/sc-im` directory.
127
128Here is an example `~/.config/sc-im/scimrc` :
129
130    set autocalc
131    set numeric
132    set numeric_decimal=0
133    set overlap
134    set xlsx_readformulas
135
136Other configuration variables are listed in the [help file](https://raw.githubusercontent.com/andmarti1424/sc-im/freeze/src/doc).
137
138### Helping us
139
140Want to help?  You can help us with one or more of the following:
141
142* giving sc-im a star on GitHub
143* taking screenshots / creating screencasts showing sc-im
144* making a donation (see below).
145* telling if you use it / like it. I really don't have a clue if this app is used by someone.
146
147### Donations
148
149If you like sc-im please support its development by making a DONATION with PayPal.
150It would really help a lot. 2 kids, 2 cats, 1 wife and only one salary..
151
152<a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=U537V8SNQQ45J" target="_blank">
153<img src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif" />
154</a>
155
156If you wish to make a donation, please click the above button or just send money to scim.spreadsheet@gmail.com via PayPal, choosing "Goods and Services".
157Paypal is preferred over Patreon.
158
159Thanks!
160