tvthekidx 0.5.0__tar.gz
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.
- tvthekidx-0.5.0/.gitignore +10 -0
- tvthekidx-0.5.0/CHANGELOG.md +111 -0
- tvthekidx-0.5.0/LICENSE +169 -0
- tvthekidx-0.5.0/PKG-INFO +189 -0
- tvthekidx-0.5.0/README.md +157 -0
- tvthekidx-0.5.0/docs/assets/noposter.png +0 -0
- tvthekidx-0.5.0/docs/assets/noposter.svg +177 -0
- tvthekidx-0.5.0/docs/assets/sample.png +0 -0
- tvthekidx-0.5.0/docs/assets/tvthekidx.png +0 -0
- tvthekidx-0.5.0/docs/assets/tvthekidx.svg +172 -0
- tvthekidx-0.5.0/pyproject.toml +77 -0
- tvthekidx-0.5.0/requirements-dev.txt +6 -0
- tvthekidx-0.5.0/requirements.txt +4 -0
- tvthekidx-0.5.0/src/tvthekidx/__init__.py +6 -0
- tvthekidx-0.5.0/src/tvthekidx/_version.py +24 -0
- tvthekidx-0.5.0/src/tvthekidx/cli.py +173 -0
- tvthekidx-0.5.0/src/tvthekidx/database.py +703 -0
- tvthekidx-0.5.0/src/tvthekidx/export.py +16 -0
- tvthekidx-0.5.0/src/tvthekidx/export_html.py +683 -0
- tvthekidx-0.5.0/src/tvthekidx/export_text.py +46 -0
- tvthekidx-0.5.0/src/tvthekidx/files.py +208 -0
- tvthekidx-0.5.0/src/tvthekidx/online.py +95 -0
- tvthekidx-0.5.0/src/tvthekidx/tags.py +190 -0
- tvthekidx-0.5.0/src/tvthekidx/tvstation.pt +0 -0
- tvthekidx-0.5.0/src/tvthekidx/tvstation.py +192 -0
- tvthekidx-0.5.0/src/tvthekidx/utility.py +126 -0
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## [0.5.0] - 2026-05-03
|
|
4
|
+
|
|
5
|
+
### Added
|
|
6
|
+
- Export plugin system — format selectable via `--format`; `html` and `text` plugins included
|
|
7
|
+
- TV station detection — CNN-based identification of recording channel from screenshots; logos embedded in HTML export
|
|
8
|
+
- Tags — regex-based file tagging with new `tags` subcommand (`list`, `add`, `delete`, `export`)
|
|
9
|
+
- `maintenance` subcommand — replaces `database`; adds `detecttvstations`, `cleartvstations`, `getscreenshots`, `clearscreenshots` actions
|
|
10
|
+
- `--graphics` export option — `embed` (base64 inline, default), `reference` (external files), `disable`
|
|
11
|
+
- Clipboard copy button for filenames in HTML export
|
|
12
|
+
- Director display in movie detail view
|
|
13
|
+
- HTML generator meta tag
|
|
14
|
+
|
|
15
|
+
### Changed
|
|
16
|
+
- Database schema v8
|
|
17
|
+
- HTML export ~7× faster — bulk SQL queries replace per-movie/per-file round-trips; SQLite mmap and page-cache tuning reduces system time by ~190×
|
|
18
|
+
- CI pipeline upgraded to Debian trixie; win64 build removed; test matrix updated to bookworm and trixie
|
|
19
|
+
- `--url` flag added to HTML exporter for video hyperlink prefix
|
|
20
|
+
- Top list excludes 100%-scored movies
|
|
21
|
+
- Cover size and new-section entry count adjusted
|
|
22
|
+
- Sort order fixes for new section and movies-per-actor
|
|
23
|
+
|
|
24
|
+
### Fixed
|
|
25
|
+
- Badge width rendering
|
|
26
|
+
- JavaScript search escaping and keybinding
|
|
27
|
+
- Invalid TMDB ID query handling
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
## [0.4.0] - 2024-01-08
|
|
32
|
+
|
|
33
|
+
### Added
|
|
34
|
+
- Screenshot capture via ffprobe/moviepy
|
|
35
|
+
- `database maintenance` command
|
|
36
|
+
- File detail view for single-collection exports
|
|
37
|
+
- MIT license
|
|
38
|
+
|
|
39
|
+
### Changed
|
|
40
|
+
- Restructured into Python package (`src/` layout) for use with setuptools
|
|
41
|
+
- ffprobe used for video metadata extraction
|
|
42
|
+
- Packaging switched to `pyproject.toml` / `python -m build`
|
|
43
|
+
- Linter (flake8/pylint) added to CI
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
## [0.3.2] - 2023-08-23
|
|
48
|
+
|
|
49
|
+
### Changed
|
|
50
|
+
- PyInstaller version bump
|
|
51
|
+
|
|
52
|
+
---
|
|
53
|
+
|
|
54
|
+
## [0.3.1] - 2023-08-16
|
|
55
|
+
|
|
56
|
+
### Added
|
|
57
|
+
- Search keyboard shortcut
|
|
58
|
+
|
|
59
|
+
---
|
|
60
|
+
|
|
61
|
+
## [0.3.0] - 2023-08-15
|
|
62
|
+
|
|
63
|
+
### Added
|
|
64
|
+
- Simple full-text search in HTML export
|
|
65
|
+
- Test of Linux binary on Debian bookworm
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
## [0.2.0] - 2023-07-24
|
|
70
|
+
|
|
71
|
+
### Added
|
|
72
|
+
- File size shown in collection hover tooltip
|
|
73
|
+
- GitLab build pipeline
|
|
74
|
+
|
|
75
|
+
### Changed
|
|
76
|
+
- Movies-per-actor sort order updated
|
|
77
|
+
|
|
78
|
+
---
|
|
79
|
+
|
|
80
|
+
## [0.1.0] - 2022-11-30
|
|
81
|
+
|
|
82
|
+
### Added
|
|
83
|
+
- HTML navbar and "new releases" section
|
|
84
|
+
- Merged scripts into single entry point
|
|
85
|
+
|
|
86
|
+
### Changed
|
|
87
|
+
- Switched from getopt to argparse
|
|
88
|
+
- Increased entry count in new section
|
|
89
|
+
|
|
90
|
+
---
|
|
91
|
+
|
|
92
|
+
## [0.0.6] - 2022-02-19
|
|
93
|
+
|
|
94
|
+
### Fixed
|
|
95
|
+
- Word-break rendering and debug output removed
|
|
96
|
+
|
|
97
|
+
---
|
|
98
|
+
|
|
99
|
+
## [0.0.5] - 2022-02-16
|
|
100
|
+
|
|
101
|
+
### Added
|
|
102
|
+
- Collections support
|
|
103
|
+
- Actors section
|
|
104
|
+
- Non-TMDB files listed in output
|
|
105
|
+
- Release pipeline
|
|
106
|
+
- Custom header
|
|
107
|
+
|
|
108
|
+
### Changed
|
|
109
|
+
- Refactored codebase
|
|
110
|
+
- Strict title matching; SQL escaping fixes
|
|
111
|
+
- UTF-8 output enforced
|
tvthekidx-0.5.0/LICENSE
ADDED
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
TVThe(k)Idx
|
|
2
|
+
|
|
3
|
+
Copyright (C) 2021-2026 developer@mplx.eu
|
|
4
|
+
|
|
5
|
+
GNU LESSER GENERAL PUBLIC LICENSE
|
|
6
|
+
Version 3, 29 June 2007
|
|
7
|
+
|
|
8
|
+
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
|
9
|
+
Everyone is permitted to copy and distribute verbatim copies
|
|
10
|
+
of this license document, but changing it is not allowed.
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
This version of the GNU Lesser General Public License incorporates
|
|
14
|
+
the terms and conditions of version 3 of the GNU General Public
|
|
15
|
+
License, supplemented by the additional permissions listed below.
|
|
16
|
+
|
|
17
|
+
0. Additional Definitions.
|
|
18
|
+
|
|
19
|
+
As used herein, "this License" refers to version 3 of the GNU Lesser
|
|
20
|
+
General Public License, and the "GNU GPL" refers to version 3 of the GNU
|
|
21
|
+
General Public License.
|
|
22
|
+
|
|
23
|
+
"The Library" refers to a covered work governed by this License,
|
|
24
|
+
other than an Application or a Combined Work as defined below.
|
|
25
|
+
|
|
26
|
+
An "Application" is any work that makes use of an interface provided
|
|
27
|
+
by the Library, but which is not otherwise based on the Library.
|
|
28
|
+
Defining a subclass of a class defined by the Library is deemed a mode
|
|
29
|
+
of using an interface provided by the Library.
|
|
30
|
+
|
|
31
|
+
A "Combined Work" is a work produced by combining or linking an
|
|
32
|
+
Application with the Library. The particular version of the Library
|
|
33
|
+
with which the Combined Work was made is also called the "Linked
|
|
34
|
+
Version".
|
|
35
|
+
|
|
36
|
+
The "Minimal Corresponding Source" for a Combined Work means the
|
|
37
|
+
Corresponding Source for the Combined Work, excluding any source code
|
|
38
|
+
for portions of the Combined Work that, considered in isolation, are
|
|
39
|
+
based on the Application, and not on the Linked Version.
|
|
40
|
+
|
|
41
|
+
The "Corresponding Application Code" for a Combined Work means the
|
|
42
|
+
object code and/or source code for the Application, including any data
|
|
43
|
+
and utility programs needed for reproducing the Combined Work from the
|
|
44
|
+
Application, but excluding the System Libraries of the Combined Work.
|
|
45
|
+
|
|
46
|
+
1. Exception to Section 3 of the GNU GPL.
|
|
47
|
+
|
|
48
|
+
You may convey a covered work under sections 3 and 4 of this License
|
|
49
|
+
without being bound by section 3 of the GNU GPL.
|
|
50
|
+
|
|
51
|
+
2. Conveying Modified Versions.
|
|
52
|
+
|
|
53
|
+
If you modify a copy of the Library, and, in your modifications, a
|
|
54
|
+
facility refers to a function or data to be supplied by an Application
|
|
55
|
+
that uses the facility (other than as an argument passed when the
|
|
56
|
+
facility is invoked), then you may convey a copy of the modified
|
|
57
|
+
version:
|
|
58
|
+
|
|
59
|
+
a) under this License, provided that you make a good faith effort to
|
|
60
|
+
ensure that, in the event an Application does not supply the
|
|
61
|
+
function or data, the facility still operates, and performs
|
|
62
|
+
whatever part of its purpose remains meaningful, or
|
|
63
|
+
|
|
64
|
+
b) under the GNU GPL, with none of the additional permissions of
|
|
65
|
+
this License applicable to that copy.
|
|
66
|
+
|
|
67
|
+
3. Object Code Incorporating Material from Library Header Files.
|
|
68
|
+
|
|
69
|
+
The object code form of an Application may incorporate material from
|
|
70
|
+
a header file that is part of the Library. You may convey such object
|
|
71
|
+
code under terms of your choice, provided that, if the incorporated
|
|
72
|
+
material is not limited to numerical parameters, data structure
|
|
73
|
+
layouts and accessors, or small macros, inline functions and templates
|
|
74
|
+
(ten or fewer lines in length), you do both of the following:
|
|
75
|
+
|
|
76
|
+
a) Give prominent notice with each copy of the object code that the
|
|
77
|
+
Library is used in it and that the Library and its use are
|
|
78
|
+
covered by this License.
|
|
79
|
+
|
|
80
|
+
b) Accompany the object code with a copy of the GNU GPL and this license
|
|
81
|
+
document.
|
|
82
|
+
|
|
83
|
+
4. Combined Works.
|
|
84
|
+
|
|
85
|
+
You may convey a Combined Work under terms of your choice that,
|
|
86
|
+
taken together, effectively do not restrict modification of the
|
|
87
|
+
portions of the Library contained in the Combined Work and reverse
|
|
88
|
+
engineering for debugging such modifications, if you also do each of
|
|
89
|
+
the following:
|
|
90
|
+
|
|
91
|
+
a) Give prominent notice with each copy of the Combined Work that
|
|
92
|
+
the Library is used in it and that the Library and its use are
|
|
93
|
+
covered by this License.
|
|
94
|
+
|
|
95
|
+
b) Accompany the Combined Work with a copy of the GNU GPL and this license
|
|
96
|
+
document.
|
|
97
|
+
|
|
98
|
+
c) For a Combined Work that displays copyright notices during
|
|
99
|
+
execution, include the copyright notice for the Library among
|
|
100
|
+
these notices, as well as a reference directing the user to the
|
|
101
|
+
copies of the GNU GPL and this license document.
|
|
102
|
+
|
|
103
|
+
d) Do one of the following:
|
|
104
|
+
|
|
105
|
+
0) Convey the Minimal Corresponding Source under the terms of this
|
|
106
|
+
License, and the Corresponding Application Code in a form
|
|
107
|
+
suitable for, and under terms that permit, the user to
|
|
108
|
+
recombine or relink the Application with a modified version of
|
|
109
|
+
the Linked Version to produce a modified Combined Work, in the
|
|
110
|
+
manner specified by section 6 of the GNU GPL for conveying
|
|
111
|
+
Corresponding Source.
|
|
112
|
+
|
|
113
|
+
1) Use a suitable shared library mechanism for linking with the
|
|
114
|
+
Library. A suitable mechanism is one that (a) uses at run time
|
|
115
|
+
a copy of the Library already present on the user's computer
|
|
116
|
+
system, and (b) will operate properly with a modified version
|
|
117
|
+
of the Library that is interface-compatible with the Linked
|
|
118
|
+
Version.
|
|
119
|
+
|
|
120
|
+
e) Provide Installation Information, but only if you would otherwise
|
|
121
|
+
be required to provide such information under section 6 of the
|
|
122
|
+
GNU GPL, and only to the extent that such information is
|
|
123
|
+
necessary to install and execute a modified version of the
|
|
124
|
+
Combined Work produced by recombining or relinking the
|
|
125
|
+
Application with a modified version of the Linked Version. (If
|
|
126
|
+
you use option 4d0, the Installation Information must accompany
|
|
127
|
+
the Minimal Corresponding Source and Corresponding Application
|
|
128
|
+
Code. If you use option 4d1, you must provide the Installation
|
|
129
|
+
Information in the manner specified by section 6 of the GNU GPL
|
|
130
|
+
for conveying Corresponding Source.)
|
|
131
|
+
|
|
132
|
+
5. Combined Libraries.
|
|
133
|
+
|
|
134
|
+
You may place library facilities that are a work based on the
|
|
135
|
+
Library side by side in a single library together with other library
|
|
136
|
+
facilities that are not Applications and are not covered by this
|
|
137
|
+
License, and convey such a combined library under terms of your
|
|
138
|
+
choice, if you do both of the following:
|
|
139
|
+
|
|
140
|
+
a) Accompany the combined library with a copy of the same work based
|
|
141
|
+
on the Library, uncombined with any other library facilities,
|
|
142
|
+
conveyed under the terms of this License.
|
|
143
|
+
|
|
144
|
+
b) Give prominent notice with the combined library that part of it
|
|
145
|
+
is a work based on the Library, and explaining where to find the
|
|
146
|
+
accompanying uncombined form of the same work.
|
|
147
|
+
|
|
148
|
+
6. Revised Versions of the GNU Lesser General Public License.
|
|
149
|
+
|
|
150
|
+
The Free Software Foundation may publish revised and/or new versions
|
|
151
|
+
of the GNU Lesser General Public License from time to time. Such new
|
|
152
|
+
versions will be similar in spirit to the present version, but may
|
|
153
|
+
differ in detail to address new problems or concerns.
|
|
154
|
+
|
|
155
|
+
Each version is given a distinguishing version number. If the
|
|
156
|
+
Library as you received it specifies that a certain numbered version
|
|
157
|
+
of the GNU Lesser General Public License "or any later version"
|
|
158
|
+
applies to it, you have the option of following the terms and
|
|
159
|
+
conditions either of that published version or of any later version
|
|
160
|
+
published by the Free Software Foundation. If the Library as you
|
|
161
|
+
received it does not specify a version number of the GNU Lesser
|
|
162
|
+
General Public License, you may choose any version of the GNU Lesser
|
|
163
|
+
General Public License ever published by the Free Software Foundation.
|
|
164
|
+
|
|
165
|
+
If the Library as you received it specifies that a proxy can decide
|
|
166
|
+
whether future versions of the GNU Lesser General Public License shall
|
|
167
|
+
apply, that proxy's public statement of acceptance of any version is
|
|
168
|
+
permanent authorization for you to choose that version for the
|
|
169
|
+
Library.
|
tvthekidx-0.5.0/PKG-INFO
ADDED
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: tvthekidx
|
|
3
|
+
Version: 0.5.0
|
|
4
|
+
Summary: maintain an index of downloaded tvthek content
|
|
5
|
+
Project-URL: Homepage, https://gitlab.mplx.eu/scripts/tvthekidx
|
|
6
|
+
Project-URL: Source, https://gitlab.mplx.eu/scripts/tvthekidx
|
|
7
|
+
Author-email: mplx <developer@mplx.eu>
|
|
8
|
+
License: LGPL-3.0-only
|
|
9
|
+
Keywords: movies,tvthek
|
|
10
|
+
Classifier: Development Status :: 4 - Beta
|
|
11
|
+
Classifier: Intended Audience :: Developers
|
|
12
|
+
Classifier: Intended Audience :: End Users/Desktop
|
|
13
|
+
Classifier: License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)
|
|
14
|
+
Classifier: Programming Language :: Python :: 3
|
|
15
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
22
|
+
Classifier: Topic :: Multimedia :: Video
|
|
23
|
+
Classifier: Topic :: Utilities
|
|
24
|
+
Requires-Python: >=3.9
|
|
25
|
+
Requires-Dist: ffmpeg-python==0.2.0
|
|
26
|
+
Requires-Dist: moviepy==1.0.3
|
|
27
|
+
Requires-Dist: pillow==12.2.0
|
|
28
|
+
Requires-Dist: tmdbv3api==1.7.7
|
|
29
|
+
Provides-Extra: tvstation
|
|
30
|
+
Requires-Dist: ultralytics==8.4.22; extra == 'tvstation'
|
|
31
|
+
Description-Content-Type: text/markdown
|
|
32
|
+
|
|
33
|
+
# TVthe(k)Index
|
|
34
|
+
|
|
35
|
+
Generates an index of tvthek/mediathek downloaded content and queries [TMDB](https://www.themoviedb.org/) for the meta data
|
|
36
|
+
|
|
37
|
+

|
|
38
|
+
|
|
39
|
+
## Example
|
|
40
|
+
|
|
41
|
+
[](https://peach.blender.org/)
|
|
42
|
+
|
|
43
|
+
## Usage (version 0.5.0)
|
|
44
|
+
|
|
45
|
+
### Prerequisites
|
|
46
|
+
|
|
47
|
+
Register at [TMDB](https://www.themoviedb.org/) and [get an API key](https://www.themoviedb.org/documentation/api).
|
|
48
|
+
|
|
49
|
+
### from binary (windows)
|
|
50
|
+
|
|
51
|
+
1. download binaries from [packages](https://gitlab.mplx.eu/scripts/tvthekidx/-/packages) and rename to `tvthekidx.exe`
|
|
52
|
+
|
|
53
|
+
2. create database
|
|
54
|
+
|
|
55
|
+
`tvthekidx.exe -v maintenance -d tvthek.db -a createdb`
|
|
56
|
+
|
|
57
|
+
3. run the indexer
|
|
58
|
+
|
|
59
|
+
`tvthekidx.exe -v index -k "APIKEY" -d tvthek.db -t movies -c "TVthek" -p x:\TVThek --recursive`
|
|
60
|
+
|
|
61
|
+
(insert your TMDB API key instead of `APIKEY`)
|
|
62
|
+
|
|
63
|
+
4. generate the html file
|
|
64
|
+
|
|
65
|
+
`tvthekidx.exe export -d tvthek.db -c "TVthek" -f html --title "TVthek" --output tvthek.html`
|
|
66
|
+
|
|
67
|
+
5. if you add or remove content run steps 3 + 4 again
|
|
68
|
+
|
|
69
|
+
6. occasionally run database maintenance
|
|
70
|
+
|
|
71
|
+
`tvthekidx.exe -v maintenance -d tvthek.db -a compressdb`
|
|
72
|
+
|
|
73
|
+
### from binary (linux)
|
|
74
|
+
|
|
75
|
+
1. download binaries from [packages](https://gitlab.mplx.eu/scripts/tvthekidx/-/packages) and rename to `tvthekidx`
|
|
76
|
+
|
|
77
|
+
2. make tvthekidx executable
|
|
78
|
+
|
|
79
|
+
`chmod +x tvthekidx`
|
|
80
|
+
|
|
81
|
+
3. create database
|
|
82
|
+
|
|
83
|
+
`./tvthekidx -v maintenance -d tvthek.db -a createdb`
|
|
84
|
+
|
|
85
|
+
4. run the indexer
|
|
86
|
+
|
|
87
|
+
`./tvthekidx -v index -k "APIKEY" -d tvthek.db -t movies -c "TVthek" -p /mnt/TVThek/ --recursive`
|
|
88
|
+
|
|
89
|
+
(insert your TMDB API key instead of `APIKEY`)
|
|
90
|
+
|
|
91
|
+
5. generate the html file
|
|
92
|
+
|
|
93
|
+
`./tvthekidx export -d tvthek.db -c "TVthek" -f html --title "TVthek" --output tvthek.html`
|
|
94
|
+
|
|
95
|
+
6. if you add or remove content run steps 4 + 5 again
|
|
96
|
+
|
|
97
|
+
7. occasionally run database maintenance
|
|
98
|
+
|
|
99
|
+
`./tvthekidx -v maintenance -d tvthek.db -a compressdb`
|
|
100
|
+
|
|
101
|
+
### from python source
|
|
102
|
+
|
|
103
|
+
1. download source code from [releases](https://gitlab.mplx.eu/scripts/tvthekidx/-/releases)
|
|
104
|
+
|
|
105
|
+
2. install requirements
|
|
106
|
+
|
|
107
|
+
`pip install -e .`
|
|
108
|
+
|
|
109
|
+
3. create database
|
|
110
|
+
|
|
111
|
+
`tvthekidx -v maintenance -d tvthek.db -a createdb`
|
|
112
|
+
|
|
113
|
+
4. run the indexer
|
|
114
|
+
|
|
115
|
+
`tvthekidx -v index -k "APIKEY" -d tvthek.db -t movies -c "TVthek" -p /mnt/TVThek/ --recursive`
|
|
116
|
+
|
|
117
|
+
(insert your TMDB API key instead of `APIKEY`)
|
|
118
|
+
|
|
119
|
+
5. generate the html file
|
|
120
|
+
|
|
121
|
+
`tvthekidx export -d tvthek.db -c "TVthek" -f html --title "TVthek" --output tvthek.html`
|
|
122
|
+
|
|
123
|
+
6. if you add or remove content run steps 4 + 5 again
|
|
124
|
+
|
|
125
|
+
7. occasionally run database maintenance
|
|
126
|
+
|
|
127
|
+
`tvthekidx -v maintenance -d tvthek.db -a compressdb`
|
|
128
|
+
|
|
129
|
+
## Global arguments
|
|
130
|
+
|
|
131
|
+
- `-q`, `--quiet` quiet (set verbose to 0)
|
|
132
|
+
- `-v`, `--verbose` increase verbosity (stackable)
|
|
133
|
+
|
|
134
|
+
## `index` arguments
|
|
135
|
+
|
|
136
|
+
- `-d`, `--database` SQLite database file
|
|
137
|
+
- `-p`, `--path` path to scan for video files
|
|
138
|
+
- `-k`, `--key` TMDB API key
|
|
139
|
+
- `-t`, `--type` content type (`movies`; tvshows not yet supported)
|
|
140
|
+
- `-c`, `--collection` collection name
|
|
141
|
+
- `-r`, `--recursive` scan subdirectories recursively
|
|
142
|
+
|
|
143
|
+
## `export` arguments
|
|
144
|
+
|
|
145
|
+
- `-d`, `--database` SQLite database file
|
|
146
|
+
- `-c`, `--collection` comma-separated list of collections to include
|
|
147
|
+
- `-f`, `--format` export format plugin (`html`, `text`); default `html`
|
|
148
|
+
|
|
149
|
+
### HTML plugin arguments (passed after `export`)
|
|
150
|
+
|
|
151
|
+
- `--title` page title
|
|
152
|
+
- `--output`, `-o` output file (default `tvthek.html`)
|
|
153
|
+
- `--graphics` image handling: `embed` (default, base64 inline), `reference` (external files), `disable`
|
|
154
|
+
- `--skip-actors` omit the actors/crew section
|
|
155
|
+
- `--skip-header` omit the top-rated and newest-additions header sections
|
|
156
|
+
- `--url` hyperlink prefix for video file links (default `./`)
|
|
157
|
+
|
|
158
|
+
## `maintenance` arguments
|
|
159
|
+
|
|
160
|
+
- `-d`, `--database` SQLite database file
|
|
161
|
+
- `-a`, `--action` one of:
|
|
162
|
+
- `createdb` — create a new database
|
|
163
|
+
- `upgradedb` — run schema migrations on an existing database
|
|
164
|
+
- `compressdb` — deduplicate movies and VACUUM
|
|
165
|
+
- `detecttvstations` — run ML-based TV station detection on stored screenshots
|
|
166
|
+
- `cleartvstations` — remove all TV station assignments
|
|
167
|
+
- `getscreenshots` — capture/backfill screenshots for files (requires `-p`)
|
|
168
|
+
- `clearscreenshots` — delete all stored screenshots
|
|
169
|
+
- `-p`, `--path` path to video files (required for `getscreenshots`)
|
|
170
|
+
- `-c`, `--collection` collection filter (optional for `getscreenshots`)
|
|
171
|
+
|
|
172
|
+
## `tags` arguments
|
|
173
|
+
|
|
174
|
+
- `-d`, `--database` SQLite database file
|
|
175
|
+
- `-a`, `--action` one of: `list`, `add`, `delete`, `export`
|
|
176
|
+
- `-t`, `--tag` tag name
|
|
177
|
+
- `-r`, `--regex` regular expression pattern matched against filenames
|
|
178
|
+
- `--all` delete all tags (use with `--action delete`)
|
|
179
|
+
|
|
180
|
+
## What's new in 0.5.0
|
|
181
|
+
|
|
182
|
+
- **Export plugin system** — export format is now selectable via `--format`; `html` and `text` plugins included
|
|
183
|
+
- **TV station detection** — screenshots are analysed with a convolutional neural network (CNN) to identify the recording channel; logos are embedded in the HTML export
|
|
184
|
+
- **Tags** — regex-based file tagging with the new `tags` subcommand
|
|
185
|
+
- **`maintenance` subcommand** — replaces `database`; adds `detecttvstations`, `cleartvstations`, `getscreenshots`, `clearscreenshots` actions
|
|
186
|
+
- **`--graphics` export option** — choose between embedded base64, external file references, or disabled images
|
|
187
|
+
- **HTML export performance** — ~7× faster; bulk SQL queries replace per-movie/per-file round-trips; SQLite mmap and page-cache tuning cuts system time by ~190×
|
|
188
|
+
- **Database schema v8** — all binary attachments (posters, actor profiles, screenshots) unified in a single `attachments` table with a composite index on `(ref_id, type)`
|
|
189
|
+
- **CI pipeline upgraded to Debian trixie** — build image updated to `python:3-slim-trixie`; test matrix updated to bookworm and trixie; win64 removed
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
# TVthe(k)Index
|
|
2
|
+
|
|
3
|
+
Generates an index of tvthek/mediathek downloaded content and queries [TMDB](https://www.themoviedb.org/) for the meta data
|
|
4
|
+
|
|
5
|
+

|
|
6
|
+
|
|
7
|
+
## Example
|
|
8
|
+
|
|
9
|
+
[](https://peach.blender.org/)
|
|
10
|
+
|
|
11
|
+
## Usage (version 0.5.0)
|
|
12
|
+
|
|
13
|
+
### Prerequisites
|
|
14
|
+
|
|
15
|
+
Register at [TMDB](https://www.themoviedb.org/) and [get an API key](https://www.themoviedb.org/documentation/api).
|
|
16
|
+
|
|
17
|
+
### from binary (windows)
|
|
18
|
+
|
|
19
|
+
1. download binaries from [packages](https://gitlab.mplx.eu/scripts/tvthekidx/-/packages) and rename to `tvthekidx.exe`
|
|
20
|
+
|
|
21
|
+
2. create database
|
|
22
|
+
|
|
23
|
+
`tvthekidx.exe -v maintenance -d tvthek.db -a createdb`
|
|
24
|
+
|
|
25
|
+
3. run the indexer
|
|
26
|
+
|
|
27
|
+
`tvthekidx.exe -v index -k "APIKEY" -d tvthek.db -t movies -c "TVthek" -p x:\TVThek --recursive`
|
|
28
|
+
|
|
29
|
+
(insert your TMDB API key instead of `APIKEY`)
|
|
30
|
+
|
|
31
|
+
4. generate the html file
|
|
32
|
+
|
|
33
|
+
`tvthekidx.exe export -d tvthek.db -c "TVthek" -f html --title "TVthek" --output tvthek.html`
|
|
34
|
+
|
|
35
|
+
5. if you add or remove content run steps 3 + 4 again
|
|
36
|
+
|
|
37
|
+
6. occasionally run database maintenance
|
|
38
|
+
|
|
39
|
+
`tvthekidx.exe -v maintenance -d tvthek.db -a compressdb`
|
|
40
|
+
|
|
41
|
+
### from binary (linux)
|
|
42
|
+
|
|
43
|
+
1. download binaries from [packages](https://gitlab.mplx.eu/scripts/tvthekidx/-/packages) and rename to `tvthekidx`
|
|
44
|
+
|
|
45
|
+
2. make tvthekidx executable
|
|
46
|
+
|
|
47
|
+
`chmod +x tvthekidx`
|
|
48
|
+
|
|
49
|
+
3. create database
|
|
50
|
+
|
|
51
|
+
`./tvthekidx -v maintenance -d tvthek.db -a createdb`
|
|
52
|
+
|
|
53
|
+
4. run the indexer
|
|
54
|
+
|
|
55
|
+
`./tvthekidx -v index -k "APIKEY" -d tvthek.db -t movies -c "TVthek" -p /mnt/TVThek/ --recursive`
|
|
56
|
+
|
|
57
|
+
(insert your TMDB API key instead of `APIKEY`)
|
|
58
|
+
|
|
59
|
+
5. generate the html file
|
|
60
|
+
|
|
61
|
+
`./tvthekidx export -d tvthek.db -c "TVthek" -f html --title "TVthek" --output tvthek.html`
|
|
62
|
+
|
|
63
|
+
6. if you add or remove content run steps 4 + 5 again
|
|
64
|
+
|
|
65
|
+
7. occasionally run database maintenance
|
|
66
|
+
|
|
67
|
+
`./tvthekidx -v maintenance -d tvthek.db -a compressdb`
|
|
68
|
+
|
|
69
|
+
### from python source
|
|
70
|
+
|
|
71
|
+
1. download source code from [releases](https://gitlab.mplx.eu/scripts/tvthekidx/-/releases)
|
|
72
|
+
|
|
73
|
+
2. install requirements
|
|
74
|
+
|
|
75
|
+
`pip install -e .`
|
|
76
|
+
|
|
77
|
+
3. create database
|
|
78
|
+
|
|
79
|
+
`tvthekidx -v maintenance -d tvthek.db -a createdb`
|
|
80
|
+
|
|
81
|
+
4. run the indexer
|
|
82
|
+
|
|
83
|
+
`tvthekidx -v index -k "APIKEY" -d tvthek.db -t movies -c "TVthek" -p /mnt/TVThek/ --recursive`
|
|
84
|
+
|
|
85
|
+
(insert your TMDB API key instead of `APIKEY`)
|
|
86
|
+
|
|
87
|
+
5. generate the html file
|
|
88
|
+
|
|
89
|
+
`tvthekidx export -d tvthek.db -c "TVthek" -f html --title "TVthek" --output tvthek.html`
|
|
90
|
+
|
|
91
|
+
6. if you add or remove content run steps 4 + 5 again
|
|
92
|
+
|
|
93
|
+
7. occasionally run database maintenance
|
|
94
|
+
|
|
95
|
+
`tvthekidx -v maintenance -d tvthek.db -a compressdb`
|
|
96
|
+
|
|
97
|
+
## Global arguments
|
|
98
|
+
|
|
99
|
+
- `-q`, `--quiet` quiet (set verbose to 0)
|
|
100
|
+
- `-v`, `--verbose` increase verbosity (stackable)
|
|
101
|
+
|
|
102
|
+
## `index` arguments
|
|
103
|
+
|
|
104
|
+
- `-d`, `--database` SQLite database file
|
|
105
|
+
- `-p`, `--path` path to scan for video files
|
|
106
|
+
- `-k`, `--key` TMDB API key
|
|
107
|
+
- `-t`, `--type` content type (`movies`; tvshows not yet supported)
|
|
108
|
+
- `-c`, `--collection` collection name
|
|
109
|
+
- `-r`, `--recursive` scan subdirectories recursively
|
|
110
|
+
|
|
111
|
+
## `export` arguments
|
|
112
|
+
|
|
113
|
+
- `-d`, `--database` SQLite database file
|
|
114
|
+
- `-c`, `--collection` comma-separated list of collections to include
|
|
115
|
+
- `-f`, `--format` export format plugin (`html`, `text`); default `html`
|
|
116
|
+
|
|
117
|
+
### HTML plugin arguments (passed after `export`)
|
|
118
|
+
|
|
119
|
+
- `--title` page title
|
|
120
|
+
- `--output`, `-o` output file (default `tvthek.html`)
|
|
121
|
+
- `--graphics` image handling: `embed` (default, base64 inline), `reference` (external files), `disable`
|
|
122
|
+
- `--skip-actors` omit the actors/crew section
|
|
123
|
+
- `--skip-header` omit the top-rated and newest-additions header sections
|
|
124
|
+
- `--url` hyperlink prefix for video file links (default `./`)
|
|
125
|
+
|
|
126
|
+
## `maintenance` arguments
|
|
127
|
+
|
|
128
|
+
- `-d`, `--database` SQLite database file
|
|
129
|
+
- `-a`, `--action` one of:
|
|
130
|
+
- `createdb` — create a new database
|
|
131
|
+
- `upgradedb` — run schema migrations on an existing database
|
|
132
|
+
- `compressdb` — deduplicate movies and VACUUM
|
|
133
|
+
- `detecttvstations` — run ML-based TV station detection on stored screenshots
|
|
134
|
+
- `cleartvstations` — remove all TV station assignments
|
|
135
|
+
- `getscreenshots` — capture/backfill screenshots for files (requires `-p`)
|
|
136
|
+
- `clearscreenshots` — delete all stored screenshots
|
|
137
|
+
- `-p`, `--path` path to video files (required for `getscreenshots`)
|
|
138
|
+
- `-c`, `--collection` collection filter (optional for `getscreenshots`)
|
|
139
|
+
|
|
140
|
+
## `tags` arguments
|
|
141
|
+
|
|
142
|
+
- `-d`, `--database` SQLite database file
|
|
143
|
+
- `-a`, `--action` one of: `list`, `add`, `delete`, `export`
|
|
144
|
+
- `-t`, `--tag` tag name
|
|
145
|
+
- `-r`, `--regex` regular expression pattern matched against filenames
|
|
146
|
+
- `--all` delete all tags (use with `--action delete`)
|
|
147
|
+
|
|
148
|
+
## What's new in 0.5.0
|
|
149
|
+
|
|
150
|
+
- **Export plugin system** — export format is now selectable via `--format`; `html` and `text` plugins included
|
|
151
|
+
- **TV station detection** — screenshots are analysed with a convolutional neural network (CNN) to identify the recording channel; logos are embedded in the HTML export
|
|
152
|
+
- **Tags** — regex-based file tagging with the new `tags` subcommand
|
|
153
|
+
- **`maintenance` subcommand** — replaces `database`; adds `detecttvstations`, `cleartvstations`, `getscreenshots`, `clearscreenshots` actions
|
|
154
|
+
- **`--graphics` export option** — choose between embedded base64, external file references, or disabled images
|
|
155
|
+
- **HTML export performance** — ~7× faster; bulk SQL queries replace per-movie/per-file round-trips; SQLite mmap and page-cache tuning cuts system time by ~190×
|
|
156
|
+
- **Database schema v8** — all binary attachments (posters, actor profiles, screenshots) unified in a single `attachments` table with a composite index on `(ref_id, type)`
|
|
157
|
+
- **CI pipeline upgraded to Debian trixie** — build image updated to `python:3-slim-trixie`; test matrix updated to bookworm and trixie; win64 removed
|
|
Binary file
|