html-flip-book-react 0.0.0-alpha.1
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.
- package/dist/flip-book.d.ts +14 -0
- package/dist/flip-book.d.ts.map +1 -0
- package/dist/flip-book.js +1410 -0
- package/dist/flip-book.js.map +1 -0
- package/example/.vscode/settings.json +3 -0
- package/example/README.md +47 -0
- package/example/assets/pages_data/en/assets/cover.jpg +0 -0
- package/example/assets/pages_data/en/assets/sql-command.png +0 -0
- package/example/assets/pages_data/en/content/000-introduction.md +85 -0
- package/example/assets/pages_data/en/content/001-databases.md +39 -0
- package/example/assets/pages_data/en/content/002-install-mysql.md +162 -0
- package/example/assets/pages_data/en/content/003-creating-tables.md +304 -0
- package/example/assets/pages_data/en/content/004-basic-syntax.md +145 -0
- package/example/assets/pages_data/en/content/005-select.md +359 -0
- package/example/assets/pages_data/en/content/006-where.md +225 -0
- package/example/assets/pages_data/en/content/007-order-and-group-by.md +142 -0
- package/example/assets/pages_data/en/content/008-insert.md +86 -0
- package/example/assets/pages_data/en/content/009-update.md +92 -0
- package/example/assets/pages_data/en/content/010-delete.md +28 -0
- package/example/assets/pages_data/en/content/011-join.md +297 -0
- package/example/assets/pages_data/en/content/012-sql-command-categories.md +121 -0
- package/example/assets/pages_data/en/content/013-sub-queries.md +112 -0
- package/example/assets/pages_data/en/content/014-unions.md +124 -0
- package/example/assets/pages_data/en/content/015-Keys-in-a-Relational Database.md +51 -0
- package/example/assets/pages_data/en/content/016-Logical-operator-keywords.md +17 -0
- package/example/assets/pages_data/en/content/017-having-clause_aggregate-functions.md +184 -0
- package/example/assets/pages_data/en/content/018-essential-mysql-functions.md +190 -0
- package/example/assets/pages_data/en/content/019-triggers-in-sql.md +133 -0
- package/example/assets/pages_data/en/content/020-TCL-commands.md +154 -0
- package/example/assets/pages_data/en/content/021-DCL-commands.md +126 -0
- package/example/assets/pages_data/en/content/100-mysqldump.md +109 -0
- package/example/assets/pages_data/en/content/101-learn-materialize.md +267 -0
- package/example/assets/pages_data/en/content/999-conclusion.md +24 -0
- package/example/assets/pages_data/he/4.txt +2 -0
- package/example/assets/pages_data/he/5.txt +4 -0
- package/example/assets/pages_data/he/6.txt +4 -0
- package/example/index.html +21 -0
- package/example/package-lock.json +5324 -0
- package/example/package.json +39 -0
- package/example/src/App.css +52 -0
- package/example/src/App.tsx +25 -0
- package/example/src/EnBook.tsx +55 -0
- package/example/src/HeBook.tsx +44 -0
- package/example/src/index.tsx +12 -0
- package/example/vite-env.d.ts +1 -0
- package/example/vite.config.js +84 -0
- package/package.json +45 -0
- package/src/FlipBook.tsx +45 -0
- package/vite.config.js +66 -0
|
@@ -0,0 +1,267 @@
|
|
|
1
|
+
# Learn Materialize by running streaming SQL on your nginx logs
|
|
2
|
+
|
|
3
|
+
In this tutorial, I will show you how [Materialize](https://materialize.com) works by using it to run SQL queries on continuously produced nginx logs. By the end of the tutorial, you will have a better idea of what Materialize is, how it's different than other SQL engines, and how to use it.
|
|
4
|
+
|
|
5
|
+
# Prerequisites
|
|
6
|
+
|
|
7
|
+
For the sake of simplicity, I will use a brand new Ubuntu 21.04 server where I will install nginx, Materialize and `mzcli`, a CLI tool similar to `psql` used to connect to Materialize and execute SQL on it.
|
|
8
|
+
|
|
9
|
+
If you want to follow along you could spin up a new Ubuntu 21.04 server on your favorite could provider.
|
|
10
|
+
|
|
11
|
+
If you prefer runing Materialize on a different operating system, you can follow the steps on how to install Materialize here:
|
|
12
|
+
|
|
13
|
+
* [How to install Materialize](https://materialize.com/docs/install/)
|
|
14
|
+
|
|
15
|
+
# What is Materialize
|
|
16
|
+
|
|
17
|
+
Materialize is a streaming database for real-time analytics.
|
|
18
|
+
|
|
19
|
+
It is not a substitution for your transactional database, instead it accepts input data from a variety of sources like:
|
|
20
|
+
|
|
21
|
+
* Messages from streaming sources like Kafka
|
|
22
|
+
* Archived data from object stores like S3
|
|
23
|
+
* Change feeds from databases like PostgreSQL
|
|
24
|
+
* Data in Files: CSV, JSON and even unstructured files like logs _(what we'll be using today.)_
|
|
25
|
+
|
|
26
|
+
And it maintains the answers to your SQL queries over time, keeping them up-to-date as new data flows in (using _materialized views_), instead of running them against a static snapshot at a point in time.
|
|
27
|
+
|
|
28
|
+

|
|
29
|
+
|
|
30
|
+
If you want to learn more about Materialize, make sure to check out their official documentation here:
|
|
31
|
+
|
|
32
|
+
[Materialize Documentation](https://materialize.com/docs/)
|
|
33
|
+
|
|
34
|
+
# Installing Materialize
|
|
35
|
+
|
|
36
|
+
Materialize runs as a single binary called `materialized` _(d for daemon, following Unix conventions)_. Since we're running on Linux, we'll just install Materialize directly. To install it, run the following command:
|
|
37
|
+
|
|
38
|
+
```
|
|
39
|
+
sudo apt install materialized
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Once it's installed, start Materialize (with sudo so it has access to nginx logs):
|
|
43
|
+
|
|
44
|
+
```
|
|
45
|
+
sudo materialized
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Now that we have the `materialized` running, we need to open a new terminal to install and run a CLI tool that we use to interact with our Materialize instance!
|
|
49
|
+
|
|
50
|
+
There are other ways that you could use in order to run Materialize as described [here](https://materialize.com/docs/install/). For a production-ready Materialize instance, I would recommend giving [Materialize Cloud](https://materialize.com/product) a try!
|
|
51
|
+
|
|
52
|
+
# Installing `mzcli`
|
|
53
|
+
|
|
54
|
+
The [`mzcli` tool](https://github.com/MaterializeInc/mzcli#quick-start) lets us connect to Materialize similar to how we would use a SQL client to connect to any other database.
|
|
55
|
+
|
|
56
|
+
Materialize is wire-compatible with PostgreSQL, so if you have `psql` already installed you could use it instead of `mzcli`, but with `mzcli` you get nice syntax highlighting and autocomplete when writing your queries.
|
|
57
|
+
|
|
58
|
+
To learn the main differences between the two, make sure to check out the official documentation here: [Materialize CLI Connections](https://materialize.com/docs/connect/cli/)
|
|
59
|
+
|
|
60
|
+
The easiest way to install `mzcli` is via `pipx`, so first run:
|
|
61
|
+
|
|
62
|
+
```
|
|
63
|
+
apt install pipx
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
and, once `pipx` is installed, install `mzcli` with:
|
|
67
|
+
|
|
68
|
+
```
|
|
69
|
+
pipx install mzcli
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
Now that we have `mzcli` we can connect to `materialized` with:
|
|
73
|
+
|
|
74
|
+
```
|
|
75
|
+
mzcli -U materialize -h localhost -p 6875 materialize
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+

|
|
79
|
+
|
|
80
|
+
For this demo, let's quickly install nginx and use Regex to parse the log and create Materialized Views.
|
|
81
|
+
|
|
82
|
+
## Installing nginx
|
|
83
|
+
|
|
84
|
+
If you don't already have nginx installed, install it with the following command:
|
|
85
|
+
|
|
86
|
+
```
|
|
87
|
+
sudo apt install nginx
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
Next, let's populate the access log with some entries with a Bash loop:
|
|
91
|
+
|
|
92
|
+
```
|
|
93
|
+
for i in {1..200} ; do curl -s 'localhost/materialize' > /dev/null ; echo $i ; done
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
> If you have an actual nginx `access.log`, you can skip the step above.
|
|
97
|
+
|
|
98
|
+
Now we'll have some entries in the `/var/log/nginx/access.log` access log file that we would be able to able to feed into Materialize.
|
|
99
|
+
|
|
100
|
+
## Adding a Materialize Source
|
|
101
|
+
|
|
102
|
+
By creating a Source you are essentially telling Materialize to connect to some external data source. As described in the introduction, you could connect a wide variety of sources to Materialize.
|
|
103
|
+
|
|
104
|
+
For the full list of source types make sure to check out the official documentation here:
|
|
105
|
+
|
|
106
|
+
[Materialize source types](https://materialize.com/docs/sql/create-source/)
|
|
107
|
+
|
|
108
|
+
Let's start by creating a [text file source](https://materialize.com/docs/sql/create-source/text-file/) from our nginx access log.
|
|
109
|
+
|
|
110
|
+
First, access the Materialize instance with the `mzcli` command:
|
|
111
|
+
|
|
112
|
+
```
|
|
113
|
+
mzcli -U materialize -h localhost -p 6875 materialize
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
Then run the following statement to create the source:
|
|
117
|
+
|
|
118
|
+
```
|
|
119
|
+
CREATE SOURCE nginx_log
|
|
120
|
+
FROM FILE '/var/log/nginx/access.log'
|
|
121
|
+
WITH (tail = true)
|
|
122
|
+
FORMAT REGEX '(?P<ipaddress>[^ ]+) - - \[(?P<time>[^\]]+)\] "(?P<request>[^ ]+) (?P<url>[^ ]+)[^"]+" (?P<statuscode>\d{3})';
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
A quick rundown:
|
|
126
|
+
|
|
127
|
+
* `CREATE SOURCE`: First we specify that we want to create a source
|
|
128
|
+
* `FROM FILE`: Then we specify that this source will read from a local file, and we provide the path to that file
|
|
129
|
+
* `WITH (tail = true)`: Continually check the file for new content
|
|
130
|
+
* `FORMAT REGEX`: as this is an unstructured file we need to specify regex as the format so that we could get only the specific parts of the log that we need.
|
|
131
|
+
|
|
132
|
+
Let's quickly review the Regex itself as well.
|
|
133
|
+
|
|
134
|
+
> The Materialize-specific behavior to note here is the `?P<NAME_HERE>` pattern extracts the matched text into a column named `NAME_HERE`.
|
|
135
|
+
|
|
136
|
+
To make this a bit more clear, a standard entry in your nginx access log file would look like this:
|
|
137
|
+
|
|
138
|
+
```
|
|
139
|
+
123.123.123.119 - - [13/Oct/2021:10:54:22 +0000] "GET / HTTP/1.1" 200 396 "-" "Mozilla/5.0 zgrab/0.x"
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
* `(?P<ipaddress>[^ ]+)`: With this pattern we match the IP address for each line of the nginx log, e.g. `123.123.123.119`.
|
|
143
|
+
* `\[(?P<time>[^\]]+)\]`: the timestamp string from inside square brackets, e.g. `[13/Oct/2021:10:54:22 +0000]`
|
|
144
|
+
* `"(?P<request>[^ ]+)`: the type of request like `GET`, `POST` etc.
|
|
145
|
+
* `(?P<url>[^ ]+)`: the relative URL, eg. `/favicon.ico`
|
|
146
|
+
* `(?P<statuscode>\d{3})`: the three digit HTTP status code.
|
|
147
|
+
|
|
148
|
+
Once you execute the create source statement, you can confirm the source was created successfully by running the following:
|
|
149
|
+
|
|
150
|
+
```
|
|
151
|
+
mz> SHOW SOURCES;
|
|
152
|
+
// Output
|
|
153
|
+
+-----------+
|
|
154
|
+
| name |
|
|
155
|
+
|-----------|
|
|
156
|
+
| nginx_log |
|
|
157
|
+
+-----------+
|
|
158
|
+
SELECT 1
|
|
159
|
+
Time: 0.021s
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
Now that we have our source in place, let's go ahead and create a view!
|
|
163
|
+
|
|
164
|
+
# Creating a Materialized View
|
|
165
|
+
|
|
166
|
+
You may be familiar with [Materialized Views](https://en.wikipedia.org/wiki/Materialized_view) from the world of traditional databases like PostgreSQL, which are essentially cached queries. The unique feature here is the materialized view we are about to create is **automatically kept up-to-date**.
|
|
167
|
+
|
|
168
|
+
In order to create a materialized view, we will use the following statement:
|
|
169
|
+
|
|
170
|
+
```
|
|
171
|
+
CREATE MATERIALIZED VIEW aggregated_logs AS
|
|
172
|
+
SELECT
|
|
173
|
+
ipaddress,
|
|
174
|
+
request,
|
|
175
|
+
url,
|
|
176
|
+
statuscode::int,
|
|
177
|
+
COUNT(*) as count
|
|
178
|
+
FROM nginx_log GROUP BY 1,2,3,4;
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
The important things to note are:
|
|
182
|
+
|
|
183
|
+
* Materialize will keep the results of the embedded query in memory, so you'll always get a fast and up-to-date answer
|
|
184
|
+
* The results are incrementally updated as new log events arrive
|
|
185
|
+
|
|
186
|
+
Under the hood, **Materialize compiles your SQL query into a dataflow** and then takes care of all the heavy lifting for you. This is incredibly powerful, as it allows you to process data in real-time using _just_ SQL.
|
|
187
|
+
|
|
188
|
+
A quick rundown of the statement itself:
|
|
189
|
+
|
|
190
|
+
* First we start with the `CREATE MATERIALIZED VIEW aggregated_logs` which identifies that we want to create a new Materialized view named `aggregated_logs`.
|
|
191
|
+
* Then we specify the `SELECT` statement that we are interested in keeping track of over time. In this case we are aggregating the data in our log file by `ipaddress`, `request`, `url` and `statuscode`, and we are counting the total instances of each combo with a `COUNT(*)`
|
|
192
|
+
|
|
193
|
+
When creating a Materialized View, it could be based on multiple sources like a stream from Kafka, a raw data file that you have on an S3 bucket, or your PostgreSQL database. This single statement will give you the power to analyze your data in real-time.
|
|
194
|
+
|
|
195
|
+
> We specified a simple `SELECT` that we want the view to be based on but this could include complex operations like `JOIN`s, however for the sake of this tutorial we are keeping things simple.
|
|
196
|
+
|
|
197
|
+
For more information about Materialized Views check out the official documentation here:
|
|
198
|
+
|
|
199
|
+
[Creating Materialized views](https://materialize.com/docs/sql/create-materialized-view/)
|
|
200
|
+
|
|
201
|
+
Now you could use this new view and interact with the data from the nginx log with pure SQL!
|
|
202
|
+
|
|
203
|
+
# Reading from the view
|
|
204
|
+
|
|
205
|
+
If we do a `SELECT` on this Materialized view, we get a nice aggregated summary of stats:
|
|
206
|
+
|
|
207
|
+
```sql
|
|
208
|
+
SELECT * FROM aggregated_logs;
|
|
209
|
+
|
|
210
|
+
ipaddress | request | url | statuscode | count
|
|
211
|
+
----------------+---------+--------------------------+------------+-------
|
|
212
|
+
127.0.0.1 | GET | /materialize | 404 | 200
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
As more requests come in to the nginx server, the aggregated stats in the view are kept up-to-date.
|
|
216
|
+
|
|
217
|
+
We could also write queries that do further aggregation and filtering on top of the materialized view, for example, counting requests by route only:
|
|
218
|
+
|
|
219
|
+
```
|
|
220
|
+
SELECT url, SUM(count) as total FROM aggregated_logs GROUP BY 1 ORDER BY 2 DESC;
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
If we were re-run the query over and over again, we could see the numbers change instantly as soon as we get new data in the log as Materialize processes each line of the log and keeps listening for new lines:
|
|
224
|
+
|
|
225
|
+
```
|
|
226
|
+
+--------------------------+-------+
|
|
227
|
+
| url | total |
|
|
228
|
+
|--------------------------+-------|
|
|
229
|
+
| /materialize/demo-page-2 | 1255 |
|
|
230
|
+
| /materialize/demo-page | 1957 |
|
|
231
|
+
| /materialize | 400 |
|
|
232
|
+
+--------------------------+-------+
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
As another example, let's use `psql` together with the `watch` command to see this in action.
|
|
236
|
+
|
|
237
|
+
If you don't have `psql` already isntalled you can install it with the following command:
|
|
238
|
+
|
|
239
|
+
```
|
|
240
|
+
sudo apt install postgresql-client
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
After that, let's run the `SELECT * FROM aggregated_logs` statement every second using the `watch` command:
|
|
244
|
+
|
|
245
|
+
```
|
|
246
|
+
watch -n1 "psql -c 'select * from aggregated_logs' -U materialize -h localhost -p 6875 materialize"
|
|
247
|
+
```
|
|
248
|
+
|
|
249
|
+
In **another terminal window**, you could run another `for` loop to generate some new nginx logs and see how the results change:
|
|
250
|
+
|
|
251
|
+
```
|
|
252
|
+
for i in {1..2000} ; do curl -s 'localhost/materialize/demo-page-2' > /dev/null ; echo $i ; done
|
|
253
|
+
```
|
|
254
|
+
|
|
255
|
+
The output of the `watch` command would look like this:
|
|
256
|
+
|
|
257
|
+

|
|
258
|
+
|
|
259
|
+
Feel free to experiment with more complex queries and analyze your nginx access log for suspicious activity using pure SQL and keep track of the results in real-time!
|
|
260
|
+
|
|
261
|
+
# Conclusion
|
|
262
|
+
|
|
263
|
+
By now, hopefully you have a hands-on understanding of how incrementally maintained materialized views work in Materialize. In case that you like the project, make sure to star it on GitHub:
|
|
264
|
+
|
|
265
|
+
[https://github.com/MaterializeInc/materialize](https://github.com/MaterializeInc/materialize)
|
|
266
|
+
|
|
267
|
+
[Source](https://devdojo.com/bobbyiliev/learn-materialize-by-running-streaming-sql-on-your-nginx-logs)
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Conclusion
|
|
2
|
+
|
|
3
|
+
Congratulations! You have just completed the SQL basics guide!
|
|
4
|
+
|
|
5
|
+
If you found this helpful, be sure to star the project on [GitHub](https://github.com/bobbyiliev/introduction-to-sql)!
|
|
6
|
+
|
|
7
|
+
If you have any suggestions for improvements, make sure to contribute pull requests or open issues.
|
|
8
|
+
|
|
9
|
+
In this introduction to SQL eBook, we just covered the basics, but you still have enough under your belt to start working with any relational database out there!
|
|
10
|
+
|
|
11
|
+
As a next step, try to create a database server, import some demo data, and play around with all of the statements that you've learned so far. You can also take a look at this website here to help you build your tables and relations and visualize them:
|
|
12
|
+
|
|
13
|
+
[https://dbdiagram.io/](https://dbdiagram.io/)
|
|
14
|
+
|
|
15
|
+
In case that this eBook inspired you to contribute to some fantastic open-source project, make sure to tweet about it and tag [@bobbyiliev_](https://twitter.com) so that we could check it out!
|
|
16
|
+
|
|
17
|
+
Congrats again on completing this eBook!
|
|
18
|
+
|
|
19
|
+
## Other eBooks
|
|
20
|
+
|
|
21
|
+
Some other opensource eBooks that you might find helpful are:
|
|
22
|
+
|
|
23
|
+
- [Introduction to Git and GitHub](https://github.com/bobbyiliev/introduction-to-git-and-github-ebook)
|
|
24
|
+
- [Introduction to Bash Scripting](https://github.com/bobbyiliev/introduction-to-bash-scripting)
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
א מַשָּׂא דְבַר-יְהוָה, אֶל-יִשְׂרָאֵל, בְּיַד, מַלְאָכִי. ב אָהַבְתִּי אֶתְכֶם אָמַר יְהוָה, וַאֲמַרְתֶּם בַּמָּה אֲהַבְתָּנוּ; הֲלוֹא-אָח עֵשָׂו לְיַעֲקֹב נְאֻם-יְהוָה, וָאֹהַב אֶת-יַעֲקֹב. ג וְאֶת-עֵשָׂו, שָׂנֵאתִי; וָאָשִׂים אֶת-הָרָיו שְׁמָמָה, וְאֶת-נַחֲלָתוֹ לְתַנּוֹת מִדְבָּר. ד כִּי-תֹאמַר אֱדוֹם רֻשַּׁשְׁנוּ, וְנָשׁוּב וְנִבְנֶה חֳרָבוֹת--כֹּה אָמַר יְהוָה צְבָאוֹת, הֵמָּה יִבְנוּ וַאֲנִי אֶהֱרוֹס; וְקָרְאוּ לָהֶם גְּבוּל רִשְׁעָה, וְהָעָם אֲשֶׁר-זָעַם יְהוָה עַד-עוֹלָם. ה וְעֵינֵיכֶם, תִּרְאֶינָה; וְאַתֶּם תֹּאמְרוּ יִגְדַּל יְהוָה, מֵעַל לִגְבוּל יִשְׂרָאֵל. ו בֵּן יְכַבֵּד אָב, וְעֶבֶד אֲדֹנָיו; וְאִם-אָב אָנִי אַיֵּה כְבוֹדִי וְאִם-אֲדוֹנִים אָנִי אַיֵּה מוֹרָאִי אָמַר יְהוָה צְבָאוֹת, לָכֶם הַכֹּהֲנִים בּוֹזֵי שְׁמִי, וַאֲמַרְתֶּם, בַּמֶּה בָזִינוּ אֶת-שְׁמֶךָ. ז מַגִּישִׁים עַל-מִזְבְּחִי לֶחֶם מְגֹאָל, וַאֲמַרְתֶּם בַּמֶּה גֵאַלְנוּךָ; בֶּאֱמָרְכֶם, שֻׁלְחַן יְהוָה נִבְזֶה הוּא. ח וְכִי-תַגִּישׁוּן עִוֵּר לִזְבֹּחַ אֵין רָע, וְכִי תַגִּישׁוּ פִּסֵּחַ וְחֹלֶה אֵין רָע; הַקְרִיבֵהוּ נָא לְפֶחָתֶךָ, הֲיִרְצְךָ אוֹ הֲיִשָּׂא פָנֶיךָ--אָמַר, יְהוָה צְבָאוֹת. ט וְעַתָּה חַלּוּ-נָא פְנֵי-אֵל, וִיחָנֵּנוּ; מִיֶּדְכֶם, הָיְתָה זֹּאת--הֲיִשָּׂא מִכֶּם פָּנִים, אָמַר יְהוָה צְבָאוֹת. י מִי גַם-בָּכֶם וְיִסְגֹּר דְּלָתַיִם, וְלֹא-תָאִירוּ מִזְבְּחִי חִנָּם; אֵין-לִי חֵפֶץ בָּכֶם, אָמַר יְהוָה צְבָאוֹת, וּמִנְחָה, לֹא-אֶרְצֶה מִיֶּדְכֶם. יא כִּי מִמִּזְרַח-שֶׁמֶשׁ וְעַד-מְבוֹאוֹ, גָּדוֹל שְׁמִי בַּגּוֹיִם, וּבְכָל-מָקוֹם מֻקְטָר מֻגָּשׁ לִשְׁמִי, וּמִנְחָה טְהוֹרָה: כִּי-גָדוֹל שְׁמִי בַּגּוֹיִם, אָמַר יְהוָה צְבָאוֹת. יב וְאַתֶּם, מְחַלְּלִים אוֹתוֹ--בֶּאֱמָרְכֶם, שֻׁלְחַן אֲדֹנָי מְגֹאָל הוּא, וְנִיבוֹ, נִבְזֶה אָכְלוֹ. יג וַאֲמַרְתֶּם הִנֵּה מַתְּלָאָה וְהִפַּחְתֶּם אוֹתוֹ, אָמַר יְהוָה צְבָאוֹת, וַהֲבֵאתֶם גָּזוּל וְאֶת-הַפִּסֵּחַ וְאֶת-הַחוֹלֶה, וַהֲבֵאתֶם אֶת-הַמִּנְחָה; הַאֶרְצֶה אוֹתָהּ מִיֶּדְכֶם, אָמַר יְהוָה. {ס}
|
|
2
|
+
יד וְאָרוּר נוֹכֵל, וְיֵשׁ בְּעֶדְרוֹ זָכָר, וְנֹדֵר וְזֹבֵחַ מָשְׁחָת, לַאדֹנָי: כִּי מֶלֶךְ גָּדוֹל אָנִי, אָמַר יְהוָה צְבָאוֹת, וּשְׁמִי, נוֹרָא בַגּוֹיִם.
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
א וְעַתָּה, אֲלֵיכֶם הַמִּצְוָה הַזֹּאת--הַכֹּהֲנִים. ב אִם-לֹא תִשְׁמְעוּ וְאִם-לֹא תָשִׂימוּ עַל-לֵב לָתֵת כָּבוֹד לִשְׁמִי, אָמַר יְהוָה צְבָאוֹת, וְשִׁלַּחְתִּי בָכֶם אֶת-הַמְּאֵרָה, וְאָרוֹתִי אֶת-בִּרְכוֹתֵיכֶם; וְגַם, אָרוֹתִיהָ, כִּי אֵינְכֶם, שָׂמִים עַל-לֵב. ג הִנְנִי גֹעֵר לָכֶם, אֶת-הַזֶּרַע, וְזֵרִיתִי פֶרֶשׁ עַל-פְּנֵיכֶם, פֶּרֶשׁ חַגֵּיכֶם; וְנָשָׂא אֶתְכֶם, אֵלָיו. ד וִידַעְתֶּם--כִּי שִׁלַּחְתִּי אֲלֵיכֶם, אֵת הַמִּצְוָה הַזֹּאת: לִהְיוֹת בְּרִיתִי אֶת-לֵוִי, אָמַר יְהוָה צְבָאוֹת. ה בְּרִיתִי הָיְתָה אִתּוֹ, הַחַיִּים וְהַשָּׁלוֹם, וָאֶתְּנֵם-לוֹ מוֹרָא, וַיִּירָאֵנִי; וּמִפְּנֵי שְׁמִי, נִחַת הוּא. ו תּוֹרַת אֱמֶת הָיְתָה בְּפִיהוּ, וְעַוְלָה לֹא-נִמְצָא בִשְׂפָתָיו; בְּשָׁלוֹם וּבְמִישׁוֹר הָלַךְ אִתִּי, וְרַבִּים הֵשִׁיב מֵעָוֹן. ז כִּי-שִׂפְתֵי כֹהֵן יִשְׁמְרוּ-דַעַת, וְתוֹרָה יְבַקְשׁוּ מִפִּיהוּ: כִּי מַלְאַךְ יְהוָה-צְבָאוֹת, הוּא. ח וְאַתֶּם סַרְתֶּם מִן-הַדֶּרֶךְ, הִכְשַׁלְתֶּם רַבִּים בַּתּוֹרָה; שִׁחַתֶּם בְּרִית הַלֵּוִי, אָמַר יְהוָה צְבָאוֹת. ט וְגַם-אֲנִי נָתַתִּי אֶתְכֶם, נִבְזִים וּשְׁפָלִים--לְכָל-הָעָם: כְּפִי, אֲשֶׁר אֵינְכֶם שֹׁמְרִים אֶת-דְּרָכַי, וְנֹשְׂאִים פָּנִים, בַּתּוֹרָה. {פ}
|
|
2
|
+
י הֲלוֹא אָב אֶחָד לְכֻלָּנוּ, הֲלוֹא אֵל אֶחָד בְּרָאָנוּ; מַדּוּעַ, נִבְגַּד אִישׁ בְּאָחִיו--לְחַלֵּל, בְּרִית אֲבֹתֵינוּ. יא בָּגְדָה יְהוּדָה, וְתוֹעֵבָה נֶעֶשְׂתָה בְיִשְׂרָאֵל וּבִירוּשָׁלִָם: כִּי חִלֵּל יְהוּדָה, קֹדֶשׁ יְהוָה אֲשֶׁר אָהֵב, וּבָעַל, בַּת-אֵל נֵכָר. יב יַכְרֵת יְהוָה לָאִישׁ אֲשֶׁר יַעֲשֶׂנָּה, עֵר וְעֹנֶה, מֵאָהֳלֵי, יַעֲקֹב; וּמַגִּישׁ מִנְחָה, לַיהוָה צְבָאוֹת. {פ}
|
|
3
|
+
יג וְזֹאת, שֵׁנִית תַּעֲשׂוּ--כַּסּוֹת דִּמְעָה אֶת-מִזְבַּח יְהוָה, בְּכִי וַאֲנָקָה; מֵאֵין עוֹד, פְּנוֹת אֶל-הַמִּנְחָה, וְלָקַחַת רָצוֹן, מִיֶּדְכֶם. יד וַאֲמַרְתֶּם, עַל-מָה: עַל כִּי-יְהוָה הֵעִיד בֵּינְךָ וּבֵין אֵשֶׁת נְעוּרֶיךָ, אֲשֶׁר אַתָּה בָּגַדְתָּה בָּהּ, וְהִיא חֲבֶרְתְּךָ, וְאֵשֶׁת בְּרִיתֶךָ. טו וְלֹא-אֶחָד עָשָׂה, וּשְׁאָר רוּחַ לוֹ, וּמָה הָאֶחָד, מְבַקֵּשׁ זֶרַע אֱלֹהִים; וְנִשְׁמַרְתֶּם, בְּרוּחֲכֶם, וּבְאֵשֶׁת נְעוּרֶיךָ, אַל-יִבְגֹּד. טז כִּי-שָׂנֵא שַׁלַּח, אָמַר יְהוָה אֱלֹהֵי יִשְׂרָאֵל, וְכִסָּה חָמָס עַל-לְבוּשׁוֹ, אָמַר יְהוָה צְבָאוֹת; וְנִשְׁמַרְתֶּם בְּרוּחֲכֶם, וְלֹא תִבְגֹּדוּ. {פ}
|
|
4
|
+
יז הוֹגַעְתֶּם יְהוָה בְּדִבְרֵיכֶם, וַאֲמַרְתֶּם בַּמָּה הוֹגָעְנוּ: בֶּאֱמָרְכֶם, כָּל-עֹשֵׂה רָע טוֹב בְּעֵינֵי יְהוָה וּבָהֶם הוּא חָפֵץ, אוֹ אַיֵּה, אֱלֹהֵי הַמִּשְׁפָּט.
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
א הִנְנִי שֹׁלֵחַ מַלְאָכִי, וּפִנָּה-דֶרֶךְ לְפָנָי; וּפִתְאֹם יָבוֹא אֶל-הֵיכָלוֹ הָאָדוֹן אֲשֶׁר-אַתֶּם מְבַקְשִׁים, וּמַלְאַךְ הַבְּרִית אֲשֶׁר-אַתֶּם חֲפֵצִים הִנֵּה-בָא--אָמַר, יְהוָה צְבָאוֹת. ב וּמִי מְכַלְכֵּל אֶת-יוֹם בּוֹאוֹ, וּמִי הָעֹמֵד בְּהֵרָאוֹתוֹ: כִּי-הוּא כְּאֵשׁ מְצָרֵף, וּכְבֹרִית מְכַבְּסִים. ג וְיָשַׁב מְצָרֵף וּמְטַהֵר, כֶּסֶף, וְטִהַר אֶת-בְּנֵי-לֵוִי וְזִקַּק אֹתָם, כַּזָּהָב וְכַכָּסֶף; וְהָיוּ, לַיהוָה, מַגִּישֵׁי מִנְחָה, בִּצְדָקָה. ד וְעָרְבָה, לַיהוָה, מִנְחַת יְהוּדָה, וִירוּשָׁלִָם--כִּימֵי עוֹלָם, וּכְשָׁנִים קַדְמֹנִיֹּת. ה וְקָרַבְתִּי אֲלֵיכֶם, לַמִּשְׁפָּט, וְהָיִיתִי עֵד מְמַהֵר בַּמְכַשְּׁפִים וּבַמְנָאֲפִים, וּבַנִּשְׁבָּעִים לַשָּׁקֶר; וּבְעֹשְׁקֵי שְׂכַר-שָׂכִיר אַלְמָנָה וְיָתוֹם וּמַטֵּי-גֵר, וְלֹא יְרֵאוּנִי--אָמַר, יְהוָה צְבָאוֹת. ו כִּי אֲנִי יְהוָה, לֹא שָׁנִיתִי; וְאַתֶּם בְּנֵי-יַעֲקֹב, לֹא כְלִיתֶם. ז לְמִימֵי אֲבֹתֵיכֶם סַרְתֶּם מֵחֻקַּי, וְלֹא שְׁמַרְתֶּם--שׁוּבוּ אֵלַי וְאָשׁוּבָה אֲלֵיכֶם, אָמַר יְהוָה צְבָאוֹת; וַאֲמַרְתֶּם, בַּמֶּה נָשׁוּב. ח הֲיִקְבַּע אָדָם אֱלֹהִים, כִּי אַתֶּם קֹבְעִים אֹתִי, וַאֲמַרְתֶּם, בַּמֶּה קְבַעֲנוּךָ: הַמַּעֲשֵׂר, וְהַתְּרוּמָה. ט בַּמְּאֵרָה אַתֶּם נֵאָרִים, וְאֹתִי אַתֶּם קֹבְעִים--הַגּוֹי, כֻּלּוֹ. י הָבִיאוּ אֶת-כָּל-הַמַּעֲשֵׂר אֶל-בֵּית הָאוֹצָר, וִיהִי טֶרֶף בְּבֵיתִי, וּבְחָנוּנִי נָא בָּזֹאת, אָמַר יְהוָה צְבָאוֹת: אִם-לֹא אֶפְתַּח לָכֶם, אֵת אֲרֻבּוֹת הַשָּׁמַיִם, וַהֲרִיקֹתִי לָכֶם בְּרָכָה, עַד-בְּלִי-דָי. יא וְגָעַרְתִּי לָכֶם בָּאֹכֵל, וְלֹא-יַשְׁחִת לָכֶם אֶת-פְּרִי הָאֲדָמָה; וְלֹא-תְשַׁכֵּל לָכֶם הַגֶּפֶן בַּשָּׂדֶה, אָמַר יְהוָה צְבָאוֹת. יב וְאִשְּׁרוּ אֶתְכֶם, כָּל-הַגּוֹיִם: כִּי-תִהְיוּ אַתֶּם אֶרֶץ חֵפֶץ, אָמַר יְהוָה צְבָאוֹת. {פ}
|
|
2
|
+
יג חָזְקוּ עָלַי דִּבְרֵיכֶם, אָמַר יְהוָה; וַאֲמַרְתֶּם, מַה-נִּדְבַּרְנוּ עָלֶיךָ. יד אֲמַרְתֶּם, שָׁוְא עֲבֹד אֱלֹהִים; וּמַה-בֶּצַע, כִּי שָׁמַרְנוּ מִשְׁמַרְתּוֹ, וְכִי הָלַכְנוּ קְדֹרַנִּית, מִפְּנֵי יְהוָה צְבָאוֹת. טו וְעַתָּה, אֲנַחְנוּ מְאַשְּׁרִים זֵדִים; גַּם-נִבְנוּ עֹשֵׂי רִשְׁעָה, גַּם בָּחֲנוּ אֱלֹהִים וַיִּמָּלֵטוּ. טז אָז נִדְבְּרוּ יִרְאֵי יְהוָה, אִישׁ אֶל-רֵעֵהוּ; וַיַּקְשֵׁב יְהוָה, וַיִּשְׁמָע, וַיִּכָּתֵב סֵפֶר זִכָּרוֹן לְפָנָיו לְיִרְאֵי יְהוָה, וּלְחֹשְׁבֵי שְׁמוֹ. יז וְהָיוּ לִי, אָמַר יְהוָה צְבָאוֹת, לַיּוֹם, אֲשֶׁר אֲנִי עֹשֶׂה סְגֻלָּה; וְחָמַלְתִּי עֲלֵיהֶם--כַּאֲשֶׁר יַחְמֹל אִישׁ, עַל-בְּנוֹ הָעֹבֵד אֹתוֹ. יח וְשַׁבְתֶּם, וּרְאִיתֶם, בֵּין צַדִּיק, לְרָשָׁע--בֵּין עֹבֵד אֱלֹהִים, לַאֲשֶׁר לֹא עֲבָדוֹ. {פ}
|
|
3
|
+
יט כִּי-הִנֵּה הַיּוֹם בָּא, בֹּעֵר כַּתַּנּוּר; וְהָיוּ כָל-זֵדִים וְכָל-עֹשֵׂה רִשְׁעָה, קַשׁ, וְלִהַט אֹתָם הַיּוֹם הַבָּא אָמַר יְהוָה צְבָאוֹת, אֲשֶׁר לֹא-יַעֲזֹב לָהֶם שֹׁרֶשׁ וְעָנָף. כ וְזָרְחָה לָכֶם יִרְאֵי שְׁמִי, שֶׁמֶשׁ צְדָקָה, וּמַרְפֵּא, בִּכְנָפֶיהָ; וִיצָאתֶם וּפִשְׁתֶּם, כְּעֶגְלֵי מַרְבֵּק. כא וְעַסּוֹתֶם רְשָׁעִים--כִּי-יִהְיוּ אֵפֶר, תַּחַת כַּפּוֹת רַגְלֵיכֶם: בַּיּוֹם אֲשֶׁר אֲנִי עֹשֶׂה, אָמַר יְהוָה צְבָאוֹת. {פ}
|
|
4
|
+
כב זִכְרוּ, תּוֹרַת מֹשֶׁה עַבְדִּי, אֲשֶׁר צִוִּיתִי אוֹתוֹ בְחֹרֵב עַל-כָּל-יִשְׂרָאֵל, חֻקִּים וּמִשְׁפָּטִים. כג הִנֵּה אָנֹכִי שֹׁלֵחַ לָכֶם, אֵת אֵלִיָּה הַנָּבִיא--לִפְנֵי, בּוֹא יוֹם יְהוָה, הַגָּדוֹל, וְהַנּוֹרָא. כד וְהֵשִׁיב לֵב-אָבוֹת עַל-בָּנִים, וְלֵב בָּנִים עַל-אֲבוֹתָם--פֶּן-אָבוֹא, וְהִכֵּיתִי אֶת-הָאָרֶץ חֵרֶם.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
|
+
<title>HTML Flip Book Example</title>
|
|
8
|
+
<script type="importmap">
|
|
9
|
+
{
|
|
10
|
+
"imports": {
|
|
11
|
+
"react": "https://esm.sh/react@18.3.1",
|
|
12
|
+
"react-dom": "https://esm.sh/react-dom@18.3.1"
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
</script>
|
|
16
|
+
</head>
|
|
17
|
+
<body>
|
|
18
|
+
<div id="root"></div>
|
|
19
|
+
<script type="module" src="./src/index.tsx"></script>
|
|
20
|
+
</body>
|
|
21
|
+
</html>
|