parent:
6ce3325da73b127b091eb9c52687ae74ae8bc6dd
Nick Mykins <nick.mykins@gmail.com>
2014-10-18T18:53:02-04:00
change names of some stuff
diff --git a/generator.py b/generator.py
new file mode 100644
index 0000000000000000000000000000000000000000..99da161509743ad6c54d283735dae79b10507762
--- /dev/null
+++ b/generator.py
@@ -0,0 +1,165 @@
+from flask import Flask, render_template
+from random import choice, sample
+app = Flask(__name__)
+
+FIRSTS = [
+'Abstract',
+'AnnotationMethod',
+'Application',
+'Aspect',
+'Base',
+'Configurable',
+'Data',
+'Default',
+'Generic',
+'Mock',
+'Mutable',
+'Namespace',
+'Simple',
+'Sql',
+'Invalid',
+'Internal',
+'Jdbc',
+'Standard',
+'Transaction']
+
+MIDDLES = [
+'ContextAware',
+'Frame',
+'Factory',
+'Auto',
+'Meta',
+'PostProcessing',
+'Http',
+'Bound',
+'Element',
+'Pdf',
+'Reflective',
+'Refreshable',
+'Hashable',
+'Regexp',
+'Method',
+'Value',
+'Type',
+'Stateless',
+'Theme',
+'Entry',
+'Window',
+'Config',
+'Session',
+'ASync',
+'Byte',
+'Caching',
+'Char',
+'Array',
+'List',
+'Xml',
+'Streaming',
+'Multipart',
+'Throttle',
+'Parallel',
+'Service',
+'Task',
+'Trigger',
+'Binding',
+'Remote',
+'ToString',
+'Enum',
+'Style',
+'IO',
+'DependsOn',
+'Embedded',
+'Database',
+'Client',
+'Service',
+'Expected',
+'Proxy',
+'Jax',
+'Name',
+'Request',
+'Pooled',
+'Json',
+'Parameterized',
+'NonTransient',
+'Instanceof',
+'ParamAware',
+'Socket',
+'Sequence',
+'Undefined',
+'Loader',
+'Invocation',
+'Timed',
+'Method',
+'MaxValue',
+'MinValue',
+'Url',
+'Resource',
+'Pattern',
+'Help',
+'Entity',
+'Invocation',
+'Extracting',
+'Servlet',
+'Script',
+'ResultSet',
+'Scope',
+'Application',
+'Mail',
+'Throwaway',
+'Connection',
+'Node',
+'Static',
+'Procedure',
+'Labeled',
+'Toolbox',
+'Command',
+'View',
+'Model',
+'Feed',
+'Manual']
+
+LASTS = [
+'Logger',
+'Handler',
+'Exception',
+'Adapter',
+'Factory',
+'Bean',
+'Context',
+'Resolver',
+'Detector',
+'Advisor',
+'Interceptor',
+'Translator',
+'PostProcessor',
+'TaskExecutor',
+'Controller',
+'Loader',
+'Module',
+'Scope',
+'Override',
+'Descriptor',
+'Configurer',
+'Utils',
+'Generator',
+'Expression',
+'Wrapper',
+'Chain',
+'Dispatcher',
+'Validator',
+'Literal',
+'Tag',
+'Dao',
+'Daemon',
+'Template']
+
+@app.route("/")
+def main():
+ class_name = generate_class_name()
+ return render_template('index.html', class_name=class_name)
+
+def generate_class_name():
+ return choice(FIRSTS) + ''.join(sample(MIDDLES, 4)) + choice(LASTS)
+
+if __name__ == "__main__":
+ app.run()
diff --git a/templates/index.html b/templates/index.html
new file mode 100644
index 0000000000000000000000000000000000000000..503e63d89246ec57167299697d818339b9518044
--- /dev/null
+++ b/templates/index.html
@@ -0,0 +1,5 @@
+<title>java classname generator</title>
+<link rel=stylesheet type=text/css href="{{ url_for('static', filename='style.css') }}">
+<div class=class_name>
+ <p>{{class_name}}
+</div>