Skip to content

Commit

Permalink
Merge 183b130 into 47b6625
Browse files Browse the repository at this point in the history
  • Loading branch information
alexsavio committed Jul 10, 2018
2 parents 47b6625 + 183b130 commit b155a90
Show file tree
Hide file tree
Showing 12 changed files with 18 additions and 97 deletions.
5 changes: 5 additions & 0 deletions CONTRIBUTING.md
Expand Up @@ -14,6 +14,11 @@ New categories should be proposed in a [GitHub issue](https://github.com/pyjokes
- Gender neutrality (mix of he/she/they)
- No assumption of gender or sexuality
- No racism
- No sexism
- No political jokes
- No jokes about physical or mental ability
- No jokes about physical appearances
- No jokes about mental illnesses

## Technical Issues

Expand Down
3 changes: 1 addition & 2 deletions README.rst
Expand Up @@ -24,7 +24,6 @@ Once installed, simply call `pyjoke` from the command line or add it to your .ba
Use the `-c` flag to get jokes from a specific category. Options::

-c neutral [default] (neutral geek jokes)
-c adult (adult geek jokes)
-c chuck (Chuck Norris geek jokes)
-c all (all jokes)
-c twister (Tongue-twister)
Expand Down Expand Up @@ -53,7 +52,7 @@ Jokes:
* `Martin O'Hanlon`_
* `Graham Markall`_
* `Andreas Reinle`_


Contributing
============
Expand Down
4 changes: 2 additions & 2 deletions docs/api.md
Expand Up @@ -13,7 +13,7 @@ Returns a random joke from the given category in the given language.
| Parameters | Types | Values | Default |
| ---------- | ----- | ------ | ------- |
| language | str | 'en', 'de', 'es', 'gl' , 'eus'| 'en' |
| category | str | 'neutral', 'adult', 'chuck', 'all' | 'neutral' |
| category | str | 'neutral', 'chuck', 'all' | 'neutral' |

Return type: str

Expand All @@ -28,7 +28,7 @@ Returns a list of jokes from the given category in the given language.
| Parameters | Types | Values | Default |
| ---------- | ----- | ------ | ------- |
| language | str | 'en', 'de', 'es', 'gl', 'eus' | 'en' |
| category | str | 'neutral', 'adult', 'chuck', 'all' | 'neutral' |
| category | str | 'neutral', 'chuck', 'all' | 'neutral' |

Return type: list

Expand Down
28 changes: 1 addition & 27 deletions pyjokes/jokes_de.py
Expand Up @@ -5,19 +5,15 @@
"Ein Beamter zum anderen: 'Was haben die Leute nur, wir tun doch nichts'.",
"Wenn ein Yogalehrer seine Beine senkrecht nach oben streckt und dabei furzt, welche Yoga Figur stellt er da? Eine Duftkerze.",
u"Frage: Was ist das beste geschenkt für trump? Antwort : klopapier was soll man einem arschloch denn sonst schenken",
"Warum freut sich eine Blondine so, wenn sie ein Puzzle nach 6 Monaten fertig hat?... Weil auf der Packung steht: 2-4 Jahre.",
"Sitzen 2 Polen im Auto, kommt die Polizei: 'Wir suchen 2 Autodiebe.' Schauen sich die Polen an: 'Wir machen's.'",
"Ich wollte Spiderman anrufen, aber er hatte kein Netz.",
"Sitzen 2 Bomben im Keller. Sagt die eine: 'Komm, lass hoch gehen.'",
u"Wie nennt man einen übergewichtigen Vegetarier? Biotonne",
u"Wie nennt man jemand der so tut als würde er etwas werfen? Einen Scheinwerfer.",
"Was steht auf dem Grabstein einer Putzfrau? 'Sie wird nie wieder kehren.'",
u"Abwasser ist ein Thema, das unbedingt geklärt werden muss.",
u"Warum ging der Luftballon kaputt? Aus Platzgründen.",
"Was steht auf dem Grabstein eines Spanners? 'Der ist weg vom Fenster.'",
u"Warum können Geister so schlecht lügen? Weil sie so leicht zu durchschauen sind.",
"Bei Adidas wurde eingebrochen. Was macht die Polizei? Sie schickt 3 Streifen.",
"Was machen zwei Polen auf dem Eis? Einbrechen.",
"Egal wie dicht du bist, Goethe war Dichter.",
"Wie war die Stimmung in der DDR ? Sie hielt sich in Grenzen",
u"Auch im Osten trägt man Westen.",
Expand Down Expand Up @@ -65,33 +61,13 @@
"Auf dem Standesamt:'Sagen Sie, Herr Zufall, sind Sie sicher, dass Sie Ihren Sohn 'Rainer' nennen wollen?'",
u"Fährt ein Mann zur Tankstelle:'Wieviel kostet ein Tropfen Benzin ?''Nichts''Also, dann tropfen Sie mir bitte den Tank voll !'",
]
adult = [
u"Ein Pärchen beim Sex. Sie fängt an zu stöhnen: 'Jaa, gib's mir.' Sag mir dreckige Sachen! 'Er:' Küche, Bad, Wohnzimmer ",
"Angeklagter, was dachten Sie sich, als sie der Frau unter den Rock griffen?? Mir frisst ein Pferd aus der Hand. ",
u"Was versteht man unter einem Gentleman? Einen Herrn, der, bevor er die Dame küßt, die Zigarette aus dem Mund nimmt! ",
"Frau beim Sex: 'Was jetzt, raus oder rein!'",
"Wie wechselt ein Dinosaurier den Tampon? Na, ganz einfach. Altes Schaf raus, neues Schaf rein... ",
"Nach dem Sex im Bett: 'Frau:' 'Woran denkst du?''Mann:''Kennst du nicht!'",
"Treffen sich zwei Freunde.'Stell dir vor,' ich habe heute Morgen meine Frau mit Oralverkehr geweckt.'Und, was hat sie gesagt?''Laff daff!'",
u"Warum haben Politiker Hornhaut an den Eiern? 'Weil Lügen kurze Beine1 hat.'",
"Was sagt man, wenn ein Spanner gestorben ist? Der ist weg vom Fenster!",
u"'Herr Doktor, alle sagen ich sei nymphoman'.'Ja, liebe Frau, bevor ich eine Diagnose stelle, müssen Sie aber bitte meinen Penis loslassen'.",
u"Die Stewardess zum Fluggast: 'Wie wünschen Sie Ihre Eier zum Lunch, Mr. Smith? Gebraten, roh oder gekocht?', 'Gestreichelt!'",
u"Was haben ein Schäferhund und ein kurzsichtiger Gynäkologe gemeinsam? Eine feuchte Nase",
u"Das stand in einer Jugendzeitschrift: Junges Mädchen mit Pferdeschwanz sucht Junge mit gleichen Eigenschaften!",
"Ich habe versucht, ohne Sex und Alkohol zu leben. Es war die schlimmste Viertelstunde meines Lebens.",
u"Wie funktioniert der Öko-Vibrator? Hummel im Bambusrohr...",
"Was liegt in der Ecke und klappert? Pinoccio beim onanieren... ",
"Hast du schon gewusst, dass man vom Onanieren taub werden kann? Wie bitte?",
]
chuck = [
u"Chuck Norris streichelt keine Tiere, die Tiere streicheln sich selbst, wenn er in der Nähe ist",
u"Chuck Norris braucht die Toilette nicht zu spülen. Er sagt einfach Buh! und schon haut die Scheiße von alleine ab.",
u"Chuck Norris verwählt sich nicht. Wenn du abhebst, warst du am falschen Telefon.",
u"Chuck Norris hat einen Grizzlybär-Teppich. Der Bär lebt, hat bloß Angst, sich zu bewegen.",
"Wenn Chuck Norris mit nassen Fingern an der Steckdose rumfummelt, kriegt das Kraftwerk einen Schlag.",
"Chuck Norris kann mit Durchfall furzen.",
"Chuck Norris klaut den Polen die Autos.",
u"Wenn Chuck Norris einen Raum betritt, stehen sogar die Stühle auf!",
"Chuck Norris hat bei Burgerking einen Big Mac bestellt - und hat ihn ohne Wiederworte bekommen",
u"Chuck Norris war bereits auf dem Mars. Das ist der Grund dafür, warum es dort kein Leben mehr gibt.",
Expand Down Expand Up @@ -121,7 +97,6 @@
u"Chuck Norris hat keine Herzattacken. Kein Herz wäre so verrückt Chuck zu attackieren."
"Chuck Norris kann einen Hut aus einem Hasen zaubern.",
"Besser mit Chuck Norris teilen als von Chuck Norris geteilt zu werden. ",
u"Chuck Norris spielte GTA 5. Er tötet 45 Menschen, klaut 21 Autos und tut es mit 7 Prostituierten ......während das Spiel lädt!.",
u"Chuck Norris war in der Hölle. Der Teufel ist vor Angst gestorben.",
"Warum weinen Kinder wenn sie auf die Welt kommen, weil sie wissen dass sie eine Welt mit Chuck Norris betreten haben.",
"Chuck Norris ist der Einzige, der die Zeit wirklich totschlagen kann.",
Expand Down Expand Up @@ -181,8 +156,7 @@

jokes_de = {
'neutral': neutral,
'all': neutral + adult + chuck + twister,
'adult': adult,
'all': neutral + chuck + twister,
'chuck': chuck,
'twister': twister
}
18 changes: 1 addition & 17 deletions pyjokes/jokes_en.py
Expand Up @@ -101,7 +101,6 @@
"What does 'Emacs' stand for? 'Exclusively used by middle aged computer scientists.'",
"What does PyJokes's jokes have in common with Adobe Flash? They get updated all the time, but they don't get any better.",
"How many demosceners are needed to change a lightbulb? Half. With a full one there is no challenge.",
"Did you hear the one about the guy with the broken hearing aid? Neither did he.",
"What do you call a fly without wings? A walk.",
"When my wife told me to stop impersonating a flamingo, I had to put my foot down.",
"What do you call someone with no nose? Nobody knows.",
Expand All @@ -119,20 +118,6 @@
]


adult = [
"Programming is like sex: One mistake and you have to support it for the rest of your life.",
"Software is like sex: It's better when it's free.",
"Software is like sex: It's never REALLY free.",
"There are 10 types of people: those who understand binary, and those who get laid.",
"Why programmers like UNIX: unzip, strip, touch, finger, grep, mount, fsck, more, yes, fsck, fsck, fsck, umount, sleep",
"If your mom was a collection class, her insert method would be public.",
"Your momma's so fat that not even Dijkstra is able to find a shortest path around her.",
"C++ - where your friends have access to your private members.",
"The only intuitive user interface is the nipple. After that, it's all learned.",
"What's the difference between software development and sex? In sex, you don't get a bonus for releasing early.",
"Your momma's so fat, the recursive function calculating her mass causes a stack overflow.",
]

"""
Jokes from The Internet Chuck Norris DB (ICNDB) (http://www.icndb.com/) - provided under CC BY-SA 3.0
http://api.icndb.com/jokes/
Expand Down Expand Up @@ -246,7 +231,6 @@

jokes_en = {
'neutral': neutral,
'adult': adult,
'chuck': chuck,
'all': neutral + adult + chuck,
'all': neutral + chuck,
}
16 changes: 1 addition & 15 deletions pyjokes/jokes_es.py
@@ -1,9 +1,7 @@
# -*- coding: utf-8 -*-

neutral = [
#'Se abre el ascensor y hay un programador dentro, le preguntan: - Sube o baja? A lo que el programador responde: - Si.',
'Se abre el ascensor y hay un programador dentro, le preguntan: - Sube o baja? A lo que el programador responde: - Si.',
#'Que le dice un bit al otro? Nos vemos en el bus.',
'Que le dice un bit al otro? Nos vemos en el bus.',
'Atracador: El dinero o la vida! Programador: Lo siento, soy programador. Atracador: Y? Programador: No tengo dinero ni vida.',
'Que es un terapeuta? - 1024 Gigapeutas',
Expand All @@ -19,19 +17,7 @@
'En que se diferencian Windows y un virus? En que el virus funciona, y es gratis.'
]

adult = [
#'Que es una mujer objeto? Un instancia de una mujer con clase',
#'- Cuantos dalmatas habia en la peli? - 101. - Por el culo te la hinco!',
#'Encuentran programador muerto en la ducha con un bote de champu: "enjabonar, aclarar y vuelta a empezar"',
#'Esto es un mainframe que le dice a un PC: "tan pequeno y ya "computas"?'
'Que es una mujer objeto? Un instancia de una mujer con clase',
'- Cuantos dalmatas habia en la peli? - 101. - Por el culo te la hinco!',
'Encuentran programador muerto en la ducha con un bote de champu: "enjabonar, aclarar y vuelta a empezar"',
'Esto es un mainframe que le dice a un PC: "tan pequeno y ya "computas"?'
]

jokes_es = {
'neutral': neutral,
'adult': adult,
'all': neutral + adult,
'all': neutral,
}
7 changes: 1 addition & 6 deletions pyjokes/jokes_eu.py
Expand Up @@ -8,12 +8,7 @@
'Matematika liburu batek bere buruaz beste egin zuen...zergatik? Problema asko zituelako.'
]

adult = [
'',
]

jokes_eu = {
'neutral': neutral,
'adult': adult,
'all': neutral + adult,
'all': neutral,
}
10 changes: 1 addition & 9 deletions pyjokes/jokes_gl.py
Expand Up @@ -17,15 +17,7 @@
'En que se diferencian Windows e un virus? En que o virus funciona, e e gratis.'
]

adult = [
'Que e unha muller obxecto? Unha instancia dunha muller con clase',
'- Cantos dalmatas habia na peli? - 101. - Polo cu cha finco!',
'Atopan programador morto na ducha cun bote de champu: "enxaboar, aclarar e repetir"',
'Isto e un mainframe que lle di a un PC: "Tan pequeno e xa "computas"?"'
]

jokes_gl = {
'neutral': neutral,
'adult': adult,
'all': neutral + adult,
'all': neutral,
}
16 changes: 1 addition & 15 deletions pyjokes/jokes_it.py
Expand Up @@ -80,19 +80,6 @@
"Quanti demosceners sono necessari per cambiare una lampadina? Meta`. Con uno intero non ci sono sfide.",
]


adult = [
"La programmazione e` come il sesso: un solo errore e devi supportarlo per il resto della tua vita.",
"Il software e` come il sesso: E` meglio quando e` gratis.",
"Il software e` come il sesso: Non e` mai VERAMENTE libero.",
"Ci sono 10 tipi di persone: quelle che comprendono il binario e quelle che si fanno scopare.",
"Perche` ai programmatori piace UNIX: unzip, strip, touch, finger, grep, mount, fsck, more, yes, fsck, fsck, fsck, umount, sleep.",
"Tua mamma e` cosi` grassa che nemmeno Dijkstra e` in grado di trovare un percorso piu` breve intorno a lei.",
"L'unica interfaccia utente intuitiva e` il capezzolo. Dopo hai dovuto imparare tutto.",
"Qual e` la differenza tra lo sviluppo del software e il sesso? Nel sesso, non si ottiene un bonus per il rilascio anticipato.",
"Tua mamma e` cosi` grassa che la funzione ricorsiva che calcola la sua massa causa un overflow dello stack.",
]

"""
Jokes from The Internet Chuck Norris DB (ICNDB) (http://www.icndb.com/) - provided under CC BY-SA 3.0
http://api.icndb.com/jokes/
Expand Down Expand Up @@ -190,7 +177,6 @@

jokes_it = {
'neutral': neutral,
'adult': adult,
'chuck': chuck,
'all': neutral + adult + chuck,
'all': neutral + chuck,
}
4 changes: 2 additions & 2 deletions pyjokes/pyjokes.py
Expand Up @@ -31,7 +31,7 @@ def get_jokes(language='en', category='neutral'):
Parameters
----------
category: str
Choices: 'neutral', 'adult', 'chuck', 'all', 'twister'
Choices: 'neutral', 'chuck', 'all', 'twister'
lang: str
Choices: 'en', 'de', 'es', 'gl', 'eu', 'it'
Expand All @@ -56,7 +56,7 @@ def get_joke(language='en', category='neutral'):
Parameters
----------
category: str
Choices: 'neutral', 'adult', 'chuck', 'all', 'twister'
Choices: 'neutral', 'chuck', 'all', 'twister'
lang: str
Choices: 'en', 'de', 'es', 'gl', 'eu', 'it'
Expand Down
2 changes: 1 addition & 1 deletion scripts/pyjoke
Expand Up @@ -13,7 +13,7 @@ def create_argparser():
parser.add_argument(
'-c', '--category',
dest='category',
choices=['neutral', 'adult', 'chuck', 'all', 'twister'],
choices=['neutral', 'chuck', 'all', 'twister'],
default='neutral',
help='Joke category.'
)
Expand Down
2 changes: 1 addition & 1 deletion tests/test_get_joke.py
Expand Up @@ -4,7 +4,7 @@


languages = ['en', 'de', 'es', 'gl', 'eu', 'it']
categories = ['neutral', 'adult', 'all']
categories = ['neutral', 'all']
test_data = ['', 'abc', '123']


Expand Down

0 comments on commit b155a90

Please sign in to comment.