about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorComradeCrow <comradecrow@vivaldi.net>2023-05-17 16:05:13 -0700
committerComradeCrow <comradecrow@vivaldi.net>2023-05-17 16:05:13 -0700
commit8b4fa2a3b6b1a3d75fd4ae5a61266e159d22e095 (patch)
tree6bc2c757656071d39b840f6a0db27c53b33eedd5
parent8972e4b0fdc216bf4ea1c0f7e699689d6c84de6a (diff)
downloadytcpp-8b4fa2a3b6b1a3d75fd4ae5a61266e159d22e095.tar.gz
Changes
Start Documenting, add more cpack stuff
-rw-r--r--CMakeLists.txt15
-rw-r--r--LICENSE.txt (renamed from LICENSE)0
-rw-r--r--include/YtdlpWrapper.hpp (renamed from src/YtdlpWrapper.hpp)0
-rw-r--r--include/invapi.hpp (renamed from src/invapi.hpp)0
-rw-r--r--include/sqliteinterface.hpp (renamed from src/sqliteinterface.hpp)0
-rw-r--r--include/tui.hpp (renamed from src/tui.hpp)0
-rw-r--r--include/video.hpp (renamed from src/video.hpp)26
-rw-r--r--src/main.cpp12
8 files changed, 42 insertions, 11 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9e3f249..033e0b0 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -6,6 +6,12 @@ project(ytcpp
     HOMEPAGE_URL https://crow.port0.org/git/comradecrow/ytcpp.git
 )
 
+if(PROJECT_IS_TOP_LEVEL)
+  include(CTest)
+  enable_testing()
+endif()
+# set(PROJECT_SOURCE_DIR "src")
+set(PROJECT_INCLUDE_DIR "include")
 set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)
 set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR}/cmake)
 
@@ -57,7 +63,7 @@ add_executable(${PROJECT_NAME}
     src/video.cpp
 )
 
