Skip to content

Commit 0a2747f

Browse files
committed
Initial commit
0 parents commit 0a2747f

25 files changed

+1861
-0
lines changed

.gitignore

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
.metadata
2+
bin/
3+
tmp/
4+
.gradle/
5+
lib/
6+
*.tmp
7+
*.bak
8+
*.swp
9+
*~.nib
10+
*.json
11+
.DS_Store
12+
local.properties
13+
.settings/
14+
.loadpath
15+
.recommenders
16+
17+
# External tool builders
18+
.externalToolBuilders/
19+
20+
# Locally stored "Eclipse launch configurations"
21+
*.launch
22+
23+
# PyDev specific (Python IDE for Eclipse)
24+
*.pydevproject
25+
26+
# CDT-specific (C/C++ Development Tooling)
27+
.cproject
28+
29+
# CDT- autotools
30+
.autotools
31+
32+
# Java annotation processor (APT)
33+
.factorypath
34+
35+
# PDT-specific (PHP Development Tools)
36+
.buildpath
37+
38+
# sbteclipse plugin
39+
.target
40+
41+
# Tern plugin
42+
.tern-project
43+
44+
# TeXlipse plugin
45+
.texlipse
46+
47+
# STS (Spring Tool Suite)
48+
.springBeans
49+
50+
# Code Recommenders
51+
.recommenders/
52+
53+
# Annotation Processing
54+
.apt_generated/
55+
.apt_generated_test/
56+
57+
# Scala IDE specific (Scala & Java development for Eclipse)
58+
.cache-main
59+
.scala_dependencies
60+
.worksheet
61+
62+
# Uncomment this line if you wish to ignore the project description file.
63+
# Typically, this file would be tracked if it contains build/dependency configurations:
64+
#.project

LICENSE

Lines changed: 619 additions & 0 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# AutoCF
2+
AutoCF stands for "Automated Content Farm" and is an application that creates videos from comments on Reddit threads. This is in response to a proliferation of videos featuring Reddit comments read by TTS on YouTube.
3+
4+
With AutoCF, you can automate the creation of these low quality videos.
5+
6+
7+
## Installation
8+
You can run AutoCF by doing the following:
9+
```
10+
git clone https://github.com/DataPools/AutoCF
11+
cd AutoCF
12+
./gradlew run
13+
```
14+
This will install all necessary dependencies and run it.
15+
16+
## Config
17+
18+
AutoCF can be configured through it's `config.json` file. The config is generated after it is run for the first time.
19+
20+
Inside this file are options for the Reddit thread's post id, the maximum amount of posts you want to show, and the amount of time (in seconds) until an ending screen is shown.
21+
22+
## TTS
23+
AutoCF only works on OS X, because it has a built in TTS engine. Currently, Windows/Linux do not have narrator support.
24+
25+
## Contributing
26+
27+
Pull Requests are welcome. The following still need to be done:
28+
* Make the comments look more like actual Reddit.
29+
* Clean up any Reddit markdown edge cases, as JRAW gives the comment's unformatted raw text
30+
* Add cross-platform narrator support
31+
32+
## License
33+
34+
This project is licensed under GPLv3.

assets/arrows.png

6.46 KB
Loading

assets/benton-sans-regular.ttf

72.3 KB
Binary file not shown.

build.gradle

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
import org.apache.tools.ant.taskdefs.condition.Os
2+
3+
plugins {
4+
id 'java'
5+
id 'application'
6+
id 'com.stehno.natives' version '0.2.4'
7+
}
8+
ext {
9+
javaLanguageLevel = '1.8'
10+
lwjglVersion = "2.9.3"
11+
12+
libraries = [
13+
lwjgl: "org.lwjgl.lwjgl:lwjgl:$lwjglVersion"
14+
]
15+
}
16+
17+
version = '0.1.0'
18+
sourceSets.main.java.srcDirs = ['src']
19+
mainClassName = 'ui.ACFRenderer'
20+
21+
repositories {
22+
jcenter()
23+
mavenCentral()
24+
}
25+
26+
dependencies {
27+
compile 'com.google.code.gson:gson:2.8.6'
28+
compile 'ca.weblite:java-objc-bridge:1.0.0'
29+
compile 'net.dean.jraw:JRAW:1.1.0'
30+
compile 'com.github.davidmoten:word-wrap:0.1.6'
31+
compile 'org.slick2d:slick2d-core:1.0.1'
32+
compile "org.lwjgl.lwjgl:lwjgl:$lwjglVersion"
33+
}
34+
35+
natives {
36+
lwjglVersion = "2.9.3"
37+
def os = getOS()
38+
println "Unpacking natives for $os to ./build/natives/$os"
39+
jars = [
40+
"lwjgl-platform-$lwjglVersion-natives-osx",
41+
"lwjgl-platform-$lwjglVersion-natives-windows",
42+
"lwjgl-platform-$lwjglVersion-natives-linux" ]
43+
platforms = "$os"
44+
}
45+
46+
run {
47+
dependsOn 'unpackNatives'
48+
systemProperty 'java.library.path', file("build/natives/${getOS()}")
49+
}
50+
51+
test {
52+
maxHeapSize = "1024m"
53+
jvmArgs '-XX:MaxPermSize=256m'
54+
systemProperty 'java.library.path', file("build/natives/${getOS()}")
55+
}
56+
57+
def getOS() {
58+
if (Os.isFamily(Os.FAMILY_WINDOWS)) {
59+
return 'win'
60+
}
61+
if (Os.isFamily(Os.FAMILY_MAC)) {
62+
return 'osx'
63+
}
64+
if (Os.isFamily(Os.FAMILY_UNIX))
65+
return 'linux' //this is not really all that correct
66+
throw new GradleException('Your OS does not seem to be supported')
67+
}
68+
69+
task checkOS {
70+
println "Operating System: ${getOS()}"
71+
}
72+
task wrapper(type: Wrapper) {
73+
gradleVersion = '2.7'
74+
}

