Skip to content

Commit

Permalink
fix: minor fixes for selfhosting (#196)
Browse files Browse the repository at this point in the history
  • Loading branch information
Codixer authored Nov 26, 2023
1 parent 99e7c0e commit b1e9f21
Show file tree
Hide file tree
Showing 4 changed files with 71 additions and 58 deletions.
118 changes: 62 additions & 56 deletions README → README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# What is Craig?
Craig is a multi-track voice recorder for Discord. Craig is divided into three
components: The actual recording bot, the web page (for downloading
recordings), and the audio processing scripts.
Expand All @@ -16,68 +17,73 @@ ffmpeg-worker-craig.js.

The audio processing scripts require the following command-line tools:

ffmpeg ( http://ffmpeg.org/ ) compiled with libopus support
flac ( https://xiph.org/flac/ )
oggenc ( https://xiph.org/vorbis/ )
opusenc ( http://opus-codec.org/ )
fdkaac ( https://github.com/nu774/fdkaac )
zip and unzip ( http://infozip.org/ )
- ffmpeg ( http://ffmpeg.org/ ) compiled with libopus support
- flac ( https://xiph.org/flac/ )
- oggenc ( https://xiph.org/vorbis/ )
- opusenc ( http://opus-codec.org/ )
- fdkaac ( https://github.com/nu774/fdkaac )
- zip and unzip ( http://infozip.org/ )

Various components of the audio processing scripts require compilation or
translation:
```sh
cd cook
for i in *.c; do gcc -O3 -o ${i%.c} $i; done
for i in *.svg; do inkscape -e ${i%.svg}.png $i; done
for i in *.svg; do inkscape -o ${i%.svg}.png $i; done
```

The self extractors require compilation if you want them:
```sh
cd windows; make
cd macosx; make

Finally, the avatar stuff requires ImageMagick.

If you want EnnuiCastr (browser-based recording) support, you must set
config.ennuicastr to the web address, which must be on the same host as Craig.
EnnuiCastr requires no further modification to work with Craig.

If you want Ennuizel (browser-based processing) support, you must make it
available at the location linked from the downloader (dl.php), and run ces.sh
in ennuicastr/server.

More information on Craig can be found at
https://craig.chat/


Craig can integrate with other tools (largely also by Yahweasel) to provide
improved functionality.

EnnuiCastr ( https://github.com/Yahweasel/ennuicastr/ ) is a browser-based
audio capture tool which records more reliably than Discord, and can be used to
get higher-quality audio if config.ennuicastr is set to an appropriate URL.

Ennuizel ( https://github.com/Yahweasel/ennuizel/ ) is a browser-based audio
editor which can provide audio processing features too heavy to put on the
server. The 'ennuizel' directory here is the associated client plugin for
Ennuizel as well as the server component, only required when combining Ennuizel
with Craig.


No documentation is provided for running your own instances of Craig. A user
has kindly added an installation guide to the wiki on github at
https://github.com/Yahweasel/craig/wiki , but note that this is not maintained
by the author of Craig.

RUNNING CRAIG IS NOT LIKE RUNNING ANY OTHER BOT. MOST OF THE COMPLEXITY OF
CRAIG IS NOT IN THE BOT ITSELF, BUT IN THE AUDIO PROCESSING.

IF YOU ARE NOT FAMILIAR WITH C AND UNIX, DO NOT WASTE YOUR TIME OR MINE. IF YOU
DELUDE YOURSELF INTO THINKING YOU WILL HOST CRAIG ON WINDOWS, DO NOT WASTE YOUR
TIME OR MINE. CRAIG IS NOT MERELY BUILT FOR UNIX, CRAIG IS BUILT ON THE UNIX
PHILOSOPHY.

"THIS ONE TIME I RAN A LINUX VM" IS NOT SUFFICIENT. "I CAN USE PUTTY" WON'T CUT
IT. IF THE WORD "WINDOWS" DOESN'T MAKE YOUR SKIN CRAWL, YOU ARE NOT THE KIND OF
PERSON WHO WILL SUCCEED IN RUNNING CRAIG.

If you're familiar with C and Unix, it shouldn't be too difficult to get your
own Craig working. Yahweasel is generally happy to help if you have the
requisite background.
```

Finally, the avatar stuff requires ImageMagick.

If you want EnnuiCastr (browser-based recording) support, you must set
config.ennuicastr to the web address, which must be on the same host as Craig.
EnnuiCastr requires no further modification to work with Craig.

If you want Ennuizel (browser-based processing) support, you must make it
available at the location linked from the downloader (dl.php), and run ces.sh
in ennuicastr/server.

More information on Craig can be found at
https://craig.chat/


Craig can integrate with other tools (largely also by Yahweasel) to provide
improved functionality.

EnnuiCastr ( https://github.com/Yahweasel/ennuicastr/ ) is a browser-based
audio capture tool which records more reliably than Discord, and can be used to
get higher-quality audio if config.ennuicastr is set to an appropriate URL.

Ennuizel ( https://github.com/Yahweasel/ennuizel/ ) is a browser-based audio
editor which can provide audio processing features too heavy to put on the
server. The 'ennuizel' directory here is the associated client plugin for
Ennuizel as well as the server component, only required when combining Ennuizel
with Craig.


No documentation is provided for running your own instances of Craig. A user
has kindly added an installation guide to the wiki on github at
https://github.com/Yahweasel/craig/wiki , but note that this is not maintained
by the author of Craig.

RUNNING CRAIG IS NOT LIKE RUNNING ANY OTHER BOT. MOST OF THE COMPLEXITY OF
CRAIG IS NOT IN THE BOT ITSELF, BUT IN THE AUDIO PROCESSING.

IF YOU ARE NOT FAMILIAR WITH C AND UNIX, DO NOT WASTE YOUR TIME OR MINE. IF YOU
DELUDE YOURSELF INTO THINKING YOU WILL HOST CRAIG ON WINDOWS, DO NOT WASTE YOUR
TIME OR MINE. CRAIG IS NOT MERELY BUILT FOR UNIX, CRAIG IS BUILT ON THE UNIX
PHILOSOPHY.

"THIS ONE TIME I RAN A LINUX VM" IS NOT SUFFICIENT. "I CAN USE PUTTY" WON'T CUT
IT. IF THE WORD "WINDOWS" DOESN'T MAKE YOUR SKIN CRAWL, YOU ARE NOT THE KIND OF
PERSON WHO WILL SUCCEED IN RUNNING CRAIG.

If you're familiar with C and Unix, it shouldn't be too difficult to get your
own Craig working. Yahweasel is generally happy to help if you have the
requisite background.

3 changes: 2 additions & 1 deletion apps/download/.env.example
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
API_PORT=3000
API_PORT=5029
API_HOST=127.0.0.1
API_HOMEPAGE=https://craig.chat/
ENNUIZEL_BASE=https://ez.craig.horse/
TRUST_PROXY=
Expand Down
6 changes: 6 additions & 0 deletions apps/tasks/config/_default.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@ module.exports = {
skipUsers: []
},

microsoft: {
clientId: '',
clientSecret: '',

Check warning on line 26 in apps/tasks/config/_default.js

View workflow job for this annotation

GitHub Actions / Lint source code

Delete `·`
redirect: ''
},

downloads: {
expiration: 24 * 60 * 60 * 1000,
path: '../download/downloads'
Expand Down
2 changes: 1 addition & 1 deletion scripts/buildCook.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
SCRIPTBASE=`dirname "$0"`
SCRIPTBASE=`realpath "$SCRIPTBASE"`
cd "$SCRIPTBASE/../cook"
for i in *.c; do gcc -O3 -o ${i%.c} $i; done && for i in *.svg; do inkscape -e ${i%.svg}.png $i; done
for i in *.c; do gcc -O3 -o ${i%.c} $i; done && for i in *.svg; do inkscape -o ${i%.svg}.png $i; done

0 comments on commit b1e9f21

Please sign in to comment.