-
Notifications
You must be signed in to change notification settings - Fork 160
/
README.sh
executable file
·103 lines (67 loc) · 3.83 KB
/
README.sh
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
#!/bin/sh
cat << EOF
# Awfice - the world smallest office suite
Awfice is a collection of tiny office suite apps:
* a word processor, a spreadsheet, a drawing app and a presentation maker
* each less than 1KB of plain JavaScript
* each is literally just one line of code
* packaged as data URLs, so you can use them right away, without downloading or installing
* you can also use them offline
* but they can't store their state, so whatever you type there would be lost on page refresh
* which can be also sold as a "good for your privacy" feature
* this project is only a half-joke, I actually use a few Awfice apps as quick scratchpads.
* the only way to save your job is to save a HTML or send it to the printer/print to PDF.
## Text editor - $(wc -c < edit.html | tr -d ' ') bytes!
A simple rich text editor. Type whatever you want, it won't be saved anywhere, but it might be convenient for quick throwaway notes. You should be able to use Ctrl+B and Ctrl+I to mark text selection as bold or italic. Undo/redo should work as well. You can also copy/paste text and images from other sources.
Copy and add to bookmarks or open in the URL bar:
\`\`\`html
data:text/html,$(cat edit.html)
\`\`\`
[Try it!](https://htmlpreview.github.io/?https://github.com/zserge/awfice/blob/main/edit.html)
## Spreadsheet - $(wc -c < calc.html | tr -d ' ') bytes!
A very basic spreadsheet with math formulas. It has 100 rows and 26 columns (A..Z). If the value in the cell starts with an "=" = it is evaluated as a formula. You may refer to other cell values, i.e. "=(A10+A11)/A12". Under the hood it uses eval(), so be careful.
Copy and add to bookmarks or open in the URL bar:
\`\`\`html
data:text/html,$(cat calc.html)
\`\`\`
[Try it!](https://htmlpreview.github.io/?https://github.com/zserge/awfice/blob/main/calc.html)
## Drawing app - $(wc -c < draw.html | tr -d ' ') bytes!
Nothing simpler than drawing on a blank canvas with mouse. Works with touch screens as well. To save your results... well, do a screenshot maybe...
Copy and add to bookmarks or open in the URL bar:
\`\`\`html
data:text/html,$(cat draw.html)
\`\`\`
[Try it!](https://htmlpreview.github.io/?https://github.com/zserge/awfice/blob/main/draw.html)
## Presentation maker - $(wc -c < beam.html | tr -d ' ') bytes!
Just a variant of a rich text editor with some hotkeys. There are 50 blank slides for you (I hope you don't need to bore your audience with more slides). Each slide is a rich text editor, but there are some hotkeys to make styling better:
* Ctrl+Alt+1: Header
* Ctrl+Alt+2: Normal style
* Ctrl+Alt+3: Align left
* Ctrl+Alt+4: Align center
* Ctrl+Alt+5: Align right
* Ctrl+Alt+6: Outdent
* Ctrl+Alt+7: Indent
* Ctrl+Alt+8: Make a list
Copy and add to bookmarks or open in the URL bar:
\`\`\`html
data:text/html,$(cat beam.html)
\`\`\`
[Try it!](https://htmlpreview.github.io/?https://github.com/zserge/awfice/blob/main/beam.html)
## Code editor - $(wc -c < code.html) bytes!
A simple code editor. You can type in HTML, CSS & Javascript.
Copy and add to bookmarks or open in the URL bar:
\`\`\`html
data:text/html,$(cat code.html)
\`\`\`
[Try it!](https://htmlpreview.github.io/?https://github.com/zserge/awfice/blob/main/code.html)
## Calculator - $(wc -c < calculator.html) bytes!
A simple calculator which supports the basic operational symbol to calculate.
Copy and add to bookmarks or open in the URL bar:
\`\`\`html
data:text/html,$(cat calculator.html)
\`\`\`
[Try it!](https://htmlpreview.github.io/?https://github.com/zserge/awfice/blob/main/calculator.html)
## Contributions
The code is distributed under MIT license. PRs are always welcome, especially if they fix something or make the code smaller, or add features that are valuable, but do not require a lot of code.
To modify something - edit HTML files directly. There is README.sh script that re-generates the README and embeds apps code into it.
EOF