gradle/wrapper/gradle-wrapper.jar

52.4 KB
Binary file not shown.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#Tue Apr 14 13:22:30 PDT 2020
2+
distributionBase=GRADLE_USER_HOME
3+
distributionPath=wrapper/dists
4+
zipStoreBase=GRADLE_USER_HOME
5+
zipStorePath=wrapper/dists
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-2.7-bin.zip

gradlew

Lines changed: 160 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,160 @@
1+
#!/usr/bin/env bash
2+
3+
##############################################################################
4+
##
5+
## Gradle start up script for UN*X
6+
##
7+
##############################################################################
8+
9+
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
10+
DEFAULT_JVM_OPTS=""
11+
12+
APP_NAME="Gradle"
13+
APP_BASE_NAME=`basename "$0"`
14+
15+
# Use the maximum available, or set MAX_FD != -1 to use that value.
16+
MAX_FD="maximum"
17+
18+
warn ( ) {
19+
echo "$*"
20+
}
21+
22+
die ( ) {
23+
echo
24+
echo "$*"
25+
echo
26+
exit 1
27+
}
28+
29+
# OS specific support (must be 'true' or 'false').
30+
cygwin=false
31+
msys=false
32+
darwin=false
33+
case "`uname`" in
34+
CYGWIN* )
35+
cygwin=true
36+
;;
37+
Darwin* )
38+
darwin=true
39+
;;
40+
MINGW* )
41+
msys=true
42+
;;
43+
esac
44+
45+
# Attempt to set APP_HOME
46+
# Resolve links: $0 may be a link
47+
PRG="$0"
48+
# Need this for relative symlinks.
49+
while [ -h "$PRG" ] ; do
50+
ls=`ls -ld "$PRG"`
51+
link=`expr "$ls" : '.*-> \(.*\)$'`
52+
if expr "$link" : '/.*' > /dev/null; then
53+
PRG="$link"
54+
else
55+
PRG=`dirname "$PRG"`"/$link"
56+
fi
57+
done
58+
SAVED="`pwd`"
59+
cd "`dirname \"$PRG\"`/" >&-
60+
APP_HOME="`pwd -P`"
61+
cd "$SAVED" >&-
62+
63+
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
64+
65+
# Determine the Java command to use to start the JVM.
66+
if [ -n "$JAVA_HOME" ] ; then
67+
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
68+
# IBM's JDK on AIX uses strange locations for the executables
69+
JAVACMD="$JAVA_HOME/jre/sh/java"
70+
else
71+
JAVACMD="$JAVA_HOME/bin/java"
72+
fi
73+
if [ ! -x "$JAVACMD" ] ; then
74+
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
75+
76+
Please set the JAVA_HOME variable in your environment to match the
77+
location of your Java installation."
78+
fi
79+
else
80+
JAVACMD="java"
81+
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
82+
83+
Please set the JAVA_HOME variable in your environment to match the
84+
location of your Java installation."
85+
fi
86+
87+
# Increase the maximum file descriptors if we can.
88+
if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
89+
MAX_FD_LIMIT=`ulimit -H -n`
90+
if [ $? -eq 0 ] ; then
91+
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
92+
MAX_FD="$MAX_FD_LIMIT"
93+
fi
94+
ulimit -n $MAX_FD
95+
if [ $? -ne 0 ] ; then
96+
warn "Could not set maximum file descriptor limit: $MAX_FD"
97+
fi
98+
else
99+
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
100+
fi
101+
fi
102+
103+
# For Darwin, add options to specify how the application appears in the dock
104+
if $darwin; then
105+
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
106+
fi
107+
108+
# For Cygwin, switch paths to Windows format before running java
109+
if $cygwin ; then
110+
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
111+
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
112+
JAVACMD=`cygpath --unix "$JAVACMD"`
113+
114+
# We build the pattern for arguments to be converted via cygpath
115+
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
116+
SEP=""
117+
for dir in $ROOTDIRSRAW ; do
118+
ROOTDIRS="$ROOTDIRS$SEP$dir"
119+
SEP="|"
120+
done
121+
OURCYGPATTERN="(^($ROOTDIRS))"
122+
# Add a user-defined pattern to the cygpath arguments
123+
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
124+
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
125+
fi
126+
# Now convert the arguments - kludge to limit ourselves to /bin/sh
127+
i=0
128+
for arg in "$@" ; do
129+
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
130+
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
131+
132+
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
133+
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
134+
else
135+
eval `echo args$i`="\"$arg\""
136+
fi
137+
i=$((i+1))
138+
done
139+
case $i in
140+
(0) set -- ;;
141+
(1) set -- "$args0" ;;
142+
(2) set -- "$args0" "$args1" ;;
143+
(3) set -- "$args0" "$args1" "$args2" ;;
144+
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
145+
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
146+
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
147+
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
148+
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
149+
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
150+
esac
151+
fi
152+
153+
# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
154+
function splitJvmOpts() {
155+
JVM_OPTS=("$@")
156+
}
157+
eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
158+
JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
159+
160+
exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"

0 commit comments

Comments
 (0)