-target_include_directories(${PROJECT_NAME} PRIVATE src)
+target_include_directories(${PROJECT_NAME} PRIVATE ${PROJECT_INCLUDE_DIR})
 
 target_compile_definitions(${PROJECT_NAME} 
     PRIVATE DEF_APPDATA="${DEF_APPDATA}"
@@ -74,3 +80,10 @@ target_link_libraries(${PROJECT_NAME}
     PRIVATE SQLite::SQLite3
     PRIVATE pybind11::embed
 )
+
+# set(CPACK_PROJECT_NAME ${PROJECT_NAME})
+# set(CPACK_PROJECT_VERSION ${PROJECT_VERSION})
+set(CPACK_PACKAGE_VENDOR "ComradeCrow")
+set(CPACK_RESOURCE_FILE_LICENSE ${PROJECT_SOURCE_DIR}/LICENSE.txt)
+set(CPACK_RESOURCE_FILE_README ${PROJECT_SOURCE_DIR}/README.md)
+include(CPack)
\ No newline at end of file
diff --git a/LICENSE b/LICENSE.txt
index 11c45b7..11c45b7 100644
--- a/LICENSE
+++ b/LICENSE.txt
diff --git a/src/YtdlpWrapper.hpp b/include/YtdlpWrapper.hpp
index 9ee2410..9ee2410 100644
--- a/src/YtdlpWrapper.hpp
+++ b/include/YtdlpWrapper.hpp
diff --git a/src/invapi.hpp b/include/invapi.hpp
index 3fb4c05..3fb4c05 100644
--- a/src/invapi.hpp
+++ b/include/invapi.hpp
diff --git a/src/sqliteinterface.hpp b/include/sqliteinterface.hpp
index cc4adb4..cc4adb4 100644
--- a/src/sqliteinterface.hpp
+++ b/include/sqliteinterface.hpp
diff --git a/src/tui.hpp b/include/tui.hpp
index 112135c..112135c 100644
--- a/src/tui.hpp
+++ b/include/tui.hpp
diff --git a/src/video.hpp b/include/video.hpp
index fd57d0b..456eda9 100644
--- a/src/video.hpp
+++ b/include/video.hpp
@@ -5,31 +5,49 @@
 #include <vector>
 #include <nlohmann/json.hpp>
 
+
+///
+/// \brief Video namespace.
+/// Contains the format, thumbnail, and video structs. 
+///
 namespace Video {
 
+    ///
+    /// \brief Format structure.
+    /// This saves a video format, with the necessary url and information.
+    ///
     struct format {
     
-        std::string format;
+        std::string format; /**< Name of the format provided by Youtube */
         std::string url;
         std::string vcodec;
         std::string acodec;
-        std::string ext;
-        std::optional<float> quality;
+        std::string ext; /**< File Extention */
+        std::optional<float> quality; 
         std::optional<std::string> resolution;
         std::optional<int> height;
         std::optional<int> width;
     };
 
+    ///
+    /// \brief Thumbnail structure.
+    /// This saves a video thumbnail, with the necessary url and information.
+    ///
     struct thumbnail {
 
         std::string url;
-        int preference;
+        int preference; /**< The lower the prefrence, the worse the quality */
         std::string id;
         std::optional<std::string> resolution;
         std::optional<int> height;
         std::optional<int> width;
     };
 
+    ///
+    /// \brief Video structure.
+    /// The video structure will be used to store video objects, and will be used to
+    /// save to DB, and as a common format between invidious.io and yt-dlp.
+    ///
     struct video {
 
         std::string id;
diff --git a/src/main.cpp b/src/main.cpp
index 1bac482..ea955f0 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -18,11 +18,11 @@
 #include <sys/wait.h>
 #endif
 
-#include "tui.hpp"
-#include "video.hpp"
-#include "invapi.hpp"
-#include "YtdlpWrapper.hpp"
-#include "sqliteinterface.hpp"
+#include <tui.hpp>
+#include <video.hpp>
+#include <invapi.hpp>
+#include <YtdlpWrapper.hpp>
+#include <sqliteinterface.hpp>
 
 
 // namespace py = pybind11;
@@ -137,7 +137,7 @@ int main(int argc, char **argv) {
 
     // validateStructConversions();
     parseSysArgs(argc, argv);
-    // SqliteInterface sqldb;
+    SqliteInterface sqldb;
     // InvidiousApi invapi("https://httpbin.org/get");
     // invapi.test();
 }
\ No newline at end of file
00:53:03 +0100 committer James Booth <boothj5@gmail.com> 2016-05-06 00:53:03 +0100 Rename jabber_ functions' href='/danisanti/profani-tty/commit/tests/unittests/xmpp/stub_xmpp.c?id=88f423afea539bb7c1faa970d989d3e858d874f6'>88f423af ^
31b0f0b0 ^
164620f4 ^



31b0f0b0 ^
164620f4 ^
3bb1f124 ^
5be9ac32 ^
4683395a ^
5be9ac32 ^

3bb1f124 ^
5be9ac32 ^
a5db791d ^
5be9ac32 ^

88f423af ^
5be9ac32 ^
a5db791d ^
5be9ac32 ^

88f423af ^
5be9ac32 ^



2b7894cc ^

4c913aa0 ^
579d0620 ^
4c913aa0 ^



b8c94376 ^
6ce8edc1 ^
b8c94376 ^



8764e596 ^
5c6f5ba0 ^


5be9ac32 ^
fb68d442 ^
419f37fe ^


57c75644 ^
419f37fe ^

fb68d442 ^
2ff6873c ^


57c75644 ^
2ff6873c ^

fb68d442 ^
e45afd5c ^



1b0ce852 ^
fb68d442 ^
e69f9475 ^


5be9ac32 ^









8ee2cdad ^
72bdae10 ^


5be9ac32 ^


6b830277 ^
5be9ac32 ^










a52e3ea1 ^
5be9ac32 ^



c31913f8 ^
aa4ffa7e ^





5be9ac32 ^

c20e38a4 ^
2b7894cc ^
c20e38a4 ^

c20e38a4 ^
acd2d230 ^
c20e38a4 ^
5be9ac32 ^






48f9f3b3 ^

5be9ac32 ^
7db1bcee ^
e571ccd8 ^
7db1bcee ^

e571ccd8 ^
7db1bcee ^

5be9ac32 ^


1b0ce852 ^
5be9ac32 ^


b11d3a79 ^

5be9ac32 ^






714faeb2 ^
84506cba ^
5be9ac32 ^





26d160ca ^
6138a5f7 ^
94b0d2c6 ^
26a18294 ^
c9f6a78f ^

5be9ac32 ^

4de570b1 ^

80eb5bee ^
5be9ac32 ^




80eb5bee ^
623fbe9e ^
a978bb12 ^



5be9ac32 ^


3487100c ^



4683395a ^
5be9ac32 ^








3487100c ^
4683395a ^
5be9ac32 ^






08860628 ^
5be9ac32 ^
a5db791d ^
5be9ac32 ^

a52e3ea1 ^
5be9ac32 ^





a871ad80 ^






6559263b ^




5be9ac32 ^

a871ad80 ^









8326c8b3 ^
b8c94376 ^















a52e3ea1 ^
b8c94376 ^




1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321