ffrec 0.4.0__py3-none-any.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.
ffrec/__init__.py ADDED
File without changes
ffrec/_version.py ADDED
@@ -0,0 +1,21 @@
1
+ # file generated by setuptools-scm
2
+ # don't change, don't track in version control
3
+
4
+ __all__ = ["__version__", "__version_tuple__", "version", "version_tuple"]
5
+
6
+ TYPE_CHECKING = False
7
+ if TYPE_CHECKING:
8
+ from typing import Tuple
9
+ from typing import Union
10
+
11
+ VERSION_TUPLE = Tuple[Union[int, str], ...]
12
+ else:
13
+ VERSION_TUPLE = object
14
+
15
+ version: str
16
+ __version__: str
17
+ __version_tuple__: VERSION_TUPLE
18
+ version_tuple: VERSION_TUPLE
19
+
20
+ __version__ = version = '0.4.0'
21
+ __version_tuple__ = version_tuple = (0, 4, 0)
@@ -0,0 +1,147 @@
1
+ # src/ffrec/lib/parse_args.py
2
+
3
+ import argparse
4
+ import os
5
+ from ffrec._version import __version__
6
+
7
+
8
+ def parse_arguments() -> argparse.Namespace:
9
+ parser = argparse.ArgumentParser(description="Record screen and save to mp4")
10
+
11
+ parser.add_argument(
12
+ "-a",
13
+ "--audio-codec",
14
+ help="Audio codec to use (default: aac)",
15
+ default="aac",
16
+ )
17
+
18
+ parser.add_argument(
19
+ "-A",
20
+ "--audio-input",
21
+ help="Audio input source (default: pulse)",
22
+ default="pulse",
23
+ )
24
+
25
+ parser.add_argument(
26
+ "-c",
27
+ "--video-codec",
28
+ help="Video codec to use (default: hevc_nvenc)",
29
+ default="hevc_nvenc",
30
+ )
31
+
32
+ parser.add_argument(
33
+ "-D",
34
+ "--debug",
35
+ help="Debugging",
36
+ action="store_true",
37
+ )
38
+
39
+ parser.add_argument(
40
+ "-C",
41
+ "--audio-channels",
42
+ help="Number of audio channels (default: 2)",
43
+ type=int,
44
+ default=2,
45
+ )
46
+
47
+ parser.add_argument(
48
+ "-d",
49
+ "--dir",
50
+ help="Directory to save the output video file",
51
+ default=os.getcwd(),
52
+ )
53
+
54
+ # parser.add_argument(
55
+ # "-i",
56
+ # "--input",
57
+ # help="Input source for recording (default: x11grab)",
58
+ # choices=["x11grab", "wayland", "kmsgrab"],
59
+ # default="x11grab",
60
+ # )
61
+
62
+ parser.add_argument(
63
+ "-l",
64
+ "--loop",
65
+ help="Loop input until stream is terminated manually",
66
+ action="store_true",
67
+ )
68
+
69
+ parser.add_argument(
70
+ "-m",
71
+ "--mouse",
72
+ help="Record the mouse cursor (default false)",
73
+ action="store_true",
74
+ )
75
+
76
+ parser.add_argument(
77
+ "-o",
78
+ "--overwrite",
79
+ help="Overwrite existing files (default: true)",
80
+ action="store_true",
81
+ default=True,
82
+ )
83
+
84
+ parser.add_argument(
85
+ "-p",
86
+ "--prefix",
87
+ help="Prefix for the output video file name",
88
+ default="video",
89
+ )
90
+
91
+ parser.add_argument(
92
+ "-r",
93
+ "--framerate",
94
+ help="Framerate for recording (default: 30)",
95
+ type=int,
96
+ default=30,
97
+ )
98
+
99
+ parser.add_argument(
100
+ "-s",
101
+ "--size",
102
+ help="Video size (default: 1920x1080)",
103
+ default="1920x1080",
104
+ )
105
+
106
+ parser.add_argument(
107
+ "-t",
108
+ "--time",
109
+ help="Length of recording in HH:MM:SS format (default: 00:01:00)",
110
+ default="00:01:00",
111
+ )
112
+
113
+ timestamp_group = parser.add_mutually_exclusive_group(required=False)
114
+ timestamp_group.add_argument(
115
+ "-T",
116
+ "--timestamp",
117
+ help="Add timestamp to filename (default)",
118
+ action="store_true",
119
+ default=True,
120
+ )
121
+ timestamp_group.add_argument(
122
+ "-N",
123
+ "--no-timestamp",
124
+ help="Do not add timestamp to filename",
125
+ action="store_false",
126
+ dest="timestamp",
127
+ )
128
+
129
+ parser.add_argument(
130
+ "-v",
131
+ "--verbose",
132
+ help="Increase output verbosity",
133
+ action="count",
134
+ default=0,
135
+ )
136
+
137
+ parser.add_argument(
138
+ "-V",
139
+ "--version",
140
+ help="Show version",
141
+ action="version",
142
+ version=f"{__version__}",
143
+ )
144
+
145
+ args = parser.parse_args()
146
+
147
+ return args
@@ -0,0 +1,63 @@
1
+ import asyncio
2
+ import logging
3
+ from concurrent.futures import ThreadPoolExecutor
4
+ from ffmpeg import FFmpeg, Progress
5
+
6
+
7
+ def run_ffmpeg_process(ffmpeg_process):
8
+ try:
9
+
10
+ @ffmpeg_process.on("progress")
11
+ def on_progress(progress: Progress):
12
+ logging.debug("Progress: %s", progress)
13
+
14
+ ffmpeg_process.execute()
15
+ logging.info("FFmpeg process completed successfully")
16
+ except Exception as e:
17
+ logging.error(f"An error occurred while running FFmpeg process: {e}")
18
+ raise
19
+
20
+
21
+ async def record_screen(
22
+ output_path,
23
+ audio_codec,
24
+ audio_input,
25
+ video_codec,
26
+ audio_channels,
27
+ input_source,
28
+ loop,
29
+ record_mouse,
30
+ overwrite,
31
+ size,
32
+ framerate,
33
+ duration,
34
+ ):
35
+
36
+ ffmpeg_process = (
37
+ FFmpeg()
38
+ .option("y" if overwrite else "n")
39
+ .input(
40
+ ":0.0+0,0",
41
+ {
42
+ "f": input_source,
43
+ "draw_mouse": int(record_mouse),
44
+ "framerate": framerate,
45
+ "video_size": size,
46
+ },
47
+ )
48
+ .input("default", {"f": audio_input, "ac": audio_channels})
49
+ .output(
50
+ output_path,
51
+ {
52
+ "c:v": video_codec,
53
+ "c:a": audio_codec,
54
+ "t": duration,
55
+ },
56
+ )
57
+ )
58
+
59
+ logging.info("FFmpeg command: %s", ffmpeg_process.arguments)
60
+
61
+ loop = asyncio.get_running_loop()
62
+ with ThreadPoolExecutor() as pool:
63
+ await loop.run_in_executor(pool, run_ffmpeg_process, ffmpeg_process)
ffrec/main.py ADDED
@@ -0,0 +1,66 @@
1
+ # src/ffrec/main.py
2
+
3
+ import asyncio
4
+ import logging
5
+ import os
6
+ from datetime import datetime
7
+ from ffrec.lib.parse_args import parse_arguments
8
+ from ffrec.lib.record_screen import record_screen
9
+
10
+
11
+ logging.basicConfig(
12
+ level=logging.INFO, format="%(asctime)s - %(levelname)s - %(message)s"
13
+ )
14
+
15
+
16
+ def get_current_timestamp():
17
+ return datetime.now().strftime("%Y%m%d%H%M%S")
18
+
19
+
20
+ async def main():
21
+ args = parse_arguments()
22
+
23
+ if args.debug:
24
+ log_level = logging.DEBUG
25
+ elif args.verbose > 0:
26
+ log_level = logging.INFO
27
+ else:
28
+ log_level = logging.WARNING
29
+
30
+ logging.basicConfig(
31
+ level=log_level, format="%(asctime)s - %(levelname)s - %(message)s"
32
+ )
33
+
34
+ if args.timestamp:
35
+ timestamp = get_current_timestamp()
36
+ output_file = f"{args.prefix}-{timestamp}.mp4"
37
+ else:
38
+ output_file = f"{args.prefix}.mp4"
39
+ output_path = os.path.join(args.dir, output_file)
40
+
41
+ try:
42
+ await record_screen(
43
+ output_path,
44
+ audio_codec=args.audio_codec,
45
+ audio_input=args.audio_input,
46
+ video_codec=args.video_codec,
47
+ audio_channels=args.audio_channels,
48
+ input_source="x11grab",
49
+ loop=args.loop,
50
+ record_mouse=args.mouse,
51
+ overwrite=args.overwrite,
52
+ size=args.size,
53
+ framerate=args.framerate,
54
+ duration=args.time,
55
+ )
56
+ logging.info(f"Screen recording saved to {output_path}")
57
+ except Exception as e:
58
+ logging.error("Failed to complete screen recording: %s", e)
59
+
60
+
61
+ def main_wrapper():
62
+ asyncio.run(main())
63
+
64
+
65
+ if __name__ == "__main__":
66
+ main_wrapper()
@@ -0,0 +1,98 @@
1
+ Metadata-Version: 2.4
2
+ Name: ffrec
3
+ Version: 0.4.0
4
+ Summary: Records the screen, using Python
5
+ Author-email: Jeff Moe <moe@spacecruft.org>
6
+ License: Apache 2.0
7
+ Project-URL: Homepage, https://spacecruft.org/deepcrayon/ffrec
8
+ Project-URL: Documentation, https://spacecruft.org/deepcrayon/ffrec
9
+ Project-URL: Repository, https://spacecruft.org/deepcrayon/ffrec
10
+ Project-URL: Issues, https://spacecruft.org/deepcrayon/ffrec
11
+ Project-URL: Changelog, https://spacecruft.org/deepcrayon/ffrec/raw/branch/main/CHANGELOG.txt
12
+ Keywords: ffmpeg,record,screencap
13
+ Classifier: Development Status :: 3 - Alpha
14
+ Classifier: Environment :: Console
15
+ Classifier: Environment :: GPU
16
+ Classifier: Intended Audience :: Developers
17
+ Classifier: Intended Audience :: End Users/Desktop
18
+ Classifier: License :: OSI Approved :: Apache Software License
19
+ Classifier: Natural Language :: English
20
+ Classifier: Operating System :: OS Independent
21
+ Classifier: Programming Language :: Python :: 3
22
+ Classifier: Topic :: Multimedia :: Graphics :: Capture :: Screen Capture
23
+ Classifier: Topic :: Multimedia :: Sound/Audio
24
+ Classifier: Topic :: Multimedia :: Video :: Capture
25
+ Requires-Python: >=3.9
26
+ Description-Content-Type: text/markdown
27
+ License-File: LICENSE-CC.txt
28
+ License-File: LICENSE-apache.txt
29
+ Requires-Dist: asyncio
30
+ Requires-Dist: python-ffmpeg
31
+ Provides-Extra: dev
32
+ Requires-Dist: black; extra == "dev"
33
+ Requires-Dist: ruff; extra == "dev"
34
+ Requires-Dist: setuptools-scm; extra == "dev"
35
+ Requires-Dist: twine; extra == "dev"
36
+ Dynamic: license-file
37
+
38
+ # ffrec
39
+ ffrec records the screen, using Python.
40
+
41
+ * https://spacecruft.org/deepcrayon/ffrec
42
+ * https://pypi.org/project/ffrec/
43
+
44
+ # Installation
45
+ Thusly, suit to taste:
46
+
47
+ ```
48
+ python -m venv venv
49
+ source venv/bin/activate
50
+ pip install -U setuptools pip wheel
51
+ pip install ffrec
52
+ ```
53
+
54
+ # Help
55
+ Command line options:
56
+
57
+ ```
58
+ $ ffrec --help
59
+ usage: ffrec [-h] [-a AUDIO_CODEC] [-A AUDIO_INPUT] [-c VIDEO_CODEC] [-D] [-C AUDIO_CHANNELS] [-d DIR] [-l] [-m] [-o] [-p PREFIX] [-r FRAMERATE] [-s SIZE] [-t TIME] [-T | -N] [-v] [-V]
60
+
61
+ Record screen and save to mp4
62
+
63
+ options:
64
+ -h, --help show this help message and exit
65
+ -a AUDIO_CODEC, --audio-codec AUDIO_CODEC
66
+ Audio codec to use (default: aac)
67
+ -A AUDIO_INPUT, --audio-input AUDIO_INPUT
68
+ Audio input source (default: pulse)
69
+ -c VIDEO_CODEC, --video-codec VIDEO_CODEC
70
+ Video codec to use (default: hevc_nvenc)
71
+ -D, --debug Debugging
72
+ -C AUDIO_CHANNELS, --audio-channels AUDIO_CHANNELS
73
+ Number of audio channels (default: 2)
74
+ -d DIR, --dir DIR Directory to save the output video file
75
+ -l, --loop Loop input until stream is terminated manually
76
+ -m, --mouse Record the mouse cursor (default false)
77
+ -o, --overwrite Overwrite existing files (default: true)
78
+ -p PREFIX, --prefix PREFIX
79
+ Prefix for the output video file name
80
+ -r FRAMERATE, --framerate FRAMERATE
81
+ Framerate for recording (default: 30)
82
+ -s SIZE, --size SIZE Video size (default: 1920x1080)
83
+ -t TIME, --time TIME Length of recording in HH:MM:SS format (default: 00:01:00)
84
+ -T, --timestamp Add timestamp to filename (default)
85
+ -N, --no-timestamp Do not add timestamp to filename
86
+ -v, --verbose Increase output verbosity
87
+ -V, --version Show version
88
+ ```
89
+
90
+ # License
91
+ Apache 2.0 or Creative Commons CC by SA 4.0 International.
92
+ You may use this code, files, and text under either license.
93
+
94
+ Unofficial project, not related to upstream projects.
95
+
96
+ Upstream sources under their respective copyrights.
97
+
98
+ *Copyright &copy; 2025 Jeff Moe.*
@@ -0,0 +1,12 @@
1
+ ffrec/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
+ ffrec/_version.py,sha256=l5eo51MdCumDFCp44TFT1JH8yCDo1krag-GJubLxnVo,511
3
+ ffrec/main.py,sha256=9MdoCtSDDqqDrP22-FisJYILJsy_Dpk3yjbhDf9nfwQ,1658
4
+ ffrec/lib/parse_args.py,sha256=ccXX6AzLP0v5coorCpZUwJqnARt6qFd1wx98oCyYDFU,3221
5
+ ffrec/lib/record_screen.py,sha256=f6DV1d9HrwRpytb6NvOyFVvinyrhEdRIORIvPio5JSs,1539
6
+ ffrec-0.4.0.dist-info/licenses/LICENSE-CC.txt,sha256=8l9xX1LiqkzUrBB6u3RKJFG1ins5l2Psbi6jxvCMpI4,18109
7
+ ffrec-0.4.0.dist-info/licenses/LICENSE-apache.txt,sha256=QwcOLU5TJoTeUhuIXzhdCEEDDvorGiC6-3YTOl4TecE,11356
8
+ ffrec-0.4.0.dist-info/METADATA,sha256=ZDUvXjExihbqNME8VGZonMby7J3qxZFkrtkNaWMXztI,3635
9
+ ffrec-0.4.0.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
10
+ ffrec-0.4.0.dist-info/entry_points.txt,sha256=wX4FgKkih9kZMYM6CbXhpsUoKJbMCAQ5YJVF_m8u2nY,50
11
+ ffrec-0.4.0.dist-info/top_level.txt,sha256=6v1Qs7Kx6SHRU-qgu9OdzqEbSqZ6FpA6BUylVEkbI0Y,6
12
+ ffrec-0.4.0.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (78.1.0)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ ffrec = ffrec.main:main_wrapper
@@ -0,0 +1,350 @@
1
+ Creative Commons Attribution-ShareAlike 4.0 International Creative Commons
2
+ Corporation ("Creative Commons") is not a law firm and does not provide legal
3
+ services or legal advice. Distribution of Creative Commons public licenses
4
+ does not create a lawyer-client or other relationship. Creative Commons makes
5
+ its licenses and related information available on an "as-is" basis. Creative
6
+ Commons gives no warranties regarding its licenses, any material licensed
7
+ under their terms and conditions, or any related information. Creative Commons
8
+ disclaims all liability for damages resulting from their use to the fullest
9
+ extent possible.
10
+
11
+ Using Creative Commons Public Licenses
12
+
13
+ Creative Commons public licenses provide a standard set of terms and conditions
14
+ that creators and other rights holders may use to share original works of
15
+ authorship and other material subject to copyright and certain other rights
16
+ specified in the public license below. The following considerations are for
17
+ informational purposes only, are not exhaustive, and do not form part of our
18
+ licenses.
19
+
20
+ Considerations for licensors: Our public licenses are intended for use by
21
+ those authorized to give the public permission to use material in ways otherwise
22
+ restricted by copyright and certain other rights. Our licenses are irrevocable.
23
+ Licensors should read and understand the terms and conditions of the license
24
+ they choose before applying it. Licensors should also secure all rights necessary
25
+ before applying our licenses so that the public can reuse the material as
26
+ expected. Licensors should clearly mark any material not subject to the license.
27
+ This includes other CC-licensed material, or material used under an exception
28
+ or limitation to copyright. More considerations for licensors : wiki.creativecommons.org/Considerations_for_licensors
29
+
30
+ Considerations for the public: By using one of our public licenses, a licensor
31
+ grants the public permission to use the licensed material under specified
32
+ terms and conditions. If the licensor's permission is not necessary for any
33
+ reason–for example, because of any applicable exception or limitation to copyright–then
34
+ that use is not regulated by the license. Our licenses grant only permissions
35
+ under copyright and certain other rights that a licensor has authority to
36
+ grant. Use of the licensed material may still be restricted for other reasons,
37
+ including because others have copyright or other rights in the material. A
38
+ licensor may make special requests, such as asking that all changes be marked
39
+ or described.
40
+
41
+ Although not required by our licenses, you are encouraged to respect those
42
+ requests where reasonable. More considerations for the public : wiki.creativecommons.org/Considerations_for_licensees
43
+
44
+ Creative Commons Attribution-ShareAlike 4.0 International Public License
45
+
46
+ By exercising the Licensed Rights (defined below), You accept and agree to
47
+ be bound by the terms and conditions of this Creative Commons Attribution-ShareAlike
48
+ 4.0 International Public License ("Public License"). To the extent this Public
49
+ License may be interpreted as a contract, You are granted the Licensed Rights
50
+ in consideration of Your acceptance of these terms and conditions, and the
51
+ Licensor grants You such rights in consideration of benefits the Licensor
52
+ receives from making the Licensed Material available under these terms and
53
+ conditions.
54
+
55
+ Section 1 – Definitions.
56
+
57
+ a. Adapted Material means material subject to Copyright and Similar Rights
58
+ that is derived from or based upon the Licensed Material and in which the
59
+ Licensed Material is translated, altered, arranged, transformed, or otherwise
60
+ modified in a manner requiring permission under the Copyright and Similar
61
+ Rights held by the Licensor. For purposes of this Public License, where the
62
+ Licensed Material is a musical work, performance, or sound recording, Adapted
63
+ Material is always produced where the Licensed Material is synched in timed
64
+ relation with a moving image.
65
+
66
+ b. Adapter's License means the license You apply to Your Copyright and Similar
67
+ Rights in Your contributions to Adapted Material in accordance with the terms
68
+ and conditions of this Public License.
69
+
70
+ c. BY-SA Compatible License means a license listed at creativecommons.org/compatiblelicenses,
71
+ approved by Creative Commons as essentially the equivalent of this Public
72
+ License.
73
+
74
+ d. Copyright and Similar Rights means copyright and/or similar rights closely
75
+ related to copyright including, without limitation, performance, broadcast,
76
+ sound recording, and Sui Generis Database Rights, without regard to how the
77
+ rights are labeled or categorized. For purposes of this Public License, the
78
+ rights specified in Section 2(b)(1)-(2) are not Copyright and Similar Rights.
79
+
80
+ e. Effective Technological Measures means those measures that, in the absence
81
+ of proper authority, may not be circumvented under laws fulfilling obligations
82
+ under Article 11 of the WIPO Copyright Treaty adopted on December 20, 1996,
83
+ and/or similar international agreements.
84
+
85
+ f. Exceptions and Limitations means fair use, fair dealing, and/or any other
86
+ exception or limitation to Copyright and Similar Rights that applies to Your
87
+ use of the Licensed Material.
88
+
89
+ g. License Elements means the license attributes listed in the name of a Creative
90
+ Commons Public License. The License Elements of this Public License are Attribution
91
+ and ShareAlike.
92
+
93
+ h. Licensed Material means the artistic or literary work, database, or other
94
+ material to which the Licensor applied this Public License.
95
+
96
+ i. Licensed Rights means the rights granted to You subject to the terms and
97
+ conditions of this Public License, which are limited to all Copyright and
98
+ Similar Rights that apply to Your use of the Licensed Material and that the
99
+ Licensor has authority to license.
100
+
101
+ j. Licensor means the individual(s) or entity(ies) granting rights under this
102
+ Public License.
103
+
104
+ k. Share means to provide material to the public by any means or process that
105
+ requires permission under the Licensed Rights, such as reproduction, public
106
+ display, public performance, distribution, dissemination, communication, or
107
+ importation, and to make material available to the public including in ways
108
+ that members of the public may access the material from a place and at a time
109
+ individually chosen by them.
110
+
111
+ l. Sui Generis Database Rights means rights other than copyright resulting
112
+ from Directive 96/9/EC of the European Parliament and of the Council of 11
113
+ March 1996 on the legal protection of databases, as amended and/or succeeded,
114
+ as well as other essentially equivalent rights anywhere in the world.
115
+
116
+ m. You means the individual or entity exercising the Licensed Rights under
117
+ this Public License. Your has a corresponding meaning.
118
+
119
+ Section 2 – Scope.
120
+
121
+ a. License grant.
122
+
123
+ 1. Subject to the terms and conditions of this Public License, the Licensor
124
+ hereby grants You a worldwide, royalty-free, non-sublicensable, non-exclusive,
125
+ irrevocable license to exercise the Licensed Rights in the Licensed Material
126
+ to:
127
+
128
+ A. reproduce and Share the Licensed Material, in whole or in part; and
129
+
130
+ B. produce, reproduce, and Share Adapted Material.
131
+
132
+ 2. Exceptions and Limitations. For the avoidance of doubt, where Exceptions
133
+ and Limitations apply to Your use, this Public License does not apply, and
134
+ You do not need to comply with its terms and conditions.
135
+
136
+ 3. Term. The term of this Public License is specified in Section 6(a).
137
+
138
+ 4. Media and formats; technical modifications allowed. The Licensor authorizes
139
+ You to exercise the Licensed Rights in all media and formats whether now known
140
+ or hereafter created, and to make technical modifications necessary to do
141
+ so. The Licensor waives and/or agrees not to assert any right or authority
142
+ to forbid You from making technical modifications necessary to exercise the
143
+ Licensed Rights, including technical modifications necessary to circumvent
144
+ Effective Technological Measures. For purposes of this Public License, simply
145
+ making modifications authorized by this Section 2(a)(4) never produces Adapted
146
+ Material.
147
+
148
+ 5. Downstream recipients.
149
+
150
+ A. Offer from the Licensor – Licensed Material. Every recipient of the Licensed
151
+ Material automatically receives an offer from the Licensor to exercise the
152
+ Licensed Rights under the terms and conditions of this Public License.
153
+
154
+ B. Additional offer from the Licensor – Adapted Material. Every recipient
155
+ of Adapted Material from You automatically receives an offer from the Licensor
156
+ to exercise the Licensed Rights in the Adapted Material under the conditions
157
+ of the Adapter's License You apply.
158
+
159
+ C. No downstream restrictions. You may not offer or impose any additional
160
+ or different terms or conditions on, or apply any Effective Technological
161
+ Measures to, the Licensed Material if doing so restricts exercise of the Licensed
162
+ Rights by any recipient of the Licensed Material.
163
+
164
+ 6. No endorsement. Nothing in this Public License constitutes or may be construed
165
+ as permission to assert or imply that You are, or that Your use of the Licensed
166
+ Material is, connected with, or sponsored, endorsed, or granted official status
167
+ by, the Licensor or others designated to receive attribution as provided in
168
+ Section 3(a)(1)(A)(i).
169
+
170
+ b. Other rights.
171
+
172
+ 1. Moral rights, such as the right of integrity, are not licensed under this
173
+ Public License, nor are publicity, privacy, and/or other similar personality
174
+ rights; however, to the extent possible, the Licensor waives and/or agrees
175
+ not to assert any such rights held by the Licensor to the limited extent necessary
176
+ to allow You to exercise the Licensed Rights, but not otherwise.
177
+
178
+ 2. Patent and trademark rights are not licensed under this Public License.
179
+
180
+ 3. To the extent possible, the Licensor waives any right to collect royalties
181
+ from You for the exercise of the Licensed Rights, whether directly or through
182
+ a collecting society under any voluntary or waivable statutory or compulsory
183
+ licensing scheme. In all other cases the Licensor expressly reserves any right
184
+ to collect such royalties.
185
+
186
+ Section 3 – License Conditions.
187
+
188
+ Your exercise of the Licensed Rights is expressly made subject to the following
189
+ conditions.
190
+
191
+ a. Attribution.
192
+
193
+ 1. If You Share the Licensed Material (including in modified form), You must:
194
+
195
+ A. retain the following if it is supplied by the Licensor with the Licensed
196
+ Material:
197
+
198
+ i. identification of the creator(s) of the Licensed Material and any others
199
+ designated to receive attribution, in any reasonable manner requested by the
200
+ Licensor (including by pseudonym if designated);
201
+
202
+ ii. a copyright notice;
203
+
204
+ iii. a notice that refers to this Public License;
205
+
206
+ iv. a notice that refers to the disclaimer of warranties;
207
+
208
+ v. a URI or hyperlink to the Licensed Material to the extent reasonably practicable;
209
+
210
+ B. indicate if You modified the Licensed Material and retain an indication
211
+ of any previous modifications; and
212
+
213
+ C. indicate the Licensed Material is licensed under this Public License, and
214
+ include the text of, or the URI or hyperlink to, this Public License.
215
+
216
+ 2. You may satisfy the conditions in Section 3(a)(1) in any reasonable manner
217
+ based on the medium, means, and context in which You Share the Licensed Material.
218
+ For example, it may be reasonable to satisfy the conditions by providing a
219
+ URI or hyperlink to a resource that includes the required information.
220
+
221
+ 3. If requested by the Licensor, You must remove any of the information required
222
+ by Section 3(a)(1)(A) to the extent reasonably practicable.
223
+
224
+ b. ShareAlike.In addition to the conditions in Section 3(a), if You Share
225
+ Adapted Material You produce, the following conditions also apply.
226
+
227
+ 1. The Adapter's License You apply must be a Creative Commons license with
228
+ the same License Elements, this version or later, or a BY-SA Compatible License.
229
+
230
+ 2. You must include the text of, or the URI or hyperlink to, the Adapter's
231
+ License You apply. You may satisfy this condition in any reasonable manner
232
+ based on the medium, means, and context in which You Share Adapted Material.
233
+
234
+ 3. You may not offer or impose any additional or different terms or conditions
235
+ on, or apply any Effective Technological Measures to, Adapted Material that
236
+ restrict exercise of the rights granted under the Adapter's License You apply.
237
+
238
+ Section 4 – Sui Generis Database Rights.
239
+
240
+ Where the Licensed Rights include Sui Generis Database Rights that apply to
241
+ Your use of the Licensed Material:
242
+
243
+ a. for the avoidance of doubt, Section 2(a)(1) grants You the right to extract,
244
+ reuse, reproduce, and Share all or a substantial portion of the contents of
245
+ the database;
246
+
247
+ b. if You include all or a substantial portion of the database contents in
248
+ a database in which You have Sui Generis Database Rights, then the database
249
+ in which You have Sui Generis Database Rights (but not its individual contents)
250
+ is Adapted Material, including for purposes of Section 3(b); and
251
+
252
+ c. You must comply with the conditions in Section 3(a) if You Share all or
253
+ a substantial portion of the contents of the database.
254
+
255
+ For the avoidance of doubt, this Section 4 supplements and does not replace
256
+ Your obligations under this Public License where the Licensed Rights include
257
+ other Copyright and Similar Rights.
258
+
259
+ Section 5 – Disclaimer of Warranties and Limitation of Liability.
260
+
261
+ a. Unless otherwise separately undertaken by the Licensor, to the extent possible,
262
+ the Licensor offers the Licensed Material as-is and as-available, and makes
263
+ no representations or warranties of any kind concerning the Licensed Material,
264
+ whether express, implied, statutory, or other. This includes, without limitation,
265
+ warranties of title, merchantability, fitness for a particular purpose, non-infringement,
266
+ absence of latent or other defects, accuracy, or the presence or absence of
267
+ errors, whether or not known or discoverable. Where disclaimers of warranties
268
+ are not allowed in full or in part, this disclaimer may not apply to You.
269
+
270
+ b. To the extent possible, in no event will the Licensor be liable to You
271
+ on any legal theory (including, without limitation, negligence) or otherwise
272
+ for any direct, special, indirect, incidental, consequential, punitive, exemplary,
273
+ or other losses, costs, expenses, or damages arising out of this Public License
274
+ or use of the Licensed Material, even if the Licensor has been advised of
275
+ the possibility of such losses, costs, expenses, or damages. Where a limitation
276
+ of liability is not allowed in full or in part, this limitation may not apply
277
+ to You.
278
+
279
+ c. The disclaimer of warranties and limitation of liability provided above
280
+ shall be interpreted in a manner that, to the extent possible, most closely
281
+ approximates an absolute disclaimer and waiver of all liability.
282
+
283
+ Section 6 – Term and Termination.
284
+
285
+ a. This Public License applies for the term of the Copyright and Similar Rights
286
+ licensed here. However, if You fail to comply with this Public License, then
287
+ Your rights under this Public License terminate automatically.
288
+
289
+ b. Where Your right to use the Licensed Material has terminated under Section
290
+ 6(a), it reinstates:
291
+
292
+ 1. automatically as of the date the violation is cured, provided it is cured
293
+ within 30 days of Your discovery of the violation; or
294
+
295
+ 2. upon express reinstatement by the Licensor.
296
+
297
+ c. For the avoidance of doubt, this Section 6(b) does not affect any right
298
+ the Licensor may have to seek remedies for Your violations of this Public
299
+ License.
300
+
301
+ d. For the avoidance of doubt, the Licensor may also offer the Licensed Material
302
+ under separate terms or conditions or stop distributing the Licensed Material
303
+ at any time; however, doing so will not terminate this Public License.
304
+
305
+ e. Sections 1, 5, 6, 7, and 8 survive termination of this Public License.
306
+
307
+ Section 7 – Other Terms and Conditions.
308
+
309
+ a. The Licensor shall not be bound by any additional or different terms or
310
+ conditions communicated by You unless expressly agreed.
311
+
312
+ b. Any arrangements, understandings, or agreements regarding the Licensed
313
+ Material not stated herein are separate from and independent of the terms
314
+ and conditions of this Public License.
315
+
316
+ Section 8 – Interpretation.
317
+
318
+ a. For the avoidance of doubt, this Public License does not, and shall not
319
+ be interpreted to, reduce, limit, restrict, or impose conditions on any use
320
+ of the Licensed Material that could lawfully be made without permission under
321
+ this Public License.
322
+
323
+ b. To the extent possible, if any provision of this Public License is deemed
324
+ unenforceable, it shall be automatically reformed to the minimum extent necessary
325
+ to make it enforceable. If the provision cannot be reformed, it shall be severed
326
+ from this Public License without affecting the enforceability of the remaining
327
+ terms and conditions.
328
+
329
+ c. No term or condition of this Public License will be waived and no failure
330
+ to comply consented to unless expressly agreed to by the Licensor.
331
+
332
+ d. Nothing in this Public License constitutes or may be interpreted as a limitation
333
+ upon, or waiver of, any privileges and immunities that apply to the Licensor
334
+ or You, including from the legal processes of any jurisdiction or authority.
335
+
336
+ Creative Commons is not a party to its public licenses. Notwithstanding, Creative
337
+ Commons may elect to apply one of its public licenses to material it publishes
338
+ and in those instances will be considered the "Licensor." The text of the
339
+ Creative Commons public licenses is dedicated to the public domain under the
340
+ CC0 Public Domain Dedication. Except for the limited purpose of indicating
341
+ that material is shared under a Creative Commons public license or as otherwise
342
+ permitted by the Creative Commons policies published at creativecommons.org/policies,
343
+ Creative Commons does not authorize the use of the trademark "Creative Commons"
344
+ or any other trademark or logo of Creative Commons without its prior written
345
+ consent including, without limitation, in connection with any unauthorized
346
+ modifications to any of its public licenses or any other arrangements, understandings,
347
+ or agreements concerning use of licensed material. For the avoidance of doubt,
348
+ this paragraph does not form part of the public licenses.
349
+
350
+ Creative Commons may be contacted at creativecommons.org.
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
@@ -0,0 +1 @@
1
+ ffrec