-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit f501c26
Showing
9 changed files
with
387 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
[ | ||
{ | ||
"caption":"EddyMalou LoremIpsum", | ||
"children": | ||
[ | ||
{"command": "malou", "caption": "default size", "args":{"nb":1}}, | ||
{"command": "malou-xs", "caption": "xs size", "args":{"nb":1}}, | ||
{"command": "malou-sm", "caption": "sm size", "args":{"nb":2}}, | ||
{"command": "malou-md", "caption": "md size", "args":{"nb":3}}, | ||
{"command": "malou-lg", "caption": "lg size", "args":{"nb":4}} | ||
] | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
[ | ||
{ "keys": ["alt+shift+m"], "command": "malou" }, | ||
{ "keys": ["tab"], "command": "malou", "context": | ||
[ | ||
{ "key": "preceding_text", "operator": "regex_contains", "operand": ".*\\b(malou|malou-xs|malou-sm|malou-md|malou-lg)$", "match_all": true } | ||
] | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
[ | ||
{ "keys": ["alt+shift+m"], "command": "malou" }, | ||
{ "keys": ["tab"], "command": "malou", "context": | ||
[ | ||
{ "key": "preceding_text", "operator": "regex_contains", "operand": ".*\\b(malou|malou-xs|malou-sm|malou-md|malou-lg)$", "match_all": true } | ||
] | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
[ | ||
{ "keys": ["alt+shift+m"], "command": "malou" }, | ||
{ "keys": ["tab"], "command": "malou", "context": | ||
[ | ||
{ "key": "preceding_text", "operator": "regex_contains", "operand": ".*\\b(malou|malou-xs|malou-sm|malou-md|malou-lg)$", "match_all": true } | ||
] | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
[ | ||
{ | ||
"id":"edit", | ||
"children": | ||
[ | ||
{ | ||
"id":"text", | ||
"children": | ||
[ | ||
{ | ||
"caption":"EddyMalou LoremIpsum", | ||
"children": | ||
[ | ||
{"command": "malou", "caption": "Default size", "args":{"nb":1}}, | ||
{"command": "malou", "caption": "XS size", "args":{"nb":1}}, | ||
{"command": "malou", "caption": "SM size", "args":{"nb":2}}, | ||
{"command": "malou", "caption": "MD size", "args":{"nb":3}}, | ||
{"command": "malou", "caption": "LG size", "args":{"nb":4}} | ||
] | ||
} | ||
] | ||
} | ||
] | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
[ | ||
|
||
{ | ||
"caption": "EddyMalou: default size", | ||
"command": "malou", | ||
"args": {"nb": 1 } | ||
}, | ||
|
||
{ | ||
"caption": "EddyMalou: XS size", | ||
"command": "malou-xs", | ||
"args": {"nb": 1 } | ||
}, | ||
|
||
{ | ||
"caption": "EddyMalou: SM size", | ||
"command": "malou-sm", | ||
"args": {"nb": 2 } | ||
}, | ||
|
||
{ | ||
"caption": "EddyMalou: MD size", | ||
"command": "malou-md", | ||
"args": {"nb": 3 } | ||
}, | ||
|
||
{ | ||
"caption": "EddyMalou: LG size", | ||
"command": "malou-lg", | ||
"args": {"nb": 4 } | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
import sublime | ||
import sublime_plugin | ||
import random | ||
import json | ||
from os.path import dirname, realpath | ||
|
||
class MalouCommand(sublime_plugin.TextCommand): | ||
|
||
dictionary = [] | ||
sizes_json = { | ||
"malou-xs": 1, | ||
"malou-sm": 2, | ||
"malou-md": 3, | ||
"malou-lg": 4, | ||
} | ||
sizes_list = ["malou-xs", "malou-sm", "malou-md", "malou-lg"] | ||
|
||
def makeParagraph(self, size): | ||
|
||
number = self.sizes_json[size] | ||
|
||
paragraph = "" | ||
|
||
for i in range(number): | ||
paragraph += random.choice (self.dictionary['sentences_1']) + " " | ||
paragraph += random.choice (self.dictionary['sentences_2']) + " " | ||
paragraph += random.choice (self.dictionary['sentences_3']) + " " | ||
paragraph += random.choice (self.dictionary['sentences_4']) + " " | ||
paragraph += random.choice (self.dictionary['sentences_5']) + " " | ||
paragraph += random.choice (self.dictionary['sentences_6']) + " " | ||
paragraph += random.choice (self.dictionary['sentences_7']) | ||
paragraph += random.choice (self.dictionary['sentences_8']) + ". " | ||
return paragraph[:-1] | ||
|
||
def run(self, edit, nb=1): | ||
|
||
nb=nb-1 | ||
|
||
package_path = dirname(realpath(__file__)) | ||
file = package_path + "/dictionary.json" | ||
with open(file, 'r', encoding='utf8') as data_file: | ||
self.dictionary = json.load(data_file) | ||
|
||
selects = self.view.sel() | ||
for select in selects: | ||
|
||
sizes = ['malou-xs', 'malou-sm', 'malou-md', 'malou-lg'] | ||
|
||
default = sublime.Region(select.begin() - 5, select.begin()) | ||
size = sublime.Region(select.begin() - 8, select.begin()) | ||
|
||
current_text = self.view.substr(size).lower() | ||
|
||
if current_text == 'malou': | ||
txt = str(self.makeParagraph('malou-xs')) | ||
self.view.erase(edit, default) | ||
select = sublime.Region(default.begin()) | ||
elif current_text in sizes: | ||
txt = str(self.makeParagraph(current_text)) | ||
self.view.erase(edit, size) | ||
select = sublime.Region(size.begin()) | ||
else: | ||
txt = str(self.makeParagraph(self.sizes_list[nb])) | ||
self.view.erase(edit, select) | ||
|
||
self.view.insert(edit, select.begin(), txt) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,196 @@ | ||
{ | ||
"sentences_1":[ | ||
"Chapitre abstrait 3 du conpendium :", | ||
"C’est à dire ici, c’est le contraire, au lieu de panacée,", | ||
"Au nom de toute la communauté des savants,", | ||
"Lorsqu’on parle de tous ces points de vues,", | ||
"C’est à dire quand on parle de ces rollers,", | ||
"Quand on parle de relaxation,", | ||
"Nous n’allons pas seulement danser ou jouer au football,", | ||
"D'une manière ou d'une autre,", | ||
"Quand on prend les triangles rectangles,", | ||
"Se consolidant dans le système de insiding et outsiding,", | ||
"Lorsque l'on parle des végétaliens, du végétalisme,", | ||
"Contre la morosité du peuple,", | ||
"Tandis que la politique est encadrée par des scientifiques issus de Sciences Po et Administratives,", | ||
"On ne peut pas parler de politique administrative scientifique,", | ||
"Pour emphysiquer l'animalculisme,", | ||
"Comme la coumbacérie ou le script de Aze,", | ||
"Vous avez le système de check-up vers les anti-valeurs, vous avez le curuna, or", | ||
"La convergence n’est pas la divergence,", | ||
"L’émergence ici c’est l’émulsion, c’est pas l’immersion donc", | ||
"Imbiber, porter", | ||
"Une semaine passée sans parler du peuple c’est errer sans abri, autrement dit", | ||
"Actuellement,", | ||
"Parallèlement,", | ||
"Mesdames et messieurs fidèles," | ||
], | ||
|
||
"sentences_2":[ | ||
"la cosmogonisation", | ||
"l'activisme", | ||
"le système", | ||
"le rédynamisme", | ||
"l'ensemble des 5 sens", | ||
"la société civile", | ||
"la politique", | ||
"la compétence", | ||
"le colloque", | ||
"la contextualisation", | ||
"la congolexicomatisation", | ||
"la congolexicomatisation", | ||
"la congolexicomatisation", | ||
"la congolexicomatisation", | ||
"la prédestination", | ||
"la force", | ||
"la systématique", | ||
"l'ittérativisme", | ||
"le savoir", | ||
"l'imbroglio", | ||
"la concertation politique", | ||
"la délégation", | ||
"la pédagogie", | ||
"la réflexologie" | ||
], | ||
|
||
"sentences_3":[ | ||
"vers la compromettance pour des saint-bioules", | ||
"vers ce qu’on appelle la dynamique des sports", | ||
"de la technicité informatisée", | ||
"de la Théorie Générale des Organisations", | ||
"autour de la Géo Physique Spatiale", | ||
"purement technique", | ||
"des lois du marché", | ||
"de l'orthodoxisation", | ||
"inter-continentaliste", | ||
"à l'égard de la complexité", | ||
"éventualiste sous cet angle là", | ||
"de toute la République Démocratique du Congo", | ||
"à l'incognito", | ||
"autour de l'ergonométrie", | ||
"indispensable(s) en science et culture", | ||
"autour de phylogomènes généralisés", | ||
"à forciori,", | ||
"par rapport aux diplomaties" | ||
], | ||
|
||
"sentences_4":[ | ||
"tend à", | ||
"nous pousse à", | ||
"fait allusion à", | ||
"va", | ||
"doit", | ||
"consiste à", | ||
"nous incite à", | ||
"vise à", | ||
"semble", | ||
"est censé(e)", | ||
"paraît", | ||
"peut", | ||
"s'applique à", | ||
"consent à", | ||
"continue à", | ||
"invite à", | ||
"oblige à", | ||
"parvient à", | ||
"pousse à", | ||
"se résume à", | ||
"suffit à", | ||
"se résoud à", | ||
"sert à", | ||
"tarde à" | ||
], | ||
|
||
"sentences_5":[ | ||
"incristaliser", | ||
"imposer", | ||
"intentionner", | ||
"mettre un accent sur", | ||
"tourner", | ||
"informatiser", | ||
"aider", | ||
"défendre", | ||
"gérer", | ||
"prévaloir", | ||
"vanter", | ||
"rabibocher", | ||
"booster", | ||
"porter d'avis sur ce qu'on appelle", | ||
"cadrer", | ||
"se baser sur", | ||
"effaceter", | ||
"réglementer", | ||
"régler", | ||
"faceter", | ||
"partager", | ||
"uniformiser", | ||
"défendre", | ||
"soutenir", | ||
"propulser", | ||
"catapulter", | ||
"établir" | ||
], | ||
|
||
"sentences_6":[ | ||
"les interchanges", | ||
"mes frères propres", | ||
"les revenus", | ||
"cette climatologie", | ||
"une discipline", | ||
"la nucléarité", | ||
"l'upensmie", | ||
"les sens dynamitiels", | ||
"la renaissance africaine", | ||
"l'estime du savoir", | ||
"une kermesse", | ||
"une certaine compétitivité", | ||
"cet environnement de 2 345 410 km²", | ||
"le kilométrage", | ||
"le conpemdium", | ||
"la quatripartie", | ||
"les encadrés", | ||
"le point adjacent", | ||
"la bijectivité", | ||
"le panafricanisme", | ||
"ce système phénoménal", | ||
"le système de Guipoti : 1/B+1/B’=1/D", | ||
"une position axisienne", | ||
"les grabuses lastiques", | ||
"le chicouangue", | ||
"le trabajo, le travail, la machinale, la robotisation", | ||
"les quatre carrés fous du fromage" | ||
], | ||
|
||
"sentences_7":[ | ||
"autour des dialogues intercommunautaires", | ||
"provenant d'une dynamique syncronique", | ||
"vers le monde entier", | ||
"propre(s) aux congolais", | ||
"vers Lovanium", | ||
"vers l'humanisme", | ||
"comparé(e)(s) la rénaque", | ||
"autour des gens qui connaissent beaucoup de choses", | ||
"possédant la francophonie", | ||
"dans ces prestances", | ||
"off-shore", | ||
"dans Kinshasa", | ||
"dans la sous-régionalité", | ||
"dans le prémice", | ||
"belvédère", | ||
"avec la formule 1+(2x5)", | ||
"axé(e)(s) sur la réalité du terrain", | ||
"dans les camps militaires non-voyants", | ||
"avéré(e)(s)", | ||
"comme pour le lancement de Troposphère V" | ||
], | ||
|
||
"sentences_8":[ | ||
", tu sais ça", | ||
", c’est clair", | ||
", je vous en prie", | ||
", merci", | ||
", mais oui", | ||
", Bonne Année", | ||
", bonnes fêtes" | ||
] | ||
} |
Oops, something went wrong.