doing some repo cleanup
parent
6dd3cad6a6
commit
116be618a0
|
@ -89,6 +89,14 @@ your local timezone yet. here are some
|
|||
</ul>
|
||||
|
||||
|
||||
<h3>dependencies</h3>
|
||||
|
||||
<ul>
|
||||
<li><a href="https://pypi.python.org/pypi/mistune">mistune</a></li>
|
||||
<li><a href="https://pypi.python.org/pypi/inflect">inflect</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h3>future features</h3>
|
||||
|
||||
<p>these are a few ideas being kicked around, or under active development:</p>
|
||||
|
|
|
@ -72,6 +72,11 @@ this.**
|
|||
your local timezone yet. here are some
|
||||
[timezone setting instructions](http://www.cyberciti.biz/faq/linux-unix-set-tz-environment-variable/)
|
||||
|
||||
### dependencies
|
||||
|
||||
* [mistune](https://pypi.python.org/pypi/mistune)
|
||||
* [inflect](https://pypi.python.org/pypi/inflect)
|
||||
|
||||
### future features
|
||||
|
||||
these are a few ideas being kicked around, or under active development:
|
||||
|
|
|
@ -1,59 +0,0 @@
|
|||
#!/usr/bin/python
|
||||
|
||||
'''
|
||||
ttbp: tilde town blogging platform
|
||||
(also known as the feels engine)
|
||||
a console-based blogging program developed for tilde.town
|
||||
copyright (c) 2016 ~endorphant (endorphant@tilde.town)
|
||||
|
||||
chatter.py:
|
||||
some text processing utilities
|
||||
|
||||
GNU GPL BOILERPLATE:
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
the complete codebase is available at:
|
||||
https://github.com/modgethanc/ttbp
|
||||
'''
|
||||
|
||||
import os
|
||||
|
||||
import random
|
||||
import json
|
||||
import os
|
||||
|
||||
SOURCE = os.path.join("/home", "endorphant", "projects", "ttbp")
|
||||
langfile = open(os.path.join(SOURCE, "lib", "lang.json"), 'r')
|
||||
LANG = json.load(langfile)
|
||||
langfile.close()
|
||||
|
||||
def say(keyword):
|
||||
'''
|
||||
takes a keyword and randomly returns from language dictionary to match that keyword
|
||||
|
||||
returns None if keyword doesn't exist
|
||||
|
||||
TODO: validate keyword?
|
||||
'''
|
||||
|
||||
return random.choice(LANG.get(keyword))
|
||||
|
||||
def month(num):
|
||||
'''
|
||||
takes a MM and returns lovercase full name of that month
|
||||
|
||||
TODO: validate num?
|
||||
'''
|
||||
|
||||
return LANG["months"].get(num)
|
3130
bin/inflect.py
3130
bin/inflect.py
File diff suppressed because it is too large
Load Diff
1154
bin/mistune.py
1154
bin/mistune.py
File diff suppressed because it is too large
Load Diff
|
@ -1,39 +0,0 @@
|
|||
{
|
||||
"greet":[
|
||||
"hi",
|
||||
"hey",
|
||||
"howdy",
|
||||
"good morning",
|
||||
"good afternoon",
|
||||
"good day",
|
||||
"good evening",
|
||||
"welcome back",
|
||||
"nice to see you"
|
||||
],
|
||||
"bye":[
|
||||
"see you later, space cowboy",
|
||||
"bye, townie",
|
||||
"until next time, friend",
|
||||
"come back whenever"
|
||||
],
|
||||
"friend":[
|
||||
"friend",
|
||||
"pal",
|
||||
"buddy",
|
||||
"townie"
|
||||
],
|
||||
"months":{
|
||||
"01":"january",
|
||||
"02":"february",
|
||||
"03":"march",
|
||||
"04":"april",
|
||||
"05":"may",
|
||||
"06":"june",
|
||||
"07":"july",
|
||||
"08":"august",
|
||||
"09":"september",
|
||||
"10":"october",
|
||||
"11":"november",
|
||||
"12":"december"
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue