From 15b3424c72fb3af3eb47e00eeee27730e8fa0b75 Mon Sep 17 00:00:00 2001 From: Roland Reichwein Date: Mon, 7 Nov 2022 20:00:55 +0100 Subject: Added textarea, config (WIP) --- Makefile | 2 +- config.cpp | 11 +++++++++++ config.h | 11 +++++++++++ html/index.html | 39 +++------------------------------------ whiteboard.conf | 3 +++ whiteboard.cpp | 3 +++ 6 files changed, 32 insertions(+), 37 deletions(-) create mode 100644 config.cpp create mode 100644 config.h create mode 100644 whiteboard.conf diff --git a/Makefile b/Makefile index 8891bc7..2d14170 100755 --- a/Makefile +++ b/Makefile @@ -27,7 +27,7 @@ endif LIBS=-lfcgi -lboost_filesystem INCLUDES=-I. -HEADERS=file.h +HEADERS=file.h config.h SOURCES=$(HEADERS:.h=.cpp) OBJECTS=$(HEADERS:.h=.o) TARGETS=whiteboard.fcgi diff --git a/config.cpp b/config.cpp new file mode 100644 index 0000000..a3fcf3c --- /dev/null +++ b/config.cpp @@ -0,0 +1,11 @@ +#include "config.h" + +Config::Config(): m_dataPath{"/var/lib/whiteboard"} +{ + // TODO: read /etc/whiteboard.conf xml +} + +std::string Config::getDataPath() +{ + return m_dataPath; +} diff --git a/config.h b/config.h new file mode 100644 index 0000000..523b54d --- /dev/null +++ b/config.h @@ -0,0 +1,11 @@ +#include + +class Config +{ +private: + std::string m_dataPath; + +public: + Config(); + std::string getDataPath(); +}; diff --git a/html/index.html b/html/index.html index 3b23e90..780660a 100644 --- a/html/index.html +++ b/html/index.html @@ -3,48 +3,15 @@ - - DownTube + + Reichwein Whiteboard
-

- -

- Download internet videos as MP3 (audio) or MP4 (video). -

- -

- Video URL:
-

-

- -

- Transform to format:
- -
- -
-

- -
-
 
-

- -

- -
-
-
-
-
-
-

- Note: Audio download is currently limited to 30MB, Video download is limited to 300MB. -

+

Contact

diff --git a/whiteboard.conf b/whiteboard.conf new file mode 100644 index 0000000..d269e46 --- /dev/null +++ b/whiteboard.conf @@ -0,0 +1,3 @@ + + /home/ernie/code/whiteboard/data + diff --git a/whiteboard.cpp b/whiteboard.cpp index 1cf8354..cecee9e 100644 --- a/whiteboard.cpp +++ b/whiteboard.cpp @@ -17,6 +17,7 @@ #include #include +#include "config.h" #include "file.h" namespace pt = boost::property_tree; @@ -59,6 +60,8 @@ namespace { int main(void) { + Config config; + int result = FCGX_Init(); if (result != 0) { // error on init fprintf(stderr, "Error: FCGX_Init()\n"); -- cgit v1.2.3