dateblock 2.0.0__cp313-cp313-win32.whl
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.
- dateblock/__init__.py +59 -0
- dateblock/_dateblock.cp313-win32.pyd +0 -0
- dateblock-2.0.0.dist-info/DELVEWHEEL +2 -0
- dateblock-2.0.0.dist-info/METADATA +437 -0
- dateblock-2.0.0.dist-info/RECORD +11 -0
- dateblock-2.0.0.dist-info/WHEEL +5 -0
- dateblock-2.0.0.dist-info/licenses/AUTHORS +1 -0
- dateblock-2.0.0.dist-info/licenses/COPYING +338 -0
- dateblock-2.0.0.dist-info/licenses/LICENSE +338 -0
- dateblock-2.0.0.dist-info/top_level.txt +1 -0
- dateblock.libs/msvcp140-f0cda2a0cf1fe6fbbf579b9098462329.dll +0 -0
dateblock/__init__.py
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# Dateblock blocks (sleeps) until a cron-style moment in time.
|
|
2
|
+
# Copyright (C) 2013-2026 Chris Caron <lead2gold@gmail.com>
|
|
3
|
+
#
|
|
4
|
+
# This file is part of Dateblock. Dateblock is free software; you can
|
|
5
|
+
# redistribute it and/or modify it under the terms of the GNU General Public
|
|
6
|
+
# License as published by the Free Software Foundation; either version 2 of
|
|
7
|
+
# the License, or (at your option) any later version.
|
|
8
|
+
#
|
|
9
|
+
# This program is distributed in the hope that it will be useful,
|
|
10
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
11
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
12
|
+
# GNU General Public License for more details.
|
|
13
|
+
#
|
|
14
|
+
# You should have received a copy of the GNU General Public License along with
|
|
15
|
+
# this program; if not, see <https://www.gnu.org/licenses/>.
|
|
16
|
+
"""
|
|
17
|
+
Block (sleep) until a cron-style moment in time.
|
|
18
|
+
|
|
19
|
+
>>> from dateblock import dateblock
|
|
20
|
+
>>> dateblock("0 */5", block=False) # when the next 5th minute starts
|
|
21
|
+
datetime.datetime(2026, 10, 24, 13, 5)
|
|
22
|
+
>>> dateblock("0 */5") # wait for it
|
|
23
|
+
|
|
24
|
+
Run ``help(dateblock)`` for all of the options.
|
|
25
|
+
"""
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
# start delvewheel patch
|
|
29
|
+
def _delvewheel_patch_1_13_2():
|
|
30
|
+
import os
|
|
31
|
+
if os.path.isdir(libs_dir := os.path.abspath(os.path.join(os.path.dirname(__file__), os.pardir, 'dateblock.libs'))):
|
|
32
|
+
os.add_dll_directory(libs_dir)
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
_delvewheel_patch_1_13_2()
|
|
36
|
+
del _delvewheel_patch_1_13_2
|
|
37
|
+
# end delvewheel patch
|
|
38
|
+
|
|
39
|
+
# The package details.
|
|
40
|
+
__title__ = "dateblock"
|
|
41
|
+
__description__ = "Block (sleep) until a cron-style moment in time"
|
|
42
|
+
__version__ = "2.0.0"
|
|
43
|
+
__author__ = "Chris Caron"
|
|
44
|
+
__email__ = "lead2gold@gmail.com"
|
|
45
|
+
__license__ = "GPL-2.0-or-later"
|
|
46
|
+
__copyright__ = "Copyright (C) 2013-2026 Chris Caron <lead2gold@gmail.com>"
|
|
47
|
+
__status__ = "Production"
|
|
48
|
+
|
|
49
|
+
from ._dateblock import ( # noqa: E402,F401
|
|
50
|
+
dateblock,
|
|
51
|
+
SEC_MIN, SEC_MAX,
|
|
52
|
+
MIN_MIN, MIN_MAX,
|
|
53
|
+
HOUR_MIN, HOUR_MAX,
|
|
54
|
+
DOM_MIN, DOM_MAX,
|
|
55
|
+
MONTH_MIN, MONTH_MAX,
|
|
56
|
+
YEAR_MIN, YEAR_MAX,
|
|
57
|
+
DOW_MIN, DOW_MAX,
|
|
58
|
+
DRIFT_MIN, DRIFT_MAX,
|
|
59
|
+
)
|
|
Binary file
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
Version: 1.13.2
|
|
2
|
+
Arguments: ['C:\\Users\\runneradmin\\AppData\\Local\\Temp\\cibw-run-on9fnd9n\\cp313-win32\\build\\venv\\Scripts\\delvewheel', 'repair', '-w', 'C:\\Users\\runneradmin\\AppData\\Local\\Temp\\cibw-run-on9fnd9n\\cp313-win32\\repaired_wheel', '-v', 'C:\\Users\\runneradmin\\AppData\\Local\\Temp\\cibw-run-on9fnd9n\\cp313-win32\\built_wheel\\dateblock-2.0.0-cp313-cp313-win32.whl']
|
|
@@ -0,0 +1,437 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: dateblock
|
|
3
|
+
Version: 2.0.0
|
|
4
|
+
Summary: Block (sleep) until a cron-style moment in time
|
|
5
|
+
Home-page: https://github.com/caronc/dateblock
|
|
6
|
+
Author: Chris Caron
|
|
7
|
+
Author-email: lead2gold@gmail.com
|
|
8
|
+
License: GPL-2.0-or-later
|
|
9
|
+
Project-URL: Source, https://github.com/caronc/dateblock
|
|
10
|
+
Project-URL: Issues, https://github.com/caronc/dateblock/issues
|
|
11
|
+
Project-URL: Changelog, https://github.com/caronc/dateblock/blob/master/ChangeLog
|
|
12
|
+
Keywords: cron crontab sleep block schedule date time
|
|
13
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
14
|
+
Classifier: Intended Audience :: Developers
|
|
15
|
+
Classifier: Intended Audience :: System Administrators
|
|
16
|
+
Classifier: Natural Language :: English
|
|
17
|
+
Classifier: Operating System :: MacOS
|
|
18
|
+
Classifier: Operating System :: Microsoft :: Windows
|
|
19
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
20
|
+
Classifier: Programming Language :: C++
|
|
21
|
+
Classifier: Programming Language :: Python :: 3
|
|
22
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
23
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
24
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
25
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
26
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
27
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
28
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
29
|
+
Classifier: Topic :: System :: Systems Administration
|
|
30
|
+
Classifier: Topic :: Utilities
|
|
31
|
+
Requires-Python: >=3.9
|
|
32
|
+
Description-Content-Type: text/markdown
|
|
33
|
+
License-File: LICENSE
|
|
34
|
+
License-File: COPYING
|
|
35
|
+
License-File: AUTHORS
|
|
36
|
+
Dynamic: author
|
|
37
|
+
Dynamic: author-email
|
|
38
|
+
Dynamic: classifier
|
|
39
|
+
Dynamic: description
|
|
40
|
+
Dynamic: description-content-type
|
|
41
|
+
Dynamic: home-page
|
|
42
|
+
Dynamic: keywords
|
|
43
|
+
Dynamic: license
|
|
44
|
+
Dynamic: license-file
|
|
45
|
+
Dynamic: project-url
|
|
46
|
+
Dynamic: requires-python
|
|
47
|
+
Dynamic: summary
|
|
48
|
+
|
|
49
|
+
[](https://www.paypal.com/donate/?hosted_button_id=CR6YF7KLQWQ5E)
|
|
50
|
+
[](https://pypi.org/project/dateblock/)
|
|
51
|
+
[](https://pypi.org/project/dateblock/)
|
|
52
|
+
|
|
53
|
+
Dateblock
|
|
54
|
+
=========
|
|
55
|
+
Dateblock allows you to block (exactly how a Linux/Unix Cron might) _until_ a
|
|
56
|
+
specific point of time unlike 'sleep' which blocks _for_ a set period of time.
|
|
57
|
+
The difference is very subtle but can prove to be very useful.
|
|
58
|
+
|
|
59
|
+
It offers a few new features that the Internet Systems Consortium (ICS) version
|
|
60
|
+
does not (refering to /etc/crontab style). Dateblock specifically offers the ability
|
|
61
|
+
to wake/unblock on a _specific second_ and/or _drift_ for certain period afterwards
|
|
62
|
+
your calculated time is met (kind of like combining _sleep_ and _ICS Cron_ into one).
|
|
63
|
+
|
|
64
|
+
Python bindings are additionally included supporting all of the standard datetime
|
|
65
|
+
formats and objects!
|
|
66
|
+
|
|
67
|
+
## Quick Start
|
|
68
|
+
The `dateblock` command is a C++ tool; install it from the distribution
|
|
69
|
+
packages or build it from source (see [Installation](#installation)).
|
|
70
|
+
```bash
|
|
71
|
+
# When would the next 5th minute start? (--test shows without waiting)
|
|
72
|
+
dateblock -t -n /5
|
|
73
|
+
|
|
74
|
+
# Wait for 9:00 in Tokyo, whatever timezone this computer is in
|
|
75
|
+
dateblock -z Asia/Tokyo -c "0 0 9"
|
|
76
|
+
|
|
77
|
+
# Run a backup at the next quarter hour (dateblock exits with its exit code)
|
|
78
|
+
dateblock -n /15 -- ./backup.sh --full
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
The Python library is on PyPI (Linux, macOS and Windows):
|
|
82
|
+
```bash
|
|
83
|
+
pip install dateblock
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
Packages for Fedora, RHEL/CentOS/Alma/Rocky 9 and 10, Debian and Arch Linux
|
|
87
|
+
can be built from this repository; see [Installation](#installation).
|
|
88
|
+
|
|
89
|
+
__Syntax__:
|
|
90
|
+
dateblock [options] [--] [command [arguments...]]
|
|
91
|
+
|
|
92
|
+
__Allowed options__:
|
|
93
|
+
```
|
|
94
|
+
-h [ --help ] Show this help screen.
|
|
95
|
+
-t [ --test ] Test (Do not block for the specified period)
|
|
96
|
+
-v [ --verbose ] Verbose mode
|
|
97
|
+
-i [ --isc ] ISC Mode
|
|
98
|
+
-s [ --second ] arg Second (0-59)
|
|
99
|
+
-n [ --minute ] arg Minute (0-59)
|
|
100
|
+
-o [ --hour ] arg Hour (0-23)
|
|
101
|
+
-d [ --dom ] arg Day of Month (1-31)
|
|
102
|
+
-m [ --month ] arg Month (1-12) {Jan=1,...,Dec=12}
|
|
103
|
+
-w [ --dow ] arg Day of Week (0-6) {Sun=0,...,Sat=6}
|
|
104
|
+
-c [ --cron ] arg Cron string formatting
|
|
105
|
+
-x [ --drift ] arg Additional drift time (in seconds).
|
|
106
|
+
-z [ --timezone ] arg Timezone to read the schedule in (ie:
|
|
107
|
+
America/Toronto); defaults to this computer's.
|
|
108
|
+
|
|
109
|
+
Anything after the options (or after --) is a command to run once the
|
|
110
|
+
time is reached.
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
A variety of syntax is accepted by this tool such as:
|
|
114
|
+
```
|
|
115
|
+
x (Value) where 'x' is represented numerically.
|
|
116
|
+
*/x (or /x) (Modulus) where 'x' is represented numerically.
|
|
117
|
+
x-y (or y-x) (Range) where 'x' and 'y' are are represented numerically.
|
|
118
|
+
x,y (Separator) where 'x' and 'y' are are represented numerically.
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
__Note__: With the exception of the drift option (+), all variations of the syntax
|
|
122
|
+
mentioned above can be mixed if separated using the 'comma' (Separator)
|
|
123
|
+
operator. ie: */a,b,c-d,/e is valid.
|
|
124
|
+
However: x-y-z is not valid, nor is /x/y, /x-y or a '*' mixed with
|
|
125
|
+
other entries (ie: *,5). All values must be
|
|
126
|
+
within the range of it's time type. Thus 400-4000 would never work since
|
|
127
|
+
no time constraint even resides within that range.
|
|
128
|
+
|
|
129
|
+
The __--cron__(__-c__) switch allows one to specify the standard cron formatting:
|
|
130
|
+
```
|
|
131
|
+
drift time ----------------------------------------------+
|
|
132
|
+
day of week (0 - 6) (Sunday=0) -----------------------+ |
|
|
133
|
+
month (1 - 12) ------------------------------------+ | |
|
|
134
|
+
day of month (1 - 31) --------------------------+ | | |
|
|
135
|
+
hour (0 - 23) -------------------------------+ | | | |
|
|
136
|
+
min (0 - 59) -----------------------------+ | | | | |
|
|
137
|
+
sec (0 - 59) --------------------------- | | | | | |
|
|
138
|
+
| | | | | | |
|
|
139
|
+
- - - - - - -
|
|
140
|
+
* * * * * * *
|
|
141
|
+
```
|
|
142
|
+
Substitute an asterisk (*) as a placeholder for arguments you are not
|
|
143
|
+
interested in. Asterisks are automatically placed in strings missing all 6
|
|
144
|
+
arguments (separated by white space).
|
|
145
|
+
|
|
146
|
+
The __--isc__ (__-i__) switch makes the cron interpretation equivalent to
|
|
147
|
+
what it is today (ISC stands for Internet Systems Consortium). Hence:
|
|
148
|
+
```
|
|
149
|
+
ISC Format (no second or drift)
|
|
150
|
+
|
|
151
|
+
+----------------------------- min (0 - 59)
|
|
152
|
+
| +----------------------- hour (0 - 23)
|
|
153
|
+
| | +----------------- day of month (1 - 31)
|
|
154
|
+
| | | +----------- month (1 - 12)
|
|
155
|
+
| | | | +----- day of week (0 - 6) (Sunday=0)
|
|
156
|
+
| | | | |
|
|
157
|
+
- - - - -
|
|
158
|
+
* * * * *
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
The __--test__(__-t__) switch is your greatest ally. Use this to simply build
|
|
162
|
+
and test your crons to find out when they __would have__ blocked until without
|
|
163
|
+
actually blocking. If you pair the the test with the __--ics__ (__-i__), then
|
|
164
|
+
you can use this tool to help construct regular crons for _/etc/crontab_ if
|
|
165
|
+
you're new to the idea and still learning how the crontabs work.
|
|
166
|
+
|
|
167
|
+
### Timezones:
|
|
168
|
+
The schedule is read in this computer's timezone unless __--timezone__
|
|
169
|
+
(__-z__) names another one from the timezone database (such as
|
|
170
|
+
`America/Toronto` or `Asia/Tokyo`). Daylight saving follows that timezone,
|
|
171
|
+
and dateblock unblocks at that exact moment no matter where the computer
|
|
172
|
+
is. The times shown by __--test__ and __--verbose__ are in that timezone too.
|
|
173
|
+
```bash
|
|
174
|
+
# 9:00 in Tokyo
|
|
175
|
+
dateblock -t -z Asia/Tokyo -c "0 0 9"
|
|
176
|
+
Current Time : 2026-10-24 22:05:00 JST (Sat)
|
|
177
|
+
Block Until : 2026-10-25 09:00:00 JST (Sun)
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
### Running a command:
|
|
181
|
+
Put a command (and its arguments) after the options, and dateblock runs it
|
|
182
|
+
once the time is reached:
|
|
183
|
+
```bash
|
|
184
|
+
dateblock -n /15 -- ./backup.sh --full
|
|
185
|
+
dateblock -i -c "0 9 * * 1-5" notify-send "Stand-up"
|
|
186
|
+
```
|
|
187
|
+
- dateblock _becomes_ the command (the way `nice` and `timeout` do), so the
|
|
188
|
+
exit code, signals and output are all the command's own.
|
|
189
|
+
- The command starts at `--`, or at the first argument that isn't one of
|
|
190
|
+
dateblock's options; everything after that is passed to the command as
|
|
191
|
+
is (no shell is involved), so `dateblock -n 5 ls -l` runs `ls -l`.
|
|
192
|
+
- With __--test__ (__-t__) the command is only shown, not run.
|
|
193
|
+
- If the schedule is invalid the command is never run (exit code 1). A
|
|
194
|
+
command that can't be found exits with 127, and one that can't be run
|
|
195
|
+
with 126 (just like a shell).
|
|
196
|
+
|
|
197
|
+
To run it again and again, put dateblock in a loop:
|
|
198
|
+
```bash
|
|
199
|
+
while dateblock -n /15; do ./backup.sh; done
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
### Drifting:
|
|
203
|
+
Drifting is an option that allows you to adjust the calculated results by some
|
|
204
|
+
additional time. Lets say you wanted the application to wake up on the 1st
|
|
205
|
+
minute of each 10 min interval (1, 11, 21, 31, 41, 51). Specifying the cron
|
|
206
|
+
(minute) '*/1' would not work. In fact the cron of '*/1' would unblock at
|
|
207
|
+
every minute. You could however achieve the previous example using a drift
|
|
208
|
+
value of '60' (seconds) and a cron (minute) entry of '*/10'.
|
|
209
|
+
|
|
210
|
+
In a way, drifting is a little like executing a cron and then sleeping for
|
|
211
|
+
an additional period right afterwards. However this is a much more elegant
|
|
212
|
+
solution with a more precise blocking period.
|
|
213
|
+
|
|
214
|
+
Some things to consider about drifting:
|
|
215
|
+
|
|
216
|
+
- Drifting is always calculated 'after' a specified cron.
|
|
217
|
+
- You can not specify a drifting value on it's own without a cron entry to go
|
|
218
|
+
with it.
|
|
219
|
+
- A drift value is always specified in seconds.
|
|
220
|
+
- You can not drift longer then the interval calculated by the cron itself.
|
|
221
|
+
In the event this occurs, only the remainder (modulus) is kept; the rest is
|
|
222
|
+
is considered overflow and will simply be ignored. Drifting behaves this
|
|
223
|
+
way to prevent missing a segment of time that would have otherwise been
|
|
224
|
+
calculated. For example... lets say you wanted to unblock every hour, your
|
|
225
|
+
cron might look like this: ```dateblock --hour=/1```. With this cron in
|
|
226
|
+
mind, you could never add a drift of a value larger then 1 hour minus
|
|
227
|
+
1 second (3659 seconds)... Why? Because the _--hour_ entry has already
|
|
228
|
+
pre-defined the time (slice) bounds of 1, therefore a drift value of the
|
|
229
|
+
same (or more) would cause the calculation to spill into _the next_ hour. An
|
|
230
|
+
hour it was pre-calculated to wake on anyway.
|
|
231
|
+
|
|
232
|
+
Let's say you wanted to wake ever 2 hours. Well your cron would look like this
|
|
233
|
+
```dateblock --hour=/2```. If you wanted to add a drift into this picture,
|
|
234
|
+
you'd have up to 2 hours minus 1 second (7319) to work with.
|
|
235
|
+
|
|
236
|
+
However... if you specify a a cron of '*/10' (which would equate to
|
|
237
|
+
unblocking every 10 seconds), your drift window is only a maximum of 9. So
|
|
238
|
+
if you specified a drift of of 11 (seconds), the overflow would leave you
|
|
239
|
+
with an actual drift of '1' (not 11). If you specified 10, then you would
|
|
240
|
+
not drift at all (would be the same as not setting anything at all). This
|
|
241
|
+
is how the modulus works when you overflow the drift value.
|
|
242
|
+
|
|
243
|
+
- You can use the shortcut character of a _plus_ (_+_) inline on a cron to immediately
|
|
244
|
+
invoke the drift and spare you from writing the extra entries. Hence:
|
|
245
|
+
```dateblock -c '* */5 +60'``` is the same as writing ```dateblock -c '* */5 * * * * 60'```
|
|
246
|
+
Once you invoke the __+__ character however, any entries found afterwards
|
|
247
|
+
will be treated as an error.
|
|
248
|
+
|
|
249
|
+
### Examples
|
|
250
|
+
The following would block until a minute divisible by 10 was reached. Minutes
|
|
251
|
+
divisible by 10 are: 0,10,20,30,40 and 50.
|
|
252
|
+
```bash
|
|
253
|
+
dateblock -n /10
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
The following would block until a second is divisible by 5 was reached and
|
|
257
|
+
only on hours 3 and 4. This can also be written as such:
|
|
258
|
+
```bash
|
|
259
|
+
dateblock -s /5 -o 3,4
|
|
260
|
+
|
|
261
|
+
# you can rewrite the above like this too:
|
|
262
|
+
dateblock -c "/5 * 3,4 * * *"
|
|
263
|
+
```
|
|
264
|
+
|
|
265
|
+
The following would block until the 5 minute of every hour:
|
|
266
|
+
```bash
|
|
267
|
+
dateblock -c "* 5"
|
|
268
|
+
|
|
269
|
+
# you can rewrite the above like this too:
|
|
270
|
+
dateblock -n 5
|
|
271
|
+
dateblock -c "* 5 * * * *"
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
The following would block until a hour divisible by 5 was reached on the first
|
|
275
|
+
half of the month as well as the 20th of the month) Hours divisible by 5 are:
|
|
276
|
+
0, 5,10,15 and 20.
|
|
277
|
+
```bash
|
|
278
|
+
dateblock -o /5 -d 1-14,20
|
|
279
|
+
```
|
|
280
|
+
|
|
281
|
+
Drifting using the cron was added in v1.0.0 (but was always available using
|
|
282
|
+
__-x__ or __--drift__). The advantage you get from using it inline with the
|
|
283
|
+
cron string is the ability to chain them with multiple drift times using
|
|
284
|
+
a comma and or range operator. The modulus one will not work here.
|
|
285
|
+
|
|
286
|
+
The following will block until the 5:20 minute mark of each hour (20 seconds
|
|
287
|
+
past)
|
|
288
|
+
```bash
|
|
289
|
+
dateblock -c "* 5 * * * * 20"
|
|
290
|
+
|
|
291
|
+
# you can rewrite the above like this too:
|
|
292
|
+
dateblock -n 5 -x 20
|
|
293
|
+
|
|
294
|
+
# You can skip to the drift portion by just denoting a plus (+) as the last
|
|
295
|
+
# entry specified. This is interpreted as a drift time.
|
|
296
|
+
dateblock -c "* 5 +20"
|
|
297
|
+
```
|
|
298
|
+
The expression is considered invalid if more entries are found after the drift
|
|
299
|
+
period. However this is still valid:
|
|
300
|
+
```bash
|
|
301
|
+
dateblock -c "* 5 * * * * +20"
|
|
302
|
+
```
|
|
303
|
+
|
|
304
|
+
### DateBlock Python Bindings
|
|
305
|
+
The DateBlock python bindings are really easy to use too:
|
|
306
|
+
```python
|
|
307
|
+
from dateblock import dateblock
|
|
308
|
+
from datetime import datetime, date, time, timedelta
|
|
309
|
+
|
|
310
|
+
# Returns the date object it will unblock at
|
|
311
|
+
result = dateblock("* /20", block=False)
|
|
312
|
+
|
|
313
|
+
print("Blocking until %s" % result.strftime("%Y-%m-%d %H:%M:%S"))
|
|
314
|
+
dateblock("* /20")
|
|
315
|
+
print("Unblocked at %s" % datetime.now().strftime("%Y-%m-%d %H:%M:%S"))
|
|
316
|
+
|
|
317
|
+
# Perhaps you want to calculate a time relative to somewhere in the past?
|
|
318
|
+
# No problem; lets get a relative time 4 days ago (from now)
|
|
319
|
+
relative = datetime.now() - timedelta(days=4)
|
|
320
|
+
result = dateblock("* /20", ref=relative, block=False)
|
|
321
|
+
|
|
322
|
+
# To use the isc switch with the bindings, just set isc=True (by default
|
|
323
|
+
# it is off). Below would block for the start of each minute (not second
|
|
324
|
+
# had you not set the isc flag)
|
|
325
|
+
result = dateblock("/1", isc=True)
|
|
326
|
+
|
|
327
|
+
# Dateblock supports date, time and epoch time too!
|
|
328
|
+
#
|
|
329
|
+
# Date: (yyyy, mm, dd)
|
|
330
|
+
result = dateblock("/5", ref=date(2017, 4, 22))
|
|
331
|
+
|
|
332
|
+
# Time: (hh, mm, ss)
|
|
333
|
+
result = dateblock("/5", ref=time(10, 5, 0))
|
|
334
|
+
|
|
335
|
+
# Epoch: seconds
|
|
336
|
+
result = dateblock("/5", ref=13424236)
|
|
337
|
+
|
|
338
|
+
# Timezones: an aware datetime (or time) reads the cron in its own
|
|
339
|
+
# timezone, and the result comes back in that same timezone. This waits
|
|
340
|
+
# for 9:00 in Tokyo, whatever timezone this computer is in.
|
|
341
|
+
from zoneinfo import ZoneInfo
|
|
342
|
+
tokyo = ZoneInfo("Asia/Tokyo")
|
|
343
|
+
result = dateblock("0 0 9", ref=datetime.now(tokyo))
|
|
344
|
+
```
|
|
345
|
+
|
|
346
|
+
A few things worth knowing:
|
|
347
|
+
- A naive `ref` (or none, a `date`, epoch or `timedelta`) uses this
|
|
348
|
+
computer's timezone and returns a naive `datetime`.
|
|
349
|
+
- A timezone aware `ref` uses its own timezone, including its daylight
|
|
350
|
+
saving rules, and returns an aware `datetime` with the same `tzinfo`.
|
|
351
|
+
Blocking always ends at that exact moment.
|
|
352
|
+
- An invalid cron string raises `SyntaxError`; a cron that can never happen
|
|
353
|
+
(such as February 31st) raises `ValueError`.
|
|
354
|
+
- While blocking, other Python threads keep running and Ctrl-C
|
|
355
|
+
(`KeyboardInterrupt`) works as expected.
|
|
356
|
+
|
|
357
|
+
## Installation
|
|
358
|
+
### From PyPI (the Python library)
|
|
359
|
+
```bash
|
|
360
|
+
pip install dateblock
|
|
361
|
+
```
|
|
362
|
+
This gives you the Python library on Linux, macOS and Windows (the C++ code
|
|
363
|
+
is compiled straight into it, so nothing else is needed). The `dateblock`
|
|
364
|
+
command is the C++ tool; install it from the packages or build it from
|
|
365
|
+
source as shown below.
|
|
366
|
+
|
|
367
|
+
### From Source
|
|
368
|
+
Assuming you have a C++ compiler and the standard development tools that
|
|
369
|
+
usually go with it (make, autoconf, automake and libtool), then the
|
|
370
|
+
following will install everything for you.
|
|
371
|
+
|
|
372
|
+
```bash
|
|
373
|
+
./autogen.sh
|
|
374
|
+
./configure
|
|
375
|
+
make
|
|
376
|
+
make check
|
|
377
|
+
sudo make install
|
|
378
|
+
```
|
|
379
|
+
|
|
380
|
+
This installs:
|
|
381
|
+
- `libdateblock.so` (the shared library holding all of the date logic) and
|
|
382
|
+
its headers in `include/dateblock/`, with a `dateblock.pc` file for
|
|
383
|
+
`pkg-config`.
|
|
384
|
+
- The `dateblock` command line tool.
|
|
385
|
+
|
|
386
|
+
To build the Python bindings from your checkout (this compiles the C++ code
|
|
387
|
+
straight into the Python module):
|
|
388
|
+
```bash
|
|
389
|
+
pip install .
|
|
390
|
+
```
|
|
391
|
+
|
|
392
|
+
### Building with Docker
|
|
393
|
+
Don't want to install the build tools? If you have
|
|
394
|
+
[Docker](https://www.docker.com/) (or [Podman](https://podman.io/)) and
|
|
395
|
+
GNU make, you can build and test everything inside a container straight
|
|
396
|
+
from a fresh checkout; no `./configure` needed:
|
|
397
|
+
|
|
398
|
+
```bash
|
|
399
|
+
# Compile and run all of the tests
|
|
400
|
+
make docker-build
|
|
401
|
+
|
|
402
|
+
# Build packages (each one is tested while it builds)
|
|
403
|
+
make docker-rpm # Fedora 44 RPMs
|
|
404
|
+
make docker-rpm DISTRO=el9 # EL9 RPMs (or DISTRO=el10)
|
|
405
|
+
make docker-rpm-all # the RPMs for Fedora 44, EL9 and EL10
|
|
406
|
+
make docker-deb # Debian 13 .deb packages
|
|
407
|
+
make docker-arch # Arch Linux packages
|
|
408
|
+
make docker-all # every one of the above
|
|
409
|
+
|
|
410
|
+
# Build for 64-bit ARM instead (ie: Raspberry Pi); runs under emulation,
|
|
411
|
+
# so it needs qemu-user-static and is much slower (no Arch Linux image)
|
|
412
|
+
make docker-rpm ARCH=aarch64
|
|
413
|
+
|
|
414
|
+
# The Python source package and Linux wheels (needs uv or pipx)
|
|
415
|
+
make docker-pypi
|
|
416
|
+
make docker-pypi PYPI_ARCHS="x86_64 aarch64"
|
|
417
|
+
|
|
418
|
+
# Rebuild the man page after editing packaging/man/dateblock.md
|
|
419
|
+
make docker-man
|
|
420
|
+
|
|
421
|
+
# Open a shell inside the build container to poke around
|
|
422
|
+
make docker-shell
|
|
423
|
+
|
|
424
|
+
# Clean up: 'make clean' removes dist/ and the other build files in the
|
|
425
|
+
# checkout; 'make release-clean' also removes the build images
|
|
426
|
+
make clean
|
|
427
|
+
make release-clean
|
|
428
|
+
```
|
|
429
|
+
|
|
430
|
+
- Results are written to `dist/<distro>/` (`dist/<distro>-aarch64/` for
|
|
431
|
+
ARM, `dist/pypi/` for Python).
|
|
432
|
+
- Your checkout is mounted read-only, so the container never changes it.
|
|
433
|
+
- Podman is used if Docker isn't installed; set `CONTAINER=podman` to
|
|
434
|
+
prefer it.
|
|
435
|
+
|
|
436
|
+
See [packaging/README.md](https://github.com/caronc/dateblock/blob/master/packaging/README.md) for the details on each
|
|
437
|
+
package format, and [INSTALL.md](https://github.com/caronc/dateblock/blob/master/INSTALL.md) for building from source.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
dateblock/_dateblock.cp313-win32.pyd,sha256=aV8OjlVgYNECt4tYYS2Z6mVQJ-jreZNv8YKaMyI7Q1w,64000
|
|
2
|
+
dateblock/__init__.py,sha256=4nw8h79EEt1bYB4yqy5euVslyKB2i3qzu4jTdGDyP0k,2071
|
|
3
|
+
dateblock-2.0.0.dist-info/DELVEWHEEL,sha256=kgD5fmfQQUw30ONJFnhY4XDv-2ZA0Lwt5vyWD5NnMDg,392
|
|
4
|
+
dateblock-2.0.0.dist-info/METADATA,sha256=UuROyzA3GGaONha-yDTlnxq99P0-VmX5FRCV3ekuxuo,18014
|
|
5
|
+
dateblock-2.0.0.dist-info/RECORD,,
|
|
6
|
+
dateblock-2.0.0.dist-info/top_level.txt,sha256=_zUVVTVAYzxEm4QpeIX8NdL3SgktJbHRn0RXjPlLsBE,10
|
|
7
|
+
dateblock-2.0.0.dist-info/WHEEL,sha256=eJb42ITMEGM4axxIKTpeuI6Jl_xkNtm_qktnT_xlvoA,97
|
|
8
|
+
dateblock-2.0.0.dist-info/licenses/AUTHORS,sha256=U2dla3sVFLFcsCpokLb2htOl6Q37BRFEhXfThpMCpbg,35
|
|
9
|
+
dateblock-2.0.0.dist-info/licenses/COPYING,sha256=SY0ykH8TLCzX064mnzBK7YcVYpP2PnJLg9n2LteH1Vo,18322
|
|
10
|
+
dateblock-2.0.0.dist-info/licenses/LICENSE,sha256=SY0ykH8TLCzX064mnzBK7YcVYpP2PnJLg9n2LteH1Vo,18322
|
|
11
|
+
dateblock.libs/msvcp140-f0cda2a0cf1fe6fbbf579b9098462329.dll,sha256=8M2ioM8f5vu_V5uQmEYjKdOqp1E6IHry4PM7AUVuOIo,618944
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Chris Caron <lead2gold@gmail.com>
|
|
@@ -0,0 +1,338 @@
|
|
|
1
|
+
GNU GENERAL PUBLIC LICENSE
|
|
2
|
+
Version 2, June 1991
|
|
3
|
+
|
|
4
|
+
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
|
|
5
|
+
<https://fsf.org/>
|
|
6
|
+
Everyone is permitted to copy and distribute verbatim copies
|
|
7
|
+
of this license document, but changing it is not allowed.
|
|
8
|
+
|
|
9
|
+
Preamble
|
|
10
|
+
|
|
11
|
+
The licenses for most software are designed to take away your
|
|
12
|
+
freedom to share and change it. By contrast, the GNU General Public
|
|
13
|
+
License is intended to guarantee your freedom to share and change free
|
|
14
|
+
software--to make sure the software is free for all its users. This
|
|
15
|
+
General Public License applies to most of the Free Software
|
|
16
|
+
Foundation's software and to any other program whose authors commit to
|
|
17
|
+
using it. (Some other Free Software Foundation software is covered by
|
|
18
|
+
the GNU Lesser General Public License instead.) You can apply it to
|
|
19
|
+
your programs, too.
|
|
20
|
+
|
|
21
|
+
When we speak of free software, we are referring to freedom, not
|
|
22
|
+
price. Our General Public Licenses are designed to make sure that you
|
|
23
|
+
have the freedom to distribute copies of free software (and charge for
|
|
24
|
+
this service if you wish), that you receive source code or can get it
|
|
25
|
+
if you want it, that you can change the software or use pieces of it
|
|
26
|
+
in new free programs; and that you know you can do these things.
|
|
27
|
+
|
|
28
|
+
To protect your rights, we need to make restrictions that forbid
|
|
29
|
+
anyone to deny you these rights or to ask you to surrender the rights.
|
|
30
|
+
These restrictions translate to certain responsibilities for you if you
|
|
31
|
+
distribute copies of the software, or if you modify it.
|
|
32
|
+
|
|
33
|
+
For example, if you distribute copies of such a program, whether
|
|
34
|
+
gratis or for a fee, you must give the recipients all the rights that
|
|
35
|
+
you have. You must make sure that they, too, receive or can get the
|
|
36
|
+
source code. And you must show them these terms so they know their
|
|
37
|
+
rights.
|
|
38
|
+
|
|
39
|
+
We protect your rights with two steps: (1) copyright the software, and
|
|
40
|
+
(2) offer you this license which gives you legal permission to copy,
|
|
41
|
+
distribute and/or modify the software.
|
|
42
|
+
|
|
43
|
+
Also, for each author's protection and ours, we want to make certain
|
|
44
|
+
that everyone understands that there is no warranty for this free
|
|
45
|
+
software. If the software is modified by someone else and passed on, we
|
|
46
|
+
want its recipients to know that what they have is not the original, so
|
|
47
|
+
that any problems introduced by others will not reflect on the original
|
|
48
|
+
authors' reputations.
|
|
49
|
+
|
|
50
|
+
Finally, any free program is threatened constantly by software
|
|
51
|
+
patents. We wish to avoid the danger that redistributors of a free
|
|
52
|
+
program will individually obtain patent licenses, in effect making the
|
|
53
|
+
program proprietary. To prevent this, we have made it clear that any
|
|
54
|
+
patent must be licensed for everyone's free use or not licensed at all.
|
|
55
|
+
|
|
56
|
+
The precise terms and conditions for copying, distribution and
|
|
57
|
+
modification follow.
|
|
58
|
+
|
|
59
|
+
GNU GENERAL PUBLIC LICENSE
|
|
60
|
+
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
|
61
|
+
|
|
62
|
+
0. This License applies to any program or other work which contains
|
|
63
|
+
a notice placed by the copyright holder saying it may be distributed
|
|
64
|
+
under the terms of this General Public License. The "Program", below,
|
|
65
|
+
refers to any such program or work, and a "work based on the Program"
|
|
66
|
+
means either the Program or any derivative work under copyright law:
|
|
67
|
+
that is to say, a work containing the Program or a portion of it,
|
|
68
|
+
either verbatim or with modifications and/or translated into another
|
|
69
|
+
language. (Hereinafter, translation is included without limitation in
|
|
70
|
+
the term "modification".) Each licensee is addressed as "you".
|
|
71
|
+
|
|
72
|
+
Activities other than copying, distribution and modification are not
|
|
73
|
+
covered by this License; they are outside its scope. The act of
|
|
74
|
+
running the Program is not restricted, and the output from the Program
|
|
75
|
+
is covered only if its contents constitute a work based on the
|
|
76
|
+
Program (independent of having been made by running the Program).
|
|
77
|
+
Whether that is true depends on what the Program does.
|
|
78
|
+
|
|
79
|
+
1. You may copy and distribute verbatim copies of the Program's
|
|
80
|
+
source code as you receive it, in any medium, provided that you
|
|
81
|
+
conspicuously and appropriately publish on each copy an appropriate
|
|
82
|
+
copyright notice and disclaimer of warranty; keep intact all the
|
|
83
|
+
notices that refer to this License and to the absence of any warranty;
|
|
84
|
+
and give any other recipients of the Program a copy of this License
|
|
85
|
+
along with the Program.
|
|
86
|
+
|
|
87
|
+
You may charge a fee for the physical act of transferring a copy, and
|
|
88
|
+
you may at your option offer warranty protection in exchange for a fee.
|
|
89
|
+
|
|
90
|
+
2. You may modify your copy or copies of the Program or any portion
|
|
91
|
+
of it, thus forming a work based on the Program, and copy and
|
|
92
|
+
distribute such modifications or work under the terms of Section 1
|
|
93
|
+
above, provided that you also meet all of these conditions:
|
|
94
|
+
|
|
95
|
+
a) You must cause the modified files to carry prominent notices
|
|
96
|
+
stating that you changed the files and the date of any change.
|
|
97
|
+
|
|
98
|
+
b) You must cause any work that you distribute or publish, that in
|
|
99
|
+
whole or in part contains or is derived from the Program or any
|
|
100
|
+
part thereof, to be licensed as a whole at no charge to all third
|
|
101
|
+
parties under the terms of this License.
|
|
102
|
+
|
|
103
|
+
c) If the modified program normally reads commands interactively
|
|
104
|
+
when run, you must cause it, when started running for such
|
|
105
|
+
interactive use in the most ordinary way, to print or display an
|
|
106
|
+
announcement including an appropriate copyright notice and a
|
|
107
|
+
notice that there is no warranty (or else, saying that you provide
|
|
108
|
+
a warranty) and that users may redistribute the program under
|
|
109
|
+
these conditions, and telling the user how to view a copy of this
|
|
110
|
+
License. (Exception: if the Program itself is interactive but
|
|
111
|
+
does not normally print such an announcement, your work based on
|
|
112
|
+
the Program is not required to print an announcement.)
|
|
113
|
+
|
|
114
|
+
These requirements apply to the modified work as a whole. If
|
|
115
|
+
identifiable sections of that work are not derived from the Program,
|
|
116
|
+
and can be reasonably considered independent and separate works in
|
|
117
|
+
themselves, then this License, and its terms, do not apply to those
|
|
118
|
+
sections when you distribute them as separate works. But when you
|
|
119
|
+
distribute the same sections as part of a whole which is a work based
|
|
120
|
+
on the Program, the distribution of the whole must be on the terms of
|
|
121
|
+
this License, whose permissions for other licensees extend to the
|
|
122
|
+
entire whole, and thus to each and every part regardless of who wrote it.
|
|
123
|
+
|
|
124
|
+
Thus, it is not the intent of this section to claim rights or contest
|
|
125
|
+
your rights to work written entirely by you; rather, the intent is to
|
|
126
|
+
exercise the right to control the distribution of derivative or
|
|
127
|
+
collective works based on the Program.
|
|
128
|
+
|
|
129
|
+
In addition, mere aggregation of another work not based on the Program
|
|
130
|
+
with the Program (or with a work based on the Program) on a volume of
|
|
131
|
+
a storage or distribution medium does not bring the other work under
|
|
132
|
+
the scope of this License.
|
|
133
|
+
|
|
134
|
+
3. You may copy and distribute the Program (or a work based on it,
|
|
135
|
+
under Section 2) in object code or executable form under the terms of
|
|
136
|
+
Sections 1 and 2 above provided that you also do one of the following:
|
|
137
|
+
|
|
138
|
+
a) Accompany it with the complete corresponding machine-readable
|
|
139
|
+
source code, which must be distributed under the terms of Sections
|
|
140
|
+
1 and 2 above on a medium customarily used for software interchange; or,
|
|
141
|
+
|
|
142
|
+
b) Accompany it with a written offer, valid for at least three
|
|
143
|
+
years, to give any third party, for a charge no more than your
|
|
144
|
+
cost of physically performing source distribution, a complete
|
|
145
|
+
machine-readable copy of the corresponding source code, to be
|
|
146
|
+
distributed under the terms of Sections 1 and 2 above on a medium
|
|
147
|
+
customarily used for software interchange; or,
|
|
148
|
+
|
|
149
|
+
c) Accompany it with the information you received as to the offer
|
|
150
|
+
to distribute corresponding source code. (This alternative is
|
|
151
|
+
allowed only for noncommercial distribution and only if you
|
|
152
|
+
received the program in object code or executable form with such
|
|
153
|
+
an offer, in accord with Subsection b above.)
|
|
154
|
+
|
|
155
|
+
The source code for a work means the preferred form of the work for
|
|
156
|
+
making modifications to it. For an executable work, complete source
|
|
157
|
+
code means all the source code for all modules it contains, plus any
|
|
158
|
+
associated interface definition files, plus the scripts used to
|
|
159
|
+
control compilation and installation of the executable. However, as a
|
|
160
|
+
special exception, the source code distributed need not include
|
|
161
|
+
anything that is normally distributed (in either source or binary
|
|
162
|
+
form) with the major components (compiler, kernel, and so on) of the
|
|
163
|
+
operating system on which the executable runs, unless that component
|
|
164
|
+
itself accompanies the executable.
|
|
165
|
+
|
|
166
|
+
If distribution of executable or object code is made by offering
|
|
167
|
+
access to copy from a designated place, then offering equivalent
|
|
168
|
+
access to copy the source code from the same place counts as
|
|
169
|
+
distribution of the source code, even though third parties are not
|
|
170
|
+
compelled to copy the source along with the object code.
|
|
171
|
+
|
|
172
|
+
4. You may not copy, modify, sublicense, or distribute the Program
|
|
173
|
+
except as expressly provided under this License. Any attempt
|
|
174
|
+
otherwise to copy, modify, sublicense or distribute the Program is
|
|
175
|
+
void, and will automatically terminate your rights under this License.
|
|
176
|
+
However, parties who have received copies, or rights, from you under
|
|
177
|
+
this License will not have their licenses terminated so long as such
|
|
178
|
+
parties remain in full compliance.
|
|
179
|
+
|
|
180
|
+
5. You are not required to accept this License, since you have not
|
|
181
|
+
signed it. However, nothing else grants you permission to modify or
|
|
182
|
+
distribute the Program or its derivative works. These actions are
|
|
183
|
+
prohibited by law if you do not accept this License. Therefore, by
|
|
184
|
+
modifying or distributing the Program (or any work based on the
|
|
185
|
+
Program), you indicate your acceptance of this License to do so, and
|
|
186
|
+
all its terms and conditions for copying, distributing or modifying
|
|
187
|
+
the Program or works based on it.
|
|
188
|
+
|
|
189
|
+
6. Each time you redistribute the Program (or any work based on the
|
|
190
|
+
Program), the recipient automatically receives a license from the
|
|
191
|
+
original licensor to copy, distribute or modify the Program subject to
|
|
192
|
+
these terms and conditions. You may not impose any further
|
|
193
|
+
restrictions on the recipients' exercise of the rights granted herein.
|
|
194
|
+
You are not responsible for enforcing compliance by third parties to
|
|
195
|
+
this License.
|
|
196
|
+
|
|
197
|
+
7. If, as a consequence of a court judgment or allegation of patent
|
|
198
|
+
infringement or for any other reason (not limited to patent issues),
|
|
199
|
+
conditions are imposed on you (whether by court order, agreement or
|
|
200
|
+
otherwise) that contradict the conditions of this License, they do not
|
|
201
|
+
excuse you from the conditions of this License. If you cannot
|
|
202
|
+
distribute so as to satisfy simultaneously your obligations under this
|
|
203
|
+
License and any other pertinent obligations, then as a consequence you
|
|
204
|
+
may not distribute the Program at all. For example, if a patent
|
|
205
|
+
license would not permit royalty-free redistribution of the Program by
|
|
206
|
+
all those who receive copies directly or indirectly through you, then
|
|
207
|
+
the only way you could satisfy both it and this License would be to
|
|
208
|
+
refrain entirely from distribution of the Program.
|
|
209
|
+
|
|
210
|
+
If any portion of this section is held invalid or unenforceable under
|
|
211
|
+
any particular circumstance, the balance of the section is intended to
|
|
212
|
+
apply and the section as a whole is intended to apply in other
|
|
213
|
+
circumstances.
|
|
214
|
+
|
|
215
|
+
It is not the purpose of this section to induce you to infringe any
|
|
216
|
+
patents or other property right claims or to contest validity of any
|
|
217
|
+
such claims; this section has the sole purpose of protecting the
|
|
218
|
+
integrity of the free software distribution system, which is
|
|
219
|
+
implemented by public license practices. Many people have made
|
|
220
|
+
generous contributions to the wide range of software distributed
|
|
221
|
+
through that system in reliance on consistent application of that
|
|
222
|
+
system; it is up to the author/donor to decide if he or she is willing
|
|
223
|
+
to distribute software through any other system and a licensee cannot
|
|
224
|
+
impose that choice.
|
|
225
|
+
|
|
226
|
+
This section is intended to make thoroughly clear what is believed to
|
|
227
|
+
be a consequence of the rest of this License.
|
|
228
|
+
|
|
229
|
+
8. If the distribution and/or use of the Program is restricted in
|
|
230
|
+
certain countries either by patents or by copyrighted interfaces, the
|
|
231
|
+
original copyright holder who places the Program under this License
|
|
232
|
+
may add an explicit geographical distribution limitation excluding
|
|
233
|
+
those countries, so that distribution is permitted only in or among
|
|
234
|
+
countries not thus excluded. In such case, this License incorporates
|
|
235
|
+
the limitation as if written in the body of this License.
|
|
236
|
+
|
|
237
|
+
9. The Free Software Foundation may publish revised and/or new versions
|
|
238
|
+
of the General Public License from time to time. Such new versions will
|
|
239
|
+
be similar in spirit to the present version, but may differ in detail to
|
|
240
|
+
address new problems or concerns.
|
|
241
|
+
|
|
242
|
+
Each version is given a distinguishing version number. If the Program
|
|
243
|
+
specifies a version number of this License which applies to it and "any
|
|
244
|
+
later version", you have the option of following the terms and conditions
|
|
245
|
+
either of that version or of any later version published by the Free
|
|
246
|
+
Software Foundation. If the Program does not specify a version number of
|
|
247
|
+
this License, you may choose any version ever published by the Free Software
|
|
248
|
+
Foundation.
|
|
249
|
+
|
|
250
|
+
10. If you wish to incorporate parts of the Program into other free
|
|
251
|
+
programs whose distribution conditions are different, write to the author
|
|
252
|
+
to ask for permission. For software which is copyrighted by the Free
|
|
253
|
+
Software Foundation, write to the Free Software Foundation; we sometimes
|
|
254
|
+
make exceptions for this. Our decision will be guided by the two goals
|
|
255
|
+
of preserving the free status of all derivatives of our free software and
|
|
256
|
+
of promoting the sharing and reuse of software generally.
|
|
257
|
+
|
|
258
|
+
NO WARRANTY
|
|
259
|
+
|
|
260
|
+
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
|
261
|
+
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
|
262
|
+
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
|
263
|
+
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
|
264
|
+
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
|
265
|
+
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
|
266
|
+
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
|
267
|
+
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
|
268
|
+
REPAIR OR CORRECTION.
|
|
269
|
+
|
|
270
|
+
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
|
271
|
+
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
|
272
|
+
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
|
273
|
+
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
|
274
|
+
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
|
275
|
+
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
|
276
|
+
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
|
277
|
+
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
|
278
|
+
POSSIBILITY OF SUCH DAMAGES.
|
|
279
|
+
|
|
280
|
+
END OF TERMS AND CONDITIONS
|
|
281
|
+
|
|
282
|
+
How to Apply These Terms to Your New Programs
|
|
283
|
+
|
|
284
|
+
If you develop a new program, and you want it to be of the greatest
|
|
285
|
+
possible use to the public, the best way to achieve this is to make it
|
|
286
|
+
free software which everyone can redistribute and change under these terms.
|
|
287
|
+
|
|
288
|
+
To do so, attach the following notices to the program. It is safest
|
|
289
|
+
to attach them to the start of each source file to most effectively
|
|
290
|
+
convey the exclusion of warranty; and each file should have at least
|
|
291
|
+
the "copyright" line and a pointer to where the full notice is found.
|
|
292
|
+
|
|
293
|
+
<one line to give the program's name and a brief idea of what it does.>
|
|
294
|
+
Copyright (C) <year> <name of author>
|
|
295
|
+
|
|
296
|
+
This program is free software; you can redistribute it and/or modify
|
|
297
|
+
it under the terms of the GNU General Public License as published by
|
|
298
|
+
the Free Software Foundation; either version 2 of the License, or
|
|
299
|
+
(at your option) any later version.
|
|
300
|
+
|
|
301
|
+
This program is distributed in the hope that it will be useful,
|
|
302
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
303
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
304
|
+
GNU General Public License for more details.
|
|
305
|
+
|
|
306
|
+
You should have received a copy of the GNU General Public License along
|
|
307
|
+
with this program; if not, see <https://www.gnu.org/licenses/>.
|
|
308
|
+
|
|
309
|
+
Also add information on how to contact you by electronic and paper mail.
|
|
310
|
+
|
|
311
|
+
If the program is interactive, make it output a short notice like this
|
|
312
|
+
when it starts in an interactive mode:
|
|
313
|
+
|
|
314
|
+
Gnomovision version 69, Copyright (C) year name of author
|
|
315
|
+
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
|
316
|
+
This is free software, and you are welcome to redistribute it
|
|
317
|
+
under certain conditions; type `show c' for details.
|
|
318
|
+
|
|
319
|
+
The hypothetical commands `show w' and `show c' should show the appropriate
|
|
320
|
+
parts of the General Public License. Of course, the commands you use may
|
|
321
|
+
be called something other than `show w' and `show c'; they could even be
|
|
322
|
+
mouse-clicks or menu items--whatever suits your program.
|
|
323
|
+
|
|
324
|
+
You should also get your employer (if you work as a programmer) or your
|
|
325
|
+
school, if any, to sign a "copyright disclaimer" for the program, if
|
|
326
|
+
necessary. Here is a sample; alter the names:
|
|
327
|
+
|
|
328
|
+
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
|
329
|
+
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
|
330
|
+
|
|
331
|
+
<signature of Moe Ghoul>, 1 April 1989
|
|
332
|
+
Moe Ghoul, President of Vice
|
|
333
|
+
|
|
334
|
+
This General Public License does not permit incorporating your program into
|
|
335
|
+
proprietary programs. If your program is a subroutine library, you may
|
|
336
|
+
consider it more useful to permit linking proprietary applications with the
|
|
337
|
+
library. If this is what you want to do, use the GNU Lesser General
|
|
338
|
+
Public License instead of this License.
|
|
@@ -0,0 +1,338 @@
|
|
|
1
|
+
GNU GENERAL PUBLIC LICENSE
|
|
2
|
+
Version 2, June 1991
|
|
3
|
+
|
|
4
|
+
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
|
|
5
|
+
<https://fsf.org/>
|
|
6
|
+
Everyone is permitted to copy and distribute verbatim copies
|
|
7
|
+
of this license document, but changing it is not allowed.
|
|
8
|
+
|
|
9
|
+
Preamble
|
|
10
|
+
|
|
11
|
+
The licenses for most software are designed to take away your
|
|
12
|
+
freedom to share and change it. By contrast, the GNU General Public
|
|
13
|
+
License is intended to guarantee your freedom to share and change free
|
|
14
|
+
software--to make sure the software is free for all its users. This
|
|
15
|
+
General Public License applies to most of the Free Software
|
|
16
|
+
Foundation's software and to any other program whose authors commit to
|
|
17
|
+
using it. (Some other Free Software Foundation software is covered by
|
|
18
|
+
the GNU Lesser General Public License instead.) You can apply it to
|
|
19
|
+
your programs, too.
|
|
20
|
+
|
|
21
|
+
When we speak of free software, we are referring to freedom, not
|
|
22
|
+
price. Our General Public Licenses are designed to make sure that you
|
|
23
|
+
have the freedom to distribute copies of free software (and charge for
|
|
24
|
+
this service if you wish), that you receive source code or can get it
|
|
25
|
+
if you want it, that you can change the software or use pieces of it
|
|
26
|
+
in new free programs; and that you know you can do these things.
|
|
27
|
+
|
|
28
|
+
To protect your rights, we need to make restrictions that forbid
|
|
29
|
+
anyone to deny you these rights or to ask you to surrender the rights.
|
|
30
|
+
These restrictions translate to certain responsibilities for you if you
|
|
31
|
+
distribute copies of the software, or if you modify it.
|
|
32
|
+
|
|
33
|
+
For example, if you distribute copies of such a program, whether
|
|
34
|
+
gratis or for a fee, you must give the recipients all the rights that
|
|
35
|
+
you have. You must make sure that they, too, receive or can get the
|
|
36
|
+
source code. And you must show them these terms so they know their
|
|
37
|
+
rights.
|
|
38
|
+
|
|
39
|
+
We protect your rights with two steps: (1) copyright the software, and
|
|
40
|
+
(2) offer you this license which gives you legal permission to copy,
|
|
41
|
+
distribute and/or modify the software.
|
|
42
|
+
|
|
43
|
+
Also, for each author's protection and ours, we want to make certain
|
|
44
|
+
that everyone understands that there is no warranty for this free
|
|
45
|
+
software. If the software is modified by someone else and passed on, we
|
|
46
|
+
want its recipients to know that what they have is not the original, so
|
|
47
|
+
that any problems introduced by others will not reflect on the original
|
|
48
|
+
authors' reputations.
|
|
49
|
+
|
|
50
|
+
Finally, any free program is threatened constantly by software
|
|
51
|
+
patents. We wish to avoid the danger that redistributors of a free
|
|
52
|
+
program will individually obtain patent licenses, in effect making the
|
|
53
|
+
program proprietary. To prevent this, we have made it clear that any
|
|
54
|
+
patent must be licensed for everyone's free use or not licensed at all.
|
|
55
|
+
|
|
56
|
+
The precise terms and conditions for copying, distribution and
|
|
57
|
+
modification follow.
|
|
58
|
+
|
|
59
|
+
GNU GENERAL PUBLIC LICENSE
|
|
60
|
+
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
|
61
|
+
|
|
62
|
+
0. This License applies to any program or other work which contains
|
|
63
|
+
a notice placed by the copyright holder saying it may be distributed
|
|
64
|
+
under the terms of this General Public License. The "Program", below,
|
|
65
|
+
refers to any such program or work, and a "work based on the Program"
|
|
66
|
+
means either the Program or any derivative work under copyright law:
|
|
67
|
+
that is to say, a work containing the Program or a portion of it,
|
|
68
|
+
either verbatim or with modifications and/or translated into another
|
|
69
|
+
language. (Hereinafter, translation is included without limitation in
|
|
70
|
+
the term "modification".) Each licensee is addressed as "you".
|
|
71
|
+
|
|
72
|
+
Activities other than copying, distribution and modification are not
|
|
73
|
+
covered by this License; they are outside its scope. The act of
|
|
74
|
+
running the Program is not restricted, and the output from the Program
|
|
75
|
+
is covered only if its contents constitute a work based on the
|
|
76
|
+
Program (independent of having been made by running the Program).
|
|
77
|
+
Whether that is true depends on what the Program does.
|
|
78
|
+
|
|
79
|
+
1. You may copy and distribute verbatim copies of the Program's
|
|
80
|
+
source code as you receive it, in any medium, provided that you
|
|
81
|
+
conspicuously and appropriately publish on each copy an appropriate
|
|
82
|
+
copyright notice and disclaimer of warranty; keep intact all the
|
|
83
|
+
notices that refer to this License and to the absence of any warranty;
|
|
84
|
+
and give any other recipients of the Program a copy of this License
|
|
85
|
+
along with the Program.
|
|
86
|
+
|
|
87
|
+
You may charge a fee for the physical act of transferring a copy, and
|
|
88
|
+
you may at your option offer warranty protection in exchange for a fee.
|
|
89
|
+
|
|
90
|
+
2. You may modify your copy or copies of the Program or any portion
|
|
91
|
+
of it, thus forming a work based on the Program, and copy and
|
|
92
|
+
distribute such modifications or work under the terms of Section 1
|
|
93
|
+
above, provided that you also meet all of these conditions:
|
|
94
|
+
|
|
95
|
+
a) You must cause the modified files to carry prominent notices
|
|
96
|
+
stating that you changed the files and the date of any change.
|
|
97
|
+
|
|
98
|
+
b) You must cause any work that you distribute or publish, that in
|
|
99
|
+
whole or in part contains or is derived from the Program or any
|
|
100
|
+
part thereof, to be licensed as a whole at no charge to all third
|
|
101
|
+
parties under the terms of this License.
|
|
102
|
+
|
|
103
|
+
c) If the modified program normally reads commands interactively
|
|
104
|
+
when run, you must cause it, when started running for such
|
|
105
|
+
interactive use in the most ordinary way, to print or display an
|
|
106
|
+
announcement including an appropriate copyright notice and a
|
|
107
|
+
notice that there is no warranty (or else, saying that you provide
|
|
108
|
+
a warranty) and that users may redistribute the program under
|
|
109
|
+
these conditions, and telling the user how to view a copy of this
|
|
110
|
+
License. (Exception: if the Program itself is interactive but
|
|
111
|
+
does not normally print such an announcement, your work based on
|
|
112
|
+
the Program is not required to print an announcement.)
|
|
113
|
+
|
|
114
|
+
These requirements apply to the modified work as a whole. If
|
|
115
|
+
identifiable sections of that work are not derived from the Program,
|
|
116
|
+
and can be reasonably considered independent and separate works in
|
|
117
|
+
themselves, then this License, and its terms, do not apply to those
|
|
118
|
+
sections when you distribute them as separate works. But when you
|
|
119
|
+
distribute the same sections as part of a whole which is a work based
|
|
120
|
+
on the Program, the distribution of the whole must be on the terms of
|
|
121
|
+
this License, whose permissions for other licensees extend to the
|
|
122
|
+
entire whole, and thus to each and every part regardless of who wrote it.
|
|
123
|
+
|
|
124
|
+
Thus, it is not the intent of this section to claim rights or contest
|
|
125
|
+
your rights to work written entirely by you; rather, the intent is to
|
|
126
|
+
exercise the right to control the distribution of derivative or
|
|
127
|
+
collective works based on the Program.
|
|
128
|
+
|
|
129
|
+
In addition, mere aggregation of another work not based on the Program
|
|
130
|
+
with the Program (or with a work based on the Program) on a volume of
|
|
131
|
+
a storage or distribution medium does not bring the other work under
|
|
132
|
+
the scope of this License.
|
|
133
|
+
|
|
134
|
+
3. You may copy and distribute the Program (or a work based on it,
|
|
135
|
+
under Section 2) in object code or executable form under the terms of
|
|
136
|
+
Sections 1 and 2 above provided that you also do one of the following:
|
|
137
|
+
|
|
138
|
+
a) Accompany it with the complete corresponding machine-readable
|
|
139
|
+
source code, which must be distributed under the terms of Sections
|
|
140
|
+
1 and 2 above on a medium customarily used for software interchange; or,
|
|
141
|
+
|
|
142
|
+
b) Accompany it with a written offer, valid for at least three
|
|
143
|
+
years, to give any third party, for a charge no more than your
|
|
144
|
+
cost of physically performing source distribution, a complete
|
|
145
|
+
machine-readable copy of the corresponding source code, to be
|
|
146
|
+
distributed under the terms of Sections 1 and 2 above on a medium
|
|
147
|
+
customarily used for software interchange; or,
|
|
148
|
+
|
|
149
|
+
c) Accompany it with the information you received as to the offer
|
|
150
|
+
to distribute corresponding source code. (This alternative is
|
|
151
|
+
allowed only for noncommercial distribution and only if you
|
|
152
|
+
received the program in object code or executable form with such
|
|
153
|
+
an offer, in accord with Subsection b above.)
|
|
154
|
+
|
|
155
|
+
The source code for a work means the preferred form of the work for
|
|
156
|
+
making modifications to it. For an executable work, complete source
|
|
157
|
+
code means all the source code for all modules it contains, plus any
|
|
158
|
+
associated interface definition files, plus the scripts used to
|
|
159
|
+
control compilation and installation of the executable. However, as a
|
|
160
|
+
special exception, the source code distributed need not include
|
|
161
|
+
anything that is normally distributed (in either source or binary
|
|
162
|
+
form) with the major components (compiler, kernel, and so on) of the
|
|
163
|
+
operating system on which the executable runs, unless that component
|
|
164
|
+
itself accompanies the executable.
|
|
165
|
+
|
|
166
|
+
If distribution of executable or object code is made by offering
|
|
167
|
+
access to copy from a designated place, then offering equivalent
|
|
168
|
+
access to copy the source code from the same place counts as
|
|
169
|
+
distribution of the source code, even though third parties are not
|
|
170
|
+
compelled to copy the source along with the object code.
|
|
171
|
+
|
|
172
|
+
4. You may not copy, modify, sublicense, or distribute the Program
|
|
173
|
+
except as expressly provided under this License. Any attempt
|
|
174
|
+
otherwise to copy, modify, sublicense or distribute the Program is
|
|
175
|
+
void, and will automatically terminate your rights under this License.
|
|
176
|
+
However, parties who have received copies, or rights, from you under
|
|
177
|
+
this License will not have their licenses terminated so long as such
|
|
178
|
+
parties remain in full compliance.
|
|
179
|
+
|
|
180
|
+
5. You are not required to accept this License, since you have not
|
|
181
|
+
signed it. However, nothing else grants you permission to modify or
|
|
182
|
+
distribute the Program or its derivative works. These actions are
|
|
183
|
+
prohibited by law if you do not accept this License. Therefore, by
|
|
184
|
+
modifying or distributing the Program (or any work based on the
|
|
185
|
+
Program), you indicate your acceptance of this License to do so, and
|
|
186
|
+
all its terms and conditions for copying, distributing or modifying
|
|
187
|
+
the Program or works based on it.
|
|
188
|
+
|
|
189
|
+
6. Each time you redistribute the Program (or any work based on the
|
|
190
|
+
Program), the recipient automatically receives a license from the
|
|
191
|
+
original licensor to copy, distribute or modify the Program subject to
|
|
192
|
+
these terms and conditions. You may not impose any further
|
|
193
|
+
restrictions on the recipients' exercise of the rights granted herein.
|
|
194
|
+
You are not responsible for enforcing compliance by third parties to
|
|
195
|
+
this License.
|
|
196
|
+
|
|
197
|
+
7. If, as a consequence of a court judgment or allegation of patent
|
|
198
|
+
infringement or for any other reason (not limited to patent issues),
|
|
199
|
+
conditions are imposed on you (whether by court order, agreement or
|
|
200
|
+
otherwise) that contradict the conditions of this License, they do not
|
|
201
|
+
excuse you from the conditions of this License. If you cannot
|
|
202
|
+
distribute so as to satisfy simultaneously your obligations under this
|
|
203
|
+
License and any other pertinent obligations, then as a consequence you
|
|
204
|
+
may not distribute the Program at all. For example, if a patent
|
|
205
|
+
license would not permit royalty-free redistribution of the Program by
|
|
206
|
+
all those who receive copies directly or indirectly through you, then
|
|
207
|
+
the only way you could satisfy both it and this License would be to
|
|
208
|
+
refrain entirely from distribution of the Program.
|
|
209
|
+
|
|
210
|
+
If any portion of this section is held invalid or unenforceable under
|
|
211
|
+
any particular circumstance, the balance of the section is intended to
|
|
212
|
+
apply and the section as a whole is intended to apply in other
|
|
213
|
+
circumstances.
|
|
214
|
+
|
|
215
|
+
It is not the purpose of this section to induce you to infringe any
|
|
216
|
+
patents or other property right claims or to contest validity of any
|
|
217
|
+
such claims; this section has the sole purpose of protecting the
|
|
218
|
+
integrity of the free software distribution system, which is
|
|
219
|
+
implemented by public license practices. Many people have made
|
|
220
|
+
generous contributions to the wide range of software distributed
|
|
221
|
+
through that system in reliance on consistent application of that
|
|
222
|
+
system; it is up to the author/donor to decide if he or she is willing
|
|
223
|
+
to distribute software through any other system and a licensee cannot
|
|
224
|
+
impose that choice.
|
|
225
|
+
|
|
226
|
+
This section is intended to make thoroughly clear what is believed to
|
|
227
|
+
be a consequence of the rest of this License.
|
|
228
|
+
|
|
229
|
+
8. If the distribution and/or use of the Program is restricted in
|
|
230
|
+
certain countries either by patents or by copyrighted interfaces, the
|
|
231
|
+
original copyright holder who places the Program under this License
|
|
232
|
+
may add an explicit geographical distribution limitation excluding
|
|
233
|
+
those countries, so that distribution is permitted only in or among
|
|
234
|
+
countries not thus excluded. In such case, this License incorporates
|
|
235
|
+
the limitation as if written in the body of this License.
|
|
236
|
+
|
|
237
|
+
9. The Free Software Foundation may publish revised and/or new versions
|
|
238
|
+
of the General Public License from time to time. Such new versions will
|
|
239
|
+
be similar in spirit to the present version, but may differ in detail to
|
|
240
|
+
address new problems or concerns.
|
|
241
|
+
|
|
242
|
+
Each version is given a distinguishing version number. If the Program
|
|
243
|
+
specifies a version number of this License which applies to it and "any
|
|
244
|
+
later version", you have the option of following the terms and conditions
|
|
245
|
+
either of that version or of any later version published by the Free
|
|
246
|
+
Software Foundation. If the Program does not specify a version number of
|
|
247
|
+
this License, you may choose any version ever published by the Free Software
|
|
248
|
+
Foundation.
|
|
249
|
+
|
|
250
|
+
10. If you wish to incorporate parts of the Program into other free
|
|
251
|
+
programs whose distribution conditions are different, write to the author
|
|
252
|
+
to ask for permission. For software which is copyrighted by the Free
|
|
253
|
+
Software Foundation, write to the Free Software Foundation; we sometimes
|
|
254
|
+
make exceptions for this. Our decision will be guided by the two goals
|
|
255
|
+
of preserving the free status of all derivatives of our free software and
|
|
256
|
+
of promoting the sharing and reuse of software generally.
|
|
257
|
+
|
|
258
|
+
NO WARRANTY
|
|
259
|
+
|
|
260
|
+
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
|
261
|
+
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
|
262
|
+
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
|
263
|
+
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
|
264
|
+
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
|
265
|
+
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
|
266
|
+
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
|
267
|
+
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
|
268
|
+
REPAIR OR CORRECTION.
|
|
269
|
+
|
|
270
|
+
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
|
271
|
+
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
|
272
|
+
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
|
273
|
+
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
|
274
|
+
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
|
275
|
+
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
|
276
|
+
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
|
277
|
+
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
|
278
|
+
POSSIBILITY OF SUCH DAMAGES.
|
|
279
|
+
|
|
280
|
+
END OF TERMS AND CONDITIONS
|
|
281
|
+
|
|
282
|
+
How to Apply These Terms to Your New Programs
|
|
283
|
+
|
|
284
|
+
If you develop a new program, and you want it to be of the greatest
|
|
285
|
+
possible use to the public, the best way to achieve this is to make it
|
|
286
|
+
free software which everyone can redistribute and change under these terms.
|
|
287
|
+
|
|
288
|
+
To do so, attach the following notices to the program. It is safest
|
|
289
|
+
to attach them to the start of each source file to most effectively
|
|
290
|
+
convey the exclusion of warranty; and each file should have at least
|
|
291
|
+
the "copyright" line and a pointer to where the full notice is found.
|
|
292
|
+
|
|
293
|
+
<one line to give the program's name and a brief idea of what it does.>
|
|
294
|
+
Copyright (C) <year> <name of author>
|
|
295
|
+
|
|
296
|
+
This program is free software; you can redistribute it and/or modify
|
|
297
|
+
it under the terms of the GNU General Public License as published by
|
|
298
|
+
the Free Software Foundation; either version 2 of the License, or
|
|
299
|
+
(at your option) any later version.
|
|
300
|
+
|
|
301
|
+
This program is distributed in the hope that it will be useful,
|
|
302
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
303
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
304
|
+
GNU General Public License for more details.
|
|
305
|
+
|
|
306
|
+
You should have received a copy of the GNU General Public License along
|
|
307
|
+
with this program; if not, see <https://www.gnu.org/licenses/>.
|
|
308
|
+
|
|
309
|
+
Also add information on how to contact you by electronic and paper mail.
|
|
310
|
+
|
|
311
|
+
If the program is interactive, make it output a short notice like this
|
|
312
|
+
when it starts in an interactive mode:
|
|
313
|
+
|
|
314
|
+
Gnomovision version 69, Copyright (C) year name of author
|
|
315
|
+
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
|
316
|
+
This is free software, and you are welcome to redistribute it
|
|
317
|
+
under certain conditions; type `show c' for details.
|
|
318
|
+
|
|
319
|
+
The hypothetical commands `show w' and `show c' should show the appropriate
|
|
320
|
+
parts of the General Public License. Of course, the commands you use may
|
|
321
|
+
be called something other than `show w' and `show c'; they could even be
|
|
322
|
+
mouse-clicks or menu items--whatever suits your program.
|
|
323
|
+
|
|
324
|
+
You should also get your employer (if you work as a programmer) or your
|
|
325
|
+
school, if any, to sign a "copyright disclaimer" for the program, if
|
|
326
|
+
necessary. Here is a sample; alter the names:
|
|
327
|
+
|
|
328
|
+
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
|
329
|
+
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
|
330
|
+
|
|
331
|
+
<signature of Moe Ghoul>, 1 April 1989
|
|
332
|
+
Moe Ghoul, President of Vice
|
|
333
|
+
|
|
334
|
+
This General Public License does not permit incorporating your program into
|
|
335
|
+
proprietary programs. If your program is a subroutine library, you may
|
|
336
|
+
consider it more useful to permit linking proprietary applications with the
|
|
337
|
+
library. If this is what you want to do, use the GNU Lesser General
|
|
338
|
+
Public License instead of this License.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
dateblock
|
|
Binary file
|