forked from root/threadr.lostcave.ddnss.de
Compare commits
No commits in common. "reset" and "master" have entirely different histories.
|
@ -1,4 +1 @@
|
||||||
*.swp
|
*.swp
|
||||||
|
|
||||||
/build/*
|
|
||||||
!/build/.placeholder
|
|
||||||
|
|
95
README.md
95
README.md
|
@ -1,27 +1,16 @@
|
||||||
# Welcome to ThreadR
|
# Welcome to ThreadR
|
||||||
|
|
||||||
This is the source code for the ThreadR Forum Engine.
|
This is the source code for the ThreadR Forum Engine.
|
||||||
|
|
||||||
The project originated as a school project with the goal of developing
|
The project originated as a school project with the goal of developing a mix between a forum engine and a social media platform. When school was over, we left the project up for some time with the general intention to continue working on it until I took it down after an extended period of inactivity to host my own website on my server.
|
||||||
a mix between a forum engine and a social media platform.
|
|
||||||
When school was over, we left the project up for some time with the
|
|
||||||
general intention to continue working on it until I took it down after
|
|
||||||
an extended period of inactivity to host my own website on my server.
|
|
||||||
|
|
||||||
Now, that it is being revived, the original scope of the project
|
Now, that it is being revived, the original scope of the project doesn’t really make sense anymore (at least to me) so it needs to shift slightly. Below is a list of goals that I would like to see achieved, feel free to discuss this in the issues or commit comments.
|
||||||
doesn’t really make sense anymore (at least to me) so it needs to shift
|
|
||||||
slightly.
|
|
||||||
Below is a list of goals that I would like to see achieved, feel free
|
|
||||||
to discuss this in the issues or commit comments.
|
|
||||||
|
|
||||||
- [x] come back online (see issue #2)
|
- [x] come back online (see issue #2)
|
||||||
- [x] go FOSS (make the source code publicly available under a FOSS license (see issue #5))
|
- [x] go FOSS (make the source code publicly available under a FOSS license (see issue #5))
|
||||||
- [x] make the code portable so everyone can set up their own instance
|
- [x] make the code portable so everyone can set up their own instance
|
||||||
- [ ] get generic forum functionality going (sign-up, creation of boards, creation of threads within boards, messages, profiles)
|
- [ ] get generic forum functionality going (sign-up, creation of boards, creation of threads within boards, messages, profiles)
|
||||||
|
|
||||||
Once these two are given, here are some additional goals both from
|
Once these two are given, here are some additional goals both from the original scope of the project as well as my own ideas. Input is welcome.
|
||||||
the original scope of the project as well as my own ideas.
|
|
||||||
Input is welcome.
|
|
||||||
|
|
||||||
- [ ] anonymous posts (users can choose to post anonymously, registered users will have a unique name per thread that stays the same so users can tell each other apart)
|
- [ ] anonymous posts (users can choose to post anonymously, registered users will have a unique name per thread that stays the same so users can tell each other apart)
|
||||||
- [ ] subscribing to threads
|
- [ ] subscribing to threads
|
||||||
|
@ -33,22 +22,14 @@ Input is welcome.
|
||||||
|
|
||||||
\- BodgeMaster
|
\- BodgeMaster
|
||||||
|
|
||||||
UPDATE: The ThreadR Forum Engine is now technically host-independent.
|
UPDATE: The ThreadR Forum Engine is now technically host-independent. By default, it still contains the configuration for our local instance but all host-dependent stup information is configurable now. It is still heavily WIP.
|
||||||
By default, it still contains the configuration for our test instance
|
|
||||||
but all host-dependent setup information is configurable now.
|
|
||||||
It is still heavily WIP.
|
|
||||||
|
|
||||||
# Installation
|
# Installation
|
||||||
|
First of all, keep in mind that the ThreadR Forum Engine is still in early development and things are subject to change.
|
||||||
|
|
||||||
First of all, keep in mind that the ThreadR Forum Engine is still
|
For now, the only way to set up an instance is doing it the manual way; automatic setup will be added in the future.
|
||||||
in early development and things are subject to change.
|
|
||||||
|
|
||||||
For now, the only way to set up an instance is doing it the manual way;
|
|
||||||
automatic setup might be added in the future.
|
|
||||||
|
|
||||||
This setup guide is assuming that you are on a UNIX-like system
|
|
||||||
and have the following already installed and set up properly:
|
|
||||||
|
|
||||||
|
This setup guide is assuming that you are on a UNIX-like system and have the following already installed and set up properly:
|
||||||
- Apache with PHP (will most likely also work on other web servers)
|
- Apache with PHP (will most likely also work on other web servers)
|
||||||
- MySQL or MariaDB
|
- MySQL or MariaDB
|
||||||
- Python 3
|
- Python 3
|
||||||
|
@ -100,12 +81,9 @@ Database tables:
|
||||||
- `verified` (boolean or tinyint(1), default 0)
|
- `verified` (boolean or tinyint(1), default 0)
|
||||||
|
|
||||||
# Git based automatic web deployment system
|
# Git based automatic web deployment system
|
||||||
This repository will be automagically pulled by the test server
|
This repository will be automagically pulled by the web server each time something is pushed by a user.
|
||||||
each time something is pushed by a user.
|
|
||||||
|
|
||||||
Dear Developers,
|
Dear Developers, Please use pushes sparingly because it takes a while for the server to replace all code variables.
|
||||||
Please use pushes sparingly because it takes a while for the server
|
|
||||||
to replace all code variables.
|
|
||||||
|
|
||||||
What this thing does basically equates to:
|
What this thing does basically equates to:
|
||||||
```
|
```
|
||||||
|
@ -119,65 +97,40 @@ cd web-deployment
|
||||||
exit
|
exit
|
||||||
logout
|
logout
|
||||||
```
|
```
|
||||||
TBD: Remove this section when the ThreadR project moves to its final home
|
TBD: Remove this section when the ThreadR project moves to its final home and this repository is only used for our local setup.
|
||||||
and this repository is only used for our local setup.
|
|
||||||
|
|
||||||
## Symlinks
|
## Symlinks
|
||||||
The following files and directories are linked to areas where they can be
|
The following files and directories are linked to areas where they can be accessed by the web server:
|
||||||
accessed by the web server:
|
|
||||||
* `build/` → `threadr.lostcave.ddnss.de/` (all files acessible by the web server, READMEs get deleted on deployment)
|
* `build/` → `threadr.lostcave.ddnss.de/` (all files acessible by the web server, READMEs get deleted on deployment)
|
||||||
|
|
||||||
# Individual documentation for each file
|
# Individual documentation for each file
|
||||||
|
|
||||||
### [[DIR] src](./src)
|
### [[DIR] src](./src)
|
||||||
|
|
||||||
This folder contains all the files that are parts of ThreadR directly
|
This folder contains all the files that are parts of ThreadR directly
|
||||||
|
|
||||||
### [[DIR] build](./build)
|
### [[DIR] build](./build)
|
||||||
|
Placeholder folder to link against, will be deleted and recreated by the deployment script, contains the a working instance of ThreadR after successful execution of the deployment script
|
||||||
Placeholder folder to link against, will be deleted and recreated by
|
|
||||||
the deployment script, contains the a working instance of ThreadR after
|
|
||||||
successful execution of the deployment script
|
|
||||||
|
|
||||||
### [[DIR] config](./config)
|
### [[DIR] config](./config)
|
||||||
|
A place to store the configuation for a specific ThreadR instance (contains official instance config for now, will be moved elsewhere eventually)
|
||||||
A place to store the configuation for a specific ThreadR instance
|
|
||||||
(contains official instance config for now, will be removed and replaced
|
|
||||||
with a generic config eventually)
|
|
||||||
|
|
||||||
### [[DIR] macros](./macros)
|
### [[DIR] macros](./macros)
|
||||||
|
|
||||||
files for use with variable_grabbler.py
|
files for use with variable_grabbler.py
|
||||||
|
|
||||||
### [deployment_script.sh](./deployment_script.sh)
|
### [deployment_script.sh](./deployment_script.sh)
|
||||||
|
This script is executed each time (or most of the time) the repository gets pushed.
|
||||||
This script is executed each time (or most of the time) the repository
|
It contains the commands to execute the code variable replcement system and some other useful tasks.
|
||||||
gets pushed. It contains the commands to execute the code variable
|
Its working directory is the root of the git repository.
|
||||||
replcement system and some other useful tasks. Its working directory is
|
|
||||||
the root of the git repository.
|
|
||||||
|
|
||||||
### [LICENSE.md](./LICENSE.md)
|
### [LICENSE.md](./LICENSE.md)
|
||||||
|
|
||||||
A copy of the Apache 2.0 license, the license this project is under
|
A copy of the Apache 2.0 license, the license this project is under
|
||||||
|
|
||||||
### [NOTICE](./NOTICE)
|
### [NOTICE](./NOTICE)
|
||||||
|
|
||||||
Copyright notice in plain text format
|
Copyright notice in plain text format
|
||||||
|
|
||||||
### [README.md](./README.md)
|
### [README.md](./README.md)
|
||||||
|
|
||||||
this file
|
this file
|
||||||
|
|
||||||
### [variable_grabbler.py](./variable_grabbler.py)
|
### [variable_grabbler.py](./variable_grabbler.py)
|
||||||
|
Custom macro processor, takes two arguments: macro declaration file and the file to be processed
|
||||||
|
|
||||||
Custom macro processor, takes two arguments:
|
Macros in code are strings of capitalized characters prefixed and suffixed with %.
|
||||||
- macro declaration file
|
|
||||||
- the file to be processed
|
|
||||||
|
|
||||||
Macros in code are strings of capitalized characters prefixed and
|
|
||||||
suffixed with %.
|
|
||||||
|
|
||||||
Macro definition format: JSON
|
Macro definition format: JSON
|
||||||
- "<MACRO>":"<text>" → direct replacement
|
"<MACRO>":"<text>" → direct replacement
|
||||||
- "<MACRO>":["file","<file path>"] → insert file
|
"<MACRO>":["file","<file path>"] → insert file
|
||||||
- "<MACRO>":["exec","<command>"] → run command and insert its output from stdout
|
"<MACRO>":["exec","<command>"] → run command and insert its output from stdout
|
||||||
|
|
||||||
|
~~NOTICE: This file (or rather a more up-to-date version of it) will be moved to a new repository containing the deployment system.~~
|
||||||
|
I haven’t exactly figured out how to handle this in the future. It is absolutely necessary to deploy a ThreadR instance because it is used to configure ThreadR so we need a copy of it here.
|
||||||
|
|
|
@ -0,0 +1,6 @@
|
||||||
|
# Placeholder
|
||||||
|
This directory is here as a placeholder for the build process.
|
||||||
|
|
||||||
|
# Files
|
||||||
|
### [README.md](./README.md)
|
||||||
|
this file
|
|
@ -5,11 +5,12 @@ echo "Deployment script for repository \"web-deployment\"
|
||||||
|
|
||||||
# activate ** globs
|
# activate ** globs
|
||||||
if [ -n "`shopt globstar | grep off`" ]; then shopt -s globstar; fi
|
if [ -n "`shopt globstar | grep off`" ]; then shopt -s globstar; fi
|
||||||
|
# remove READMEs
|
||||||
|
rm ./src/**/README.md
|
||||||
# prepare build directory tree and static files
|
# prepare build directory tree and static files
|
||||||
rm -r ./build
|
rm -r ./build
|
||||||
cp -r ./src ./build
|
cp -r ./src ./build
|
||||||
rm ./build/**/{README.md,*.{php,html,css,svg}}
|
rm ./build/**/*.{php,html,css,svg}
|
||||||
touch ./build/.placeholder
|
|
||||||
|
|
||||||
# run the macro handler
|
# run the macro handler
|
||||||
echo "`cd src; find -name "*.php" -or -name "*.html" -or -name "*.css" -or -name "*.svg" | sed 's/^/file=/;s/$/\; python3 variable_grabbler.py macros\/pass0\*.json src\/$file | python3 variable_grabbler.py macros\/pass1\*.json - | python3 variable_grabbler.py macros\/pass2\*.json - | python3 variable_grabbler.py macros\/pass3\*.json - > build\/$file/'`" | bash -
|
echo "`cd src; find -name "*.php" -or -name "*.html" -or -name "*.css" -or -name "*.svg" | sed 's/^/file=/;s/$/\; python3 variable_grabbler.py macros\/pass0\*.json src\/$file | python3 variable_grabbler.py macros\/pass1\*.json - | python3 variable_grabbler.py macros\/pass2\*.json - | python3 variable_grabbler.py macros\/pass3\*.json - > build\/$file/'`" | bash -
|
||||||
|
|
Loading…
Reference in New Issue