A Swiss Army knife for developers.
C# blazorcross-platformcsharpdesktopdesktop-appdesktop-applicationdeveloper-toolsextensiblefluentfluent-designlinuxmacosmicasyntax-highlightingtypescriptwindowswindows-10windows-11winui
Ported Lorem Ipsum generator to DevToys 2.0 (#1004)
Etienne BAUDOUX9f410d5ce4a1
diff --git a/src/app/dev/DevToys.Tools/Assets/Lipsums/LICENSE.MD b/src/app/dev/DevToys.Tools/Assets/Lipsums/LICENSE.MDnew file mode 100644index 000000000..a1c97e383--- /dev/null+++ b/src/app/dev/DevToys.Tools/Assets/Lipsums/LICENSE.MD@@ -0,0 +1,21 @@+The MIT License++Copyright (c) 2007 Alex Pendleton++Permission is hereby granted, free of charge, to any person obtaining a copy+of this software and associated documentation files (the "Software"), to deal+in the Software without restriction, including without limitation the rights+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell+copies of the Software, and to permit persons to whom the Software is+furnished to do so, subject to the following conditions:++The above copyright notice and this permission notice shall be included in+all copies or substantial portions of the Software.++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN+THE SOFTWARE.\ No newline at end of filediff --git a/src/app/dev/DevToys.Tools/Assets/Lipsums/childharold.xml b/src/app/dev/DevToys.Tools/Assets/Lipsums/childharold.xmlnew file mode 100644index 000000000..8d7edf9bd--- /dev/null+++ b/src/app/dev/DevToys.Tools/Assets/Lipsums/childharold.xml@@ -0,0 +1,109 @@+<?xml version="1.0" encoding="utf-8"?>++<!-- This is a template file for custom lipsum texts -->+<lipsum>+ <copyright>This text is under public domain</copyright>+ <title>Childe Harold's Pilgrimage - Canto the first (I.-X.)</title>+ <author>Lord Byron</author>+ <text>+ oh thou in hellas deemed of heavenly birth+ muse formed or fabled at the minstrels will+ since shamed full oft by later lyres on earth+ mine dares not call thee from thy sacred hill+ yet there ive wandered by thy vaunted rill+ yes sighed oer delphis longdeserted shrine+ where save that feeble fountain all is still+ nor mote my shell awake the weary nine+ to grace so plain a talethis lowly lay of mine++ whilome in albions isle there dwelt a youth+ who ne in virtues ways did take delight+ but spent his days in riot most uncouth+ and vexed with mirth the drowsy ear of night+ ah me in sooth he was a shameless wight+ sore given to revel and ungodly glee+ few earthly things found favour in his sight+ save concubines and carnal companie+ and flaunting wassailers of high and low degree++ childe harold was he hight but whence his name+ and lineage long it suits me not to say+ suffice it that perchance they were of fame+ and had been glorious in another day+ but one sad losel soils a name for aye+ however mighty in the olden time+ nor all that heralds rake from coffined clay+ nor florid prose nor honeyed lines of rhyme+ can blazon evil deeds or consecrate a crime++ childe harold basked him in the noontide sun+ disporting there like any other fly+ nor deemed before his little day was done+ one blast might chill him into misery+ but long ere scarce a third of his passed by+ worse than adversity the childe befell+ he felt the fulness of satiety+ then loathed he in his native land to dwell+ which seemed to him more lone than eremites sad cell++ for he through sins long labyrinth had run+ nor made atonement when he did amiss+ had sighed to many though he loved but one+ and that loved one alas could neer be his+ ah happy she to scape from him whose kiss+ had been pollution unto aught so chaste+ who soon had left her charms for vulgar bliss+ and spoiled her goodly lands to gild his waste+ nor calm domestic peace had ever deigned to taste++ and now childe harold was sore sick at heart+ and from his fellow bacchanals would flee+ tis said at times the sullen tear would start+ but pride congealed the drop within his ee+ apart he stalked in joyless reverie+ and from his native land resolved to go+ and visit scorching climes beyond the sea+ with pleasure drugged he almost longed for woe+ and een for change of scene would seek the shades below++ the childe departed from his fathers hall+ it was a vast and venerable pile+ so old it seemed only not to fall+ yet strength was pillared in each massy aisle+ monastic dome condemned to uses vile+ where superstition once had made her den+ now paphian girls were known to sing and smile+ and monks might deem their time was come agen+ if ancient tales say true nor wrong these holy men++ yet ofttimes in his maddest mirthful mood+ strange pangs would flash along childe harolds brow+ as if the memory of some deadly feud+ or disappointed passion lurked below+ but this none knew nor haply cared to know+ for his was not that open artless soul+ that feels relief by bidding sorrow flow+ nor sought he friend to counsel or condole+ whateer this grief mote be which he could not control++ and none did love him though to hall and bower+ he gathered revellers from far and near+ he knew them flatterers of the festal hour+ the heartless parasites of present cheer+ yea none did love himnot his lemans dear+ but pomp and power alone are womans care+ and where these are light eros finds a feere+ maidens like moths are ever caught by glare+ and mammon wins his way where seraphs might despair++ childe harold had a mothernot forgot+ though parting from that mother he did shun+ a sister whom he loved but saw her not+ before his weary pilgrimage begun+ if friends he had he bade adieu to none+ yet deem not thence his breast a breast of steel+ ye who have known what tis to dote upon+ a few dear objects will in sadness feel+ such partings break the heart they fondly hope to heal+ </text>+</lipsum>\ No newline at end of filediff --git a/src/app/dev/DevToys.Tools/Assets/Lipsums/decameron.xml b/src/app/dev/DevToys.Tools/Assets/Lipsums/decameron.xmlnew file mode 100644index 000000000..dba9da3f6--- /dev/null+++ b/src/app/dev/DevToys.Tools/Assets/Lipsums/decameron.xml@@ -0,0 +1,10 @@+<?xml version="1.0" encoding="utf-8"?>++<lipsum>+ <copyright>This text is under public domain</copyright>+ <title>Decameron - Novella Prima</title>+ <author>Giovanni Boccaccio</author>+ <text>+ convenevole cosa e carissime donne che ciascheduna cosa la quale l'uomo fa dallo ammirabile e santo nome di colui il quale di tutte fu facitore le dea principio per che dovendo io al vostro novellare sí come primo dare cominciamento intendo da una delle sue maravigliose cose incominciare accio che quella udita la nostra speranza in lui sí come in cosa impermutabile si fermi e sempre sia da noi il suo nome lodato manifesta cosa e che sí come le cose temporali tutte sono transitorie e mortali cosí in sé e fuor di sé esser piene di noia d'angoscia e di fatica e a infiniti pericoli sogiacere alle quali senza niuno fallo né potremmo noi che viviamo mescolati in esse e che siamo parte d'esse durare né ripararci se spezial grazia di dio forza e avvedimento non ci prestasse la quale a noi e in noi non e da credere che per alcun nostro merito discenda ma dalla sua propria benignita mossa e da' prieghi di coloro impetrata che sí come noi siamo furon mortali e bene i suoi piaceri mentre furono in vita seguendo ora con lui eterni son divenuti e beati alli quali noi medesimi sí come a procuratori informati per esperienza della nostra fragilita forse non audaci di porgere i prieghi nostri nel cospetto di tanto giudice delle cose le quali a noi reputiamo oportune gli porgiamo e ancora piú in lui verso noi di pietosa liberalita pieno discerniamo che non potendo l'acume dell'occhio mortale nel segreto della divina mente trapassare in alcun modo avvien forse tal volta che da oppinione ingannati tale dinanzi alla sua maesta facciamo procuratore che da quella con etterno essilio e iscacciato e nondimeno esso al quale niuna cosa e occulta piú alla purita del pregator riguardando che alla sua ignoranza o allo essilio del pregato cosí come se quegli fosse nel suo cospetto beato essaudisce coloro che 'l priegano il che manifestamente potra apparire nella novella la quale di raccontare intendo manifestamente dico non il giudicio di dio ma quel degli uomini seguitando+ </text>+</lipsum>\ No newline at end of filediff --git a/src/app/dev/DevToys.Tools/Assets/Lipsums/faust.xml b/src/app/dev/DevToys.Tools/Assets/Lipsums/faust.xmlnew file mode 100644index 000000000..bb502eac1--- /dev/null+++ b/src/app/dev/DevToys.Tools/Assets/Lipsums/faust.xml@@ -0,0 +1,44 @@+<?xml version="1.0" encoding="utf-8"?>++<lipsum>+ <copyright>This text is under public domain</copyright>+ <title>Faust: Der Tragödie erster Teil</title>+ <author>Johann Wolfgang von Goethe</author>+ <text>+ ihr naht euch wieder schwankende gestalten+ die früh sich einst dem trüben blick gezeigt+ versuch ich wohl euch diesmal festzuhalten+ fühl ich mein herz noch jenem wahn geneigt+ ihr drängt euch zu nun gut so mögt ihr walten+ wie ihr aus dunst und nebel um mich steigt+ mein busen fühlt sich jugendlich erschüttert+ vom zauberhauch der euren zug umwittert++ ihr bringt mit euch die bilder froher tage+ und manche liebe schatten steigen auf+ gleich einer alten halbverklungnen sage+ kommt erste lieb und freundschaft mit herauf+ der schmerz wird neu es wiederholt die klage+ des lebens labyrinthisch irren lauf+ und nennt die guten die um schöne stunden+ vom glück getäuscht vor mir hinweggeschwunden++ sie hören nicht die folgenden gesänge+ die seelen denen ich die ersten sang+ zerstoben ist das freundliche gedränge+ verklungen ach der erste widerklang+ mein lied ertönt der unbekannten menge+ ihr beifall selbst macht meinem herzen bang+ und was sich sonst an meinem lied erfreuet+ wenn es noch lebt irrt in der welt zerstreuet++ und mich ergreift ein längst entwöhntes sehnen+ nach jenem stillen ernsten geisterreich+ es schwebet nun in unbestimmten tönen+ mein lispelnd lied der äolsharfe gleich+ ein schauer faßt mich träne folgt den tränen+ das strenge herz es fühlt sich mild und weich+ was ich besitze seh ich wie im weiten+ und was verschwand wird mir zu wirklichkeiten+ </text>+</lipsum>\ No newline at end of filediff --git a/src/app/dev/DevToys.Tools/Assets/Lipsums/inderfremde.xml b/src/app/dev/DevToys.Tools/Assets/Lipsums/inderfremde.xmlnew file mode 100644index 000000000..7389f8cfa--- /dev/null+++ b/src/app/dev/DevToys.Tools/Assets/Lipsums/inderfremde.xml@@ -0,0 +1,133 @@+<?xml version="1.0" encoding="utf-8"?>++<lipsum>+ <copyright>This text is under public domain</copyright>+ <title>Le Bateau Ivre</title>+ <author>Arthur Rimbaud</author>+ <text>+ comme je descendais des fleuves impassibles+ je ne me sentis plus guidé par les haleurs+ des peaux-rouges criards les avaient pris pour cibles+ les ayant cloués nus aux poteaux de couleurs++ j'étais insoucieux de tous les équipages+ porteur de blés flamands ou de cotons anglais+ quand avec mes haleurs ont fini ces tapages+ les fleuves m'ont laissé descendre ou je voulais++ dans les clapotements furieux des marées+ moi l'autre hiver plus sourd que les cerveaux d'enfants+ je courus et les péninsules démarrées+ n'ont pas subi tohu-bohus plus triomphants++ la tempete a béni mes éveils maritimes+ plus léger qu'un bouchon j'ai dansé sur les flots+ qu'on appelle rouleurs éternels de victimes+ dix nuits sans regretter l'oeil niais des falots++ plus douce qu'aux enfants la chair des pommes sures+ l'eau verte pénétra ma coque de sapin+ et des taches de vins bleus et des vomissures+ me lava dispersant gouvernail et grappin++ et des lors je me suis baigné dans le poeme+ de la mer infusé d'astres et lactescent+ dévorant les azurs verts ou flottaison bleme+ et ravie un noyé pensif parfois descend++ ou teignant tout a coup les bleuités délires+ et rythmes lents sous les rutilements du jour+ plus fortes que l'alcool plus vastes que nos lyres+ fermentent les rousseurs ameres de l'amour++ je sais les cieux crevant en éclairs et les trombes+ et les ressacs et les courants je sais le soir+ l'aube exaltée ainsi qu'un peuple de colombes+ et j'ai vu quelque fois ce que l'homme a cru voir++ j'ai vu le soleil bas taché d'horreurs mystiques+ illuminant de longs figements violets+ pareils a des acteurs de drames tres-antiques+ les flots roulant au loin leurs frissons de volets++ j'ai revé la nuit verte aux neiges éblouies+ baiser montant aux yeux des mers avec lenteurs+ la circulation des seves inouies+ et l'éveil jaune et bleu des phosphores chanteurs++ j'ai suivi des mois pleins pareille aux vacheries+ hystériques la houle a l'assaut des récifs+ sans songer que les pieds lumineux des maries+ pussent forcer le mufle aux océans poussifs++ j'ai heurté savez-vous d'incroyables florides+ melant aux fleurs des yeux de pantheres a peaux+ d'hommes des arcs-en-ciel tendus comme des brides+ sous l'horizon des mers a de glauques troupeaux++ j'ai vu fermenter les marais énormes nasses+ ou pourrit dans les joncs tout un léviathan+ des écroulement d'eau au milieu des bonaces+ et les lointains vers les gouffres cataractant++ glaciers soleils d'argent flots nacreux cieux de braises+ échouages hideux au fond des golfes bruns+ ou les serpents géants dévorés de punaises+ choient des arbres tordus avec de noirs parfums++ j'aurais voulu montrer aux enfants ces dorades+ du flot bleu ces poissons d'or ces poissons chantants+ - des écumes de fleurs ont bercé mes dérades+ et d'ineffables vents m'ont ailé par instants++ parfois martyr lassé des pôles et des zones+ la mer dont le sanglot faisait mon roulis doux+ montait vers moi ses fleurs d'ombres aux ventouses jaunes+ et je restais ainsi qu'une femme a genoux++ presque île balottant sur mes bords les querelles+ et les fientes d'oiseaux clabaudeurs aux yeux blonds+ et je voguais lorsqu'a travers mes liens freles+ des noyés descendaient dormir a reculons++ or moi bateau perdu sous les cheveux des anses+ jeté par l'ouragan dans l'éther sans oiseau+ moi dont les monitors et les voiliers des hanses+ n'auraient pas repeché la carcasse ivre d'eau++ libre fumant monté de brumes violettes+ moi qui trouais le ciel rougeoyant comme un mur+ qui porte confiture exquise aux bons poetes+ des lichens de soleil et des morves d'azur++ qui courais taché de lunules électriques+ planche folle escorté des hippocampes noirs+ quand les juillets faisaient crouler a coups de triques+ les cieux ultramarins aux ardents entonnoirs++ moi qui tremblais sentant geindre a cinquante lieues+ le rut des béhémots et les maelstroms épais+ fileur éternel des immobilités bleues+ je regrette l'europe aux anciens parapets++ j'ai vu des archipels sidéraux et des îles+ dont les cieux délirants sont ouverts au vogueur+ - est-ce en ces nuits sans fond que tu dors et t'exiles+ million d'oiseaux d'or ô future vigueur -++ mais vrai j'ai trop pleuré les aubes sont navrantes+ toute lune est atroce et tout soleil amer+ l'âcre amour m'a gonflé de torpeurs enivrantes+ ô que ma quille éclate ô que j'aille a la mer++ si je désire une eau d'europe c'est la flache+ noire et froide ou vers le crépuscule embaumé+ un enfant accroupi plein de tristesses lâche+ un bateau frele comme un papillon de mai++ je ne puis plus baigné de vos langueurs ô lames+ enlever leur sillage aux porteurs de cotons+ ni traverser l'orgueil des drapeaux et des flammes+ ni nager sous les yeux horribles des pontons+ </text>+</lipsum>\ No newline at end of filediff --git a/src/app/dev/DevToys.Tools/Assets/Lipsums/lebateauivre.xml b/src/app/dev/DevToys.Tools/Assets/Lipsums/lebateauivre.xmlnew file mode 100644index 000000000..35a0c4c3f--- /dev/null+++ b/src/app/dev/DevToys.Tools/Assets/Lipsums/lebateauivre.xml@@ -0,0 +1,133 @@+<?xml version="1.0" encoding="utf-8"?>++<lipsum>+ <copyright>This text is under public domain</copyright>+ <title>Le Bateau Ivre</title>+ <author>Arthur Rimbaud</author>+ <text>+ comme je descendais des fleuves impassibles+ je ne me sentis plus guidé par les haleurs+ des peaux-rouges criards les avaient pris pour cibles+ les ayant cloués nus aux poteaux de couleurs++ j'étais insoucieux de tous les équipages+ porteur de blés flamands ou de cotons anglais+ quand avec mes haleurs ont fini ces tapages+ les fleuves m'ont laissé descendre ou je voulais++ dans les clapotements furieux des marées+ moi l'autre hiver plus sourd que les cerveaux d'enfants+ je courus et les péninsules démarrées+ n'ont pas subi tohu-bohus plus triomphants++ la tempete a béni mes éveils maritimes+ plus léger qu'un bouchon j'ai dansé sur les flots+ qu'on appelle rouleurs éternels de victimes+ dix nuits sans regretter l'oeil niais des falots++ plus douce qu'aux enfants la chair des pommes sures+ l'eau verte pénétra ma coque de sapin+ et des taches de vins bleus et des vomissures+ me lava dispersant gouvernail et grappin++ et des lors je me suis baigné dans le poeme+ de la mer infusé d'astres et lactescent+ dévorant les azurs verts ou flottaison bleme+ et ravie un noyé pensif parfois descend++ ou teignant tout a coup les bleuités délires+ et rythmes lents sous les rutilements du jour+ plus fortes que l'alcool plus vastes que nos lyres+ fermentent les rousseurs ameres de l'amour++ je sais les cieux crevant en éclairs et les trombes+ et les ressacs et les courants je sais le soir+ l'aube exaltée ainsi qu'un peuple de colombes+ et j'ai vu quelque fois ce que l'homme a cru voir++ j'ai vu le soleil bas taché d'horreurs mystiques+ illuminant de longs figements violets+ pareils a des acteurs de drames tres-antiques+ les flots roulant au loin leurs frissons de volets++ j'ai revé la nuit verte aux neiges éblouies+ baiser montant aux yeux des mers avec lenteurs+ la circulation des seves inouies+ et l'éveil jaune et bleu des phosphores chanteurs++ j'ai suivi des mois pleins pareille aux vacheries+ hystériques la houle a l'assaut des récifs+ sans songer que les pieds lumineux des maries+ pussent forcer le mufle aux océans poussifs++ j'ai heurté savez-vous d'incroyables florides+ melant aux fleurs des yeux de pantheres a peaux+ d'hommes des arcs-en-ciel tendus comme des brides+ sous l'horizon des mers a de glauques troupeaux++ j'ai vu fermenter les marais énormes nasses+ ou pourrit dans les joncs tout un léviathan+ des écroulement d'eau au milieu des bonaces+ et les lointains vers les gouffres cataractant++ glaciers soleils d'argent flots nacreux cieux de braises+ échouages hideux au fond des golfes bruns+ ou les serpents géants dévorés de punaises+ choient des arbres tordus avec de noirs parfums++ j'aurais voulu montrer aux enfants ces dorades+ du flot bleu ces poissons d'or ces poissons chantants+ - des écumes de fleurs ont bercé mes dérades+ et d'ineffables vents m'ont ailé par instants++ parfois martyr lassé des pôles et des zones+ la mer dont le sanglot faisait mon roulis doux+ montait vers moi ses fleurs d'ombres aux ventouses jaunes+ et je restais ainsi qu'une femme a genoux++ presque île balottant sur mes bords les querelles+ et les fientes d'oiseaux clabaudeurs aux yeux blonds+ et je voguais lorsqu'a travers mes liens freles+ des noyés descendaient dormir a reculons++ or moi bateau perdu sous les cheveux des anses+ jeté par l'ouragan dans l'éther sans oiseau+ moi dont les monitors et les voiliers des hanses+ n'auraient pas repeché la carcasse ivre d'eau++ libre fumant monté de brumes violettes+ moi qui trouais le ciel rougeoyant comme un mur+ qui porte confiture exquise aux bons poetes+ des lichens de soleil et des morves d'azur++ qui courais taché de lunules électriques+ planche folle escorté des hippocampes noirs+ quand les juillets faisaient crouler a coups de triques+ les cieux ultramarins aux ardents entonnoirs++ moi qui tremblais sentant geindre a cinquante lieues+ le rut des béhémots et les maelstroms épais+ fileur éternel des immobilités bleues+ je regrette l'europe aux anciens parapets++ j'ai vu des archipels sidéraux et des îles+ dont les cieux délirants sont ouverts au vogueur+ - est-ce en ces nuits sans fond que tu dors et t'exiles+ million d'oiseaux d'or ô future vigueur -++ mais vrai j'ai trop pleuré les aubes sont navrantes+ toute lune est atroce et tout soleil amer+ l'âcre amour m'a gonflé de torpeurs enivrantes+ ô que ma quille éclate ô que j'aille a la mer++ si je désire une eau d'europe c'est la flache+ noire et froide ou vers le crépuscule embaumé+ un enfant accroupi plein de tristesses lâche+ un bateau frele comme un papillon de mai++ je ne puis plus baigné de vos langueurs ô lames+ enlever leur sillage aux porteurs de cotons+ ni traverser l'orgueil des drapeaux et des flammes+ ni nager sous les yeux horribles des pontons+ </text>+</lipsum>\ No newline at end of filediff --git a/src/app/dev/DevToys.Tools/Assets/Lipsums/lemasque.xml b/src/app/dev/DevToys.Tools/Assets/Lipsums/lemasque.xmlnew file mode 100644index 000000000..45748b5a9--- /dev/null+++ b/src/app/dev/DevToys.Tools/Assets/Lipsums/lemasque.xml@@ -0,0 +1,50 @@+<?xml version="1.0" encoding="utf-8"?>++<lipsum>+ <copyright>This text is under public domain</copyright>+ <title>Le Masque</title>+ <author>Charles Baudelaire</author>+ <text>+ contemplons ce trésor de grâces florentines+ dans l'ondulation de ce corps musculeux+ l'elégance et la force abondent soeurs divines+ cette femme morceau vraiment miraculeux+ divinement robuste adorablement mince+ est faite pour trôner sur des lits somptueux+ et charmer les loisirs d'un pontife ou d'un prince++ aussi vois ce souris fin et voluptueux+ ou la fatuité promene son extase+ ce long regard sournois langoureux et moqueur+ ce visage mignard tout encadré de gaze+ dont chaque trait nous dit avec un air vainqueur+ «la volupté m'appelle et l'amour me couronne»+ a cet etre doué de tant de majesté+ vois quel charme excitant la gentillesse donne+ approchons et tournons autour de sa beauté++ ô blaspheme de l'art ô surprise fatale+ la femme au corps divin promettant le bonheur+ par le haut se termine en monstre bicéphale++ mais non ce n'est qu'un masque un décor suborneur+ ce visage éclairé d'une exquise grimace+ et regarde voici crispée atrocement+ la véritable tete et la sincere face+ renversée a l'abri de la face qui ment+ pauvre grande beauté le magnifique fleuve+ de tes pleurs aboutit dans mon coeur soucieux+ ton mensonge m'enivre et mon âme s'abreuve+ aux flots que la douleur fait jaillir de tes yeux++ mais pourquoi pleure-t-elle elle beauté parfaite+ qui mettrait a ses pieds le genre humain vaincu+ quel mal mystérieux ronge son flanc d'athlete++ elle pleure insensé parce qu'elle a vécu+ et parce qu'elle vit mais ce qu'elle déplore+ surtout ce qui la fait frémir jusqu'aux genoux+ c'est que demain hélas il faudra vivre encore+ demain apres-demain et toujours comme nous+ </text>+</lipsum>\ No newline at end of filediff --git a/src/app/dev/DevToys.Tools/Assets/Lipsums/lipsum.dtd b/src/app/dev/DevToys.Tools/Assets/Lipsums/lipsum.dtdnew file mode 100644index 000000000..196cb1d39--- /dev/null+++ b/src/app/dev/DevToys.Tools/Assets/Lipsums/lipsum.dtd@@ -0,0 +1,7 @@+<!-- This is the valid DTD of a lipsum file used by Lipsum - the text generator -->+<!ELEMENT lipsum (copyright, title, author, text)>++ <!ELEMENT copyright (#PCDATA)>+ <!ELEMENT title (#PCDATA)>+ <!ELEMENT author (#PCDATA)>+ <!ELEMENT text (#PCDATA)>\ No newline at end of filediff --git a/src/app/dev/DevToys.Tools/Assets/Lipsums/loremipsum.xml b/src/app/dev/DevToys.Tools/Assets/Lipsums/loremipsum.xmlnew file mode 100644index 000000000..e9e67c8ce--- /dev/null+++ b/src/app/dev/DevToys.Tools/Assets/Lipsums/loremipsum.xml@@ -0,0 +1,16 @@+<?xml version="1.0" encoding="utf-8"?>++<lipsum>+ <copyright>This text is under public domain</copyright>+ <title>Lorem ipsum</title>+ <author>Cicero</author>+ <text>+ lorem ipsum dolor sit amet consetetur sadipscing elitr sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat sed diam voluptua at vero eos et accusam et justo duo dolores et ea rebum stet clita kasd gubergren no sea takimata sanctus est lorem ipsum dolor sit amet lorem ipsum dolor sit amet consetetur sadipscing elitr sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat sed diam voluptua at vero eos et accusam et justo duo dolores et ea rebum stet clita kasd gubergren no sea takimata sanctus est lorem ipsum dolor sit amet lorem ipsum dolor sit amet consetetur sadipscing elitr sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat sed diam voluptua at vero eos et accusam et justo duo dolores et ea rebum stet clita kasd gubergren no sea takimata sanctus est lorem ipsum dolor sit amet+ duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi lorem ipsum dolor sit amet consectetuer adipiscing elit sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat+ ut wisi enim ad minim veniam quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi+ nam liber tempor cum soluta nobis eleifend option congue nihil imperdiet doming id quod mazim placerat facer possim assum lorem ipsum dolor sit amet consectetuer adipiscing elit sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat ut wisi enim ad minim veniam quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat+ duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat vel illum dolore eu feugiat nulla facilisis+ at vero eos et accusam et justo duo dolores et ea rebum stet clita kasd gubergren no sea takimata sanctus est lorem ipsum dolor sit amet lorem ipsum dolor sit amet consetetur sadipscing elitr sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat sed diam voluptua at vero eos et accusam et justo duo dolores et ea rebum stet clita kasd gubergren no sea takimata sanctus est lorem ipsum dolor sit amet lorem ipsum dolor sit amet consetetur sadipscing elitr at accusam aliquyam diam diam dolore dolores duo eirmod eos erat et nonumy sed tempor et et invidunt justo labore stet clita ea et gubergren kasd magna no rebum sanctus sea sed takimata ut vero voluptua est lorem ipsum dolor sit amet lorem ipsum dolor sit amet consetetur sadipscing elitr sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat+ consetetur sadipscing elitr sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat sed diam voluptua at vero eos et accusam et justo duo dolores et ea rebum stet clita kasd gubergren no sea takimata sanctus est lorem ipsum dolor sit amet lorem ipsum dolor sit amet consetetur sadipscing elitr sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat sed diam voluptua at vero eos et accusam et justo duo dolores et ea rebum stet clita kasd gubergren no sea takimata sanctus est lorem ipsum dolor sit amet lorem ipsum dolor sit amet consetetur sadipscing elitr sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat sed diam voluptua at vero eos et accusam et justo duo dolores et ea rebum stet clita kasd gubergren no sea takimata sanctus est lorem ipsum dolor sit amet+ </text>+</lipsum>\ No newline at end of filediff --git a/src/app/dev/DevToys.Tools/Assets/Lipsums/nagyonfaj.xml b/src/app/dev/DevToys.Tools/Assets/Lipsums/nagyonfaj.xmlnew file mode 100644index 000000000..5da7e2135--- /dev/null+++ b/src/app/dev/DevToys.Tools/Assets/Lipsums/nagyonfaj.xml@@ -0,0 +1,120 @@+<?xml version="1.0" encoding="utf-8"?>++<lipsum>+ <copyright>This text is under public domain</copyright>+ <title>Nagyon fáj</title>+ <author>József Attila</author>+ <text>+ kivül belől+ leselkedő halál elől+ mint lukba megriadt egérke++ amíg hevülsz+ az asszonyhoz úgy menekülsz+ hogy óvjon karja öle térde++ nemcsak a lágy+ meleg öl csal nemcsak a vágy+ de odataszít a muszáj is++ ezért ölel+ minden ami asszonyra lel+ míg el nem fehérül a száj is++ kettős teher+ s kettős kincs hogy szeretni kell+ ki szeret s párra nem találhat++ oly hontalan+ mint amilyen gyámoltalan+ a szükségét végző vadállat++ nincsen egyéb+ menedékünk a kés hegyét+ bár anyádnak szegezd te bátor++ és lásd akadt+ nő ki érti e szavakat+ de mégis ellökött magától++ nincsen helyem+ így élők közt zúg a fejem+ gondom s fájdalmam kicifrázva++ mint a gyerek+ kezében a csörgő csereg+ ha magára hagyottan rázza++ mit kellene+ tenni érte és ellene+ nem szégyellem ha kitalálom++ hisz kitaszít+ a világ így is olyat akit+ kábít a nap rettent az álom++ a kultúra+ úgy hull le rólam mint ruha+ másról a boldog szerelemben++ de az hol áll+ hogy nézze mint dobál halál+ s még egyedül kelljen szenvednem++ a csecsemő+ is szenvedi ha szül a nő+ páros kínt enyhíthet alázat++ de énnekem+ pénzt hoz fájdalmas énekem+ s hozzám szegődik a gyalázat++ segítsetek+ ti kisfiúk a szemetek+ pattanjon meg ott ő ahol jár++ ártatlanok+ csizmák alatt sikongjatok+ és mondjátok neki¨nagyon fáj++ ti hű ebek+ kerék alá kerüljetek+ s ugassátok neki nagyon fáj++ nők terhetek+ viselők elvetéljetek+ és sírjátok neki nagyon fáj++ ép emberek+ bukjatok öszetörjetek+ s motyogjatok neki nagyon fáj++ ti férfiak+ egymást megtépve nő miatt+ ne hallgassátok el nagyon fáj++ lovak bikák+ kiket hogy húzzatok igát+ herélnek ríjjátok nagyon fáj++ néma halak+ horgot kapjatok jég alatt+ és tátogjatok rá nagyon fáj++ elevenek+ minden mi kíntól megremeg+ égjen hol laktok kert vadon táj++ s ágya körül+ üszkösen ha elszenderül+ vakogjatok velem nagyon fáj++ hallja míg él+ azt tagadta meg amit ér+ elvonta puszta kénye végett++ kivül belől+ menekülő élő elől+ a legutolsó menedéket+ </text>+</lipsum>\ No newline at end of filediff --git a/src/app/dev/DevToys.Tools/Assets/Lipsums/omagyar.xml b/src/app/dev/DevToys.Tools/Assets/Lipsums/omagyar.xmlnew file mode 100644index 000000000..7669eff5f--- /dev/null+++ b/src/app/dev/DevToys.Tools/Assets/Lipsums/omagyar.xml@@ -0,0 +1,10 @@+<?xml version="1.0" encoding="utf-8"?>++<lipsum>+ <copyright>This text is under public domain</copyright>+ <title>Ómagyar-Mária siralom</title>+ <author>Ismeretlen</author>+ <text>+ volek syrolm thudothlon syrolmol sepedyk buol ozuk epedek walasth vylagumtul sydou fyodumtul ezes urumemtuul o en eses urodum eggen yg fyodum syrou aniath thekunched buabeleul kyniuhhad scemem kunuel arad en iunhum buol farad the werud hullothya en iunhum olelothya vylag uilaga viragnac uiraga keseruen kynzathul uos scegegkel werethul vh nequem en fyon ezes mezuul scegenul scepsegud wirud hioll wyzeul syrolmom fuhazatum therthetyk kyul en iumhumnok bel bua qui sumha nym kyul hyul wegh halal engumet eggedum illen maraggun urodum kyth wylag felleyn o ygoz symeonnok bezzeg scouuo ere en erzem ez buthuruth kyt niha egyre tuled ualmun de num ualallal hul yg kynzassal fyom halallal sydou myth thez turuentelen fyom merth hol byuntelen fugwa huztuzwa wklelue kethwe ulud keguggethuk fyomnok ne leg kegulm mogomnok owog halal kynaal anyath ezes fyaal egembelu ullyetuk+ </text>+</lipsum>\ No newline at end of filediff --git a/src/app/dev/DevToys.Tools/Assets/Lipsums/robinsonokruso.xml b/src/app/dev/DevToys.Tools/Assets/Lipsums/robinsonokruso.xmlnew file mode 100644index 000000000..f0bc3076b--- /dev/null+++ b/src/app/dev/DevToys.Tools/Assets/Lipsums/robinsonokruso.xml@@ -0,0 +1,317 @@+<?xml version="1.0" encoding="utf-8"?>++<lipsum>+ <copyright>This text is under public domain</copyright>+ <title>Robinsono Kruso (Esperanto)</title>+ <author>Daniel Defoe</author>+ <text>+ mi naskigxis en jorko anglujo je marto kiu estas la+ sesjarrego de la regxo karolo la unua infane mi sentadis grandan+ deziron por pasigi mian vivon sur la maro kaj pliagxante la deziro+ plifortigxis gxis fine mi forlasis mian lernejon kaj hejmon kaj+ piede mi trovis mian vojon al hull kie mi baldaux trovis okupadon sur+ sxipo++ post kiam ni velveturis kelke da tagoj okazis ventego kaj kvinanokte+ la sxipo enfendigxis cxiuj al la pumpiloj rapidis la sxipon ni sentis+ gxemi en cxiuj siaj tabuloj kaj gxian trabajxon ektremi de la antauxa gxis+ la posta parto kaj baldaux klarigxis ke ne estas ia espero por gxi kaj+ ke cxio kion ni povas fari estas savi niajn vivojn++ unue ni pafadis pafilegojn por venigi helpon kaj post kelke da+ tempo sxipo kusxante ne malproksime alsendis boaton por helpi nin sed+ la maro estis tro maltrankvila por gxi restadi sxipflanke tial ni+ eljxetis sxnuregon kiun la boatanoj ekkaptis kaj firme fiksis kaj+ tiamaniere ni cxiuj enboatigxis++ tamen vanigxis en tia maltrankvila maro por peni albordigxi la sxipon+ kiu alsendis la virojn aux aluzi la remilojn de la boato kaj ni ne+ povis ion fari krom gxin lasi peligxi teron++ duonhore nia sxipo trafis rifon kaj subakvigxis kaj gxin ni ne vidis+ plu tre malrapide ni alproksimigxis teron kiun iafoje ni vidis kiam+ ajn la boato levigxis sur la supro de ia alta ondo kaj tie ni vidis+ homojn kurante amase tien kaj reen havante unu celon savi nin++ fine gxojege ni surterigxis kie bonsxance ni renkontis amikojn kiuj+ donis al ni helpon por reveturi al hull kaj se tiam mi havus la+ bonan sencon por iri hejmon estus pli bone por mi++ la viro kies sxipo subakvigxis diris kun grava mieno junulo ne iru+ plu surmaron tiu ne estas la vivmaniero por vi kial do sinjoro+ vi mem iros plu surmaron tiu estas alia afero mi estas elnutrita+ por la maro sed vi ne estas vi venis sur mian sxipon por eltrovi la+ staton de vivo surmara kaj vi povas diveni tion kio okazos al vi se+ vi ne reiros hejmon dio ne benos vin kaj eble vi kauxzis tiun-cxi+ tutan malbonon al ni++ mi ne parolis alian vorton al li kiun vojon li iris mi nek scias+ nek deziris sciigxi cxar mi estis ofendita pro tiu-cxi malgxentila+ parolado mi multe pensis cxu iri hejmon aux cxu iradi surmaron honto+ detenis min pri iri hejmon kaj mi ne povis decidi la vivkuron kiun+ mi estis ironta++ kiel estis mia sorto travive cxiam elekti la plej malbonon tiel same+ mi nun faris mi havis oron en mia monujo kaj bonan vestajxon sur mia+ korpo sed surmaron mi ree iris++ sed nun mi havis pli malbonan sxancon ol iam cxar kiam ni estis tre+ malproksime enmaro kelke da turkoj en sxipeto plencxase alproksimigxis+ al ni ni levis tiom da veloj kiom niaj velstangoj povis elporti por+ ke ni forkuru de ili tamen malgraux tio ni vidis ke niaj malamikoj+ pli kaj pli alproksimigxis kaj certigxis ke baldaux ili atingos nian+ sxipon++ fine ili atingis nin sed ni direktis niajn pafilegojn sur ilin kio+ kauxzis portempe ke ili deflanku sian vojon sed ili dauxrigis pafadon+ sur ni tiel longe kiel ili estis en pafspaco proksimigxante la duan+ fojon kelkaj viroj atingis la ferdekon de nia sxipo kaj ektrancxis la+ velojn kaj ekfaris cxiuspecajn difektajxojn tial post kiam dek el+ niaj sxipanoj kusxas mortitaj kaj la plimulto el la ceteraj havas+ vundojn ni kapitulacis++ la cxefo de la turkoj prenis min kiel sian rabajxon al haveno okupita+ de mauxroj li ne agis al mi tiel malbone kiel mi lin unue jugxis sed+ li min laborigis kun la ceteraj de siaj sklavoj tio estis sxangxo en+ mia vivo kiun mi neniam antauxvidis ho ve kiom mia koro malgxojis+ pensante pri tiuj kiujn mi lasis hejme al kiuj mi ne montris tiom da+ komplezemo kiom diri adiauxi kiam mi iris surmaron aux sciigi tion+ kion mi intencas fari++ tamen cxio kion mi travivis tiam estas nur antauxgusto de la penadoj+ kaj zorgoj kiujn de tiam estis mia sorto suferi++ unue mi pensis ke la turko kunprenos min kun si kiam li ree iros+ surmaron kaj ke mi iel povos liberigxi sed la espero nelonge dauxris+ cxar tiatempe li lasis min surtere por prizorgi liajn rikoltojn+ tiamaniere mi vivis du jarojn tamen la turko konante kaj vidante min+ plu min pli kaj pli liberigis li unufoje aux dufoje cxiusemajne+ veturis en sia boato por kapti iajn platfisxojn kaj iafoje li+ kunprenis min kaj knabon kun si cxar ni estas rapidaj cxe tia sporto+ kaj tial li pli kaj pli sxatis min++ unu tagon la turko elsendis min viron kaj knabon boate por kapti+ kelke da fisxoj surmare okazas tia densa nebulo ke dekduhore ni ne+ povas vidi la teron kvankam ni ne estas pli ol duonmejlon 00+ metrojn de la terbordo kaj morgauxtage kiam la suno levigxis nia+ boato estas enmaro almenaux dek mejlojn kilometrojn de la+ terbordo la vento vigle blovis kaj ni cxiuj tre bezonis nutrajxon sed+ fine per la helpo de remiloj kaj veloj ni sendangxere reatingis la+ terbordon++ kiam la turko sciigxis kiamaniere ni vojperdis li diris ke de nun+ kiam li velveturos li prenos boaton kiu enhavos cxion kion ni+ bezonus se ni longatempe estus detenataj surmare tial li farigis+ grandan kajuton en la longboato de sia sxipo kiel ankaux cxambron por ni+ sklavoj unu tagon li min sendis por ke mi ordigu la boaton pro tio+ ke li havas du amikojn kiuj intencas veturi kun li por fisxkapti sed+ kiam la tempo alvenis ili ne veturas tial li sendis min viron kaj+ knabon -- kies nomo estas zuro -- por kapti kelke da fisxoj por la+ gastoj kiuj estas vespermangxontaj kun li++ subite eniris en mian kapon la ideo ke nun estas bona okazo boate+ forkuri kaj liberigxi tial mi tuj prenis tiom da nutrajxo kiom mi+ povas havigi kaj mi diris al la viro ke estus tro malrespekte+ mangxante la panon metitan en la boaton por la turko li diris ke li+ pensas tiel same tial li alportis sakon da rizo kaj kelke da ruskoj+ kukoj++ dum la viro estis surtere mi provizis iom da vino pecegon da vakso+ segilon hakilon fosilon iom da sxnurego kaj cxiuspecajn objektojn+ kiuj eble estos utilaj al ni mi sciis kie trovigxas la vinkesto de la+ turko kaj mi gxin metis surboaton dum la viro estas surtere per alia+ ruzo mi havigis cxion kion mi bezonis mi diris al la knabo la+ pafiloj de la turko estas en la boato sed ne trovigxas ia pafajxo cxu+ vi pensas ke vi povas havigi iom da gxi vi scias kie gxi estas+ konservata kaj eble ni volos pafi birdon aux du li do alportis kesto+ kaj saketon kiuj enhavas cxion kion ni eble bezonas por la pafiloj+ tiujn-cxi mi metis surboaton kaj poste velveturis por fisxkapti++ la vento blovis de la nordo aux nordokcidento tia vento estis malbona+ por mi cxar se gxi estus de la sudo mi estus povinta velveturi al la+ terbordo de hispanujo tamen de kiu ajn loko la vento blovos mi+ estis decidinta forkuri kaj lasi la ceterajn al ilia sorto mi do+ mallevis miajn hokfadenojn kvazaux fisxkapti sed mi zorgis ke mi havu+ malbonan sukceson kaj kiam la fisxoj mordis mi ilin ne eltiris cxar+ mi deziris ke la mauxro ilin ne vidu mi diris al li tiu-cxi loko+ estas nebona ni ne kaptos fisxojn tie-cxi ni devas iom antauxen iri+ nu la mauxro pensis ke tion fari ne estos malbone li levis la+ velojn kaj cxar la direktilo estis en miaj manoj mi elsendis la+ boaton unu mejlon aux plu enmaron kaj poste gxin haltigis kvazaux mi+ intencas fisxkapti++ nun mi pripensis tiu-cxi estas mia okazo liberigxi tial mi transdonis+ la direktilon al la knabo kaj tiam ekprenis la mauxron cxirkaux la+ talio kaj eljxetis lin el la boato++ malsupren li falis sed baldaux reaperis por ke li povis nagxi kvazaux+ anaso li diris ke li volonte irus cxirkaux la mondo kun mi se mi+ enprenus lin++ iom timante ke li surrampos la boatflankon kaj reenigxos perforte mi+ direktis mian pafilon sur lin kaj diris vi facile povas nagxi+ alteron se vi tion deziras tial rapidigxu tien plie se vi reen+ alproksimigxos la boaton vi ricevos kuglon tra la kapo cxar mi de nun+ intencas esti libera viro++ tiam li eknagxis kaj sendube sendangxere atingis la terbordon cxar la+ maro estis tre trankvila++ unue mi intencis kunpreni la mauxron kun mi kaj nagxigi zuron alteron+ sed la mauxro ne estis viro pri kiu mi povis konfidi++ post kiam li forigxis mi diris al zuro se vi jxuros ke vi estos+ fidela al mi vi iam farigxos grava viro se vi ne jxuros mi certe+ ankaux vin eljxetos el la boato++ la knabo tiel dolcxe ridetis kiam li jxuris resti fidela al mi ke mi+ lin ne povis dubi en mia koro++ dum ankoraux ni povis vidi la mauxron survoje alteren ni antauxen iris+ enmaron por ke li kaj tiuj kiuj nin vidis de la terbordo kredu ke+ ni iros al la influejo de la markolo cxar neniu velveturis al la suda+ marbordo cxar tie logxas gento da homoj kiuj laux sciigoj mortigas kaj+ mangxas siajn malamikojn++ tiam mi direktis mian veturadon oriente por ke ni lauxlongiru la+ marbordon kaj havante favoron venton kaj trankvilan maron ni+ morgauxtagmeze estis malapud kaj preter la povo de la turko++ ankoraux mi timis ke mi estus kaptota de la mauxroj tial mi ne volis+ iri surteron tage duonlume ni direktis nian boaton alteren kaj+ atingis la enfluejon riveretan de kiu mi pensis ni povos nagxi+ surteron kaj tiam rigardi la cxirkauxajxojn sed kiam malheligxis la+ lumo ni auxdis strangajn sonojn bojojn kriegojn gruntojn+ blekadojn la malfelicxa knabo diris ke li ne kuragxas iri surteron+ antaux la tagigxo nu mi diris tiuokaze ni atendu sed tage+ povas vidi nin la homoj kiuj eble nin pli malhelpos ol sovagxaj+ bestoj tiam ni pafilos ilin ridante diris zuro kaj forkurigu+ ilin++ mi gxojis vidi ke la knabo montras tiom da gajeco kaj mi donis al li+ iom da pano kaj rizo tiunokte ni silente ripozis sed ne longe+ dormis cxar post kelke da horoj iaj grandegaj bestoj malsuprenvenis+ al la maro por sin bani la malfelicxa knabo ektremis de kapo al+ piedoj pro la vidajxo unu el tiuj bestoj alproksimigxis nian boaton+ kaj kvankam estis tro mallume por gxin bone vidi ni auxdis gxin blovi+ kaj sciis pro gxia bruego ke gxi certe estas granda fine la bruto+ tiom alproksimigxis la boaton kiom la longeco de du remiloj tial mi+ pafis sur gxin kaj gxi nagxis alteren++ la blekegoj kaj kriegoj kiujn faris bestoj kaj birdoj pro la bruo de+ mia pafilo sxajne montris ke ni faris malbonan elekton por surterejo+ sed vole ne vole ni devis iri surtere por sercxi fresxan fonton por+ ke ni povu plenigi niajn barelojn zuro diris ke li eltrovus cxu la+ fontaj akvoj tauxgas por trinki se mi permesus al li preni unu el la+ botelegoj kaj ke li gxin reportos plenigitan se la akvo estas bona+ kial vi volas iri mi diris kial mi ne estas ironta vi povas+ resti en la boato kontrauxe zuro diris se la sovagxuloj venos ili+ min mangxu sed vi forkuru mi devis ami la junulon pro la afabla+ parolado nu mi diris ni ambaux iros kaj se la sovagxuloj venos+ ni ilin mortigu ja ili ne mangxos aux vin aux min++ mi donis al zuro iom da rumo el la kesto de la turko por reforti lin+ kaj ni iris surteron la knabo ekiris kun sia pafilo mejlon de la+ loko kie ni surteriris kaj li revenis kun leporo kiun li mortpafis+ kaj kiun ni gxoje kuiris kaj mangxis laux la bona novajxo kiun li+ raportis li eltrovis fonton kaj ne vidis sovagxulojn++ mi divenis ke la promontoro de la verdaj insuloj ne estas+ malproksime cxar mi vidis la supron de la granda pinto kiun kiel mi+ sciis estas apud ili mia sola espero estis ke lauxlongirante la+ terbordon ni trovos sxipon kiu ensxipigos nin kaj tiam kaj ne antaux+ tiam mi sentos kvazaux libera viro unuvorte mi konfidis mian sorton+ al la sxanco aux renkonti ian sxipon aux morti++ surteron ni ekvidis iujn homojn kiuj staras kaj rigardas nin ili+ estis nigraj kaj ne portis vestajxon mi estus irinta surteron al ili+ sed zuro -- kiu sciis plej bone -- diris ne vi iru ne vi iru tial+ mi direktis la boaton lauxteron por ke mi povu paroli kun ili kaj ili+ longaspace iradis laux ni mi ekvidis ke unu havas lancon en mano++ mi faris signojn ke ili alportu iom da nutrajxo al mi kaj ili+ siaparte faris signojn ke mi haltu mian boaton tial mi demetis la+ supran parton de mia velo kaj haltis tiam du el ili ekforkuris kaj+ duonhore revenis kun iom da sekigxita viando kaj ia greno kiu kreskas+ en tiu parto de la mondo tion-cxi ni deziregis sed ne sciis kiel+ havigi gxin cxar ni ne kuragxis iri surteron al ili nek ili kuragxis+ alproksimigxi al ni++ fine ili eltrovis peron sendangxeran por ni cxiuj alportante la+ nutrajxon al la marbordo ili gxin demetis kaj tre fortirigis si mem dum+ ni gxin prenis ni faris signojn por montri nian dankon ne havante ion+ alian kion ni povas doni al ili sed bonsxance ni baldaux kaptis+ grandan donacon por ili cxar du sovagxaj bestoj de la sama speco pri+ kiu mi jam priparolis venis plencxase de la montetoj al la maro++ ili nagxis kvazaux ili venis por sportigi cxiuj forkuris de ili krom+ tiu kiu portas la lancon unu el tiuj bestoj alproksimigxis nian+ boaton tial mi gxin atendis kun mia pafilo kaj tuj kiam gxi estis en+ pafspaco mi gxin pafis tra la kapo dufoje gxi subakvigxis kaj dufoje gxi+ suprenlevigxis kaj poste gxi nagxis alteren kaj falis senviva la viroj+ tiom timis pro la pafilbruo kiom ili antauxe timis je la vidajxo de la+ bestoj sed kiam mi faris signojn por ke ili venu al la marbordo ili+ tuj venis++ ili rapidis al sia rabajxo kaj tordante cxirkaux gxi sxnuregon ili gxin+ sendangxere eltiris surteron++ ni nun lasis niajn sovagxulojn kaj iradis dekdu tagojn plu la terbordo+ antaux ni etendis sin kvar aux kvin mejlojn aux kilometrojn+ bekforme kaj ni devis veturi iom de la terbordo por atingi tiun+ terpinton tiel ke ni portempe ne vidis teron++ mi konfidis la direktilon al zuro kaj sidigxis por pripensi tion kion+ estos plej bone nun fari kiam subite mi auxdis ke la knabo krias+ sxipon kun velo sxipon kun velo li ne montris multe da gxojo je la+ vidajxo opiniante ke la sxipo venis por repreni lin sed mi bone+ scias laux la sxajno ke gxi ne estas iu el la sxipoj de la turko++ mi levis kiel eble plej multe da veloj por renkonti la sxipon gxiavoje+ kaj ordonis al zuro ke li ekpafu pafilon cxar mi esperis ke se tiuj+ kiuj estas sur la ferdeko ne povus auxdi la sonon ili vidus la+ fumigadon ili ja gxin vidis kaj tuj demetis siajn velojn por ke ni+ povu atingi ilin kaj trihore ni estis cxe la sxipflanko la viroj+ parolis kun ni per la franca lingvo sed ni ne povis kompreni tion+ kion ili diras fine skoto sursxipe diris per mia lingvo kiu vi+ estas de kien vi venas mi diris al li iomvorte kiel mi liberigxis+ de la mauxroj++ tiam la sxipestro invitis min veni sxipbordon kaj ensxipis min zuron+ kaj cxiujn miajn posedajxojn mi diris al li ke li havu cxion kion mi+ havas sed li respondis vi estas rericevonta viajn posedajxojn post+ kiam ni atingos teron cxar mi por vi nur faris tion kion por mi vi+ farus samstate++ li pagis al mi multan monon por mia boato kaj diris ke mi ricevos+ egalan monon por zuro se mi lin fordonus sed mi diris al li ke+ liberigxinte kun helpo de la knabo mi lin ne volas vendi li diris ke+ estas juste kaj prave por mi tiel senti sed se mi decidus fordoni+ zuron li estus liberigota dujare tial cxar la sklavo deziris iri mi+ nenial diris ne trisemajne mi alvenis al cxiuj sanktuloj golfeto kaj+ nun mi estis liberulo++ mi ricevis multan monon por cxiujn miaj posedajxoj kaj kun gxi mi iris+ surteron sed mi tute ne sciis kion nun fari fine mi renkontis+ viron kies stato estas laux la mia kaj ni ambaux akiris pecon da tero+ por gxin prilabori mia farmilaro laux la lia estis malgranda sed ni+ produktigis la farmojn suficxe por subteni nin sed ne plu ni bezonis+ helpon kaj nun mi eksentis ke mi eraris ellasante la knabon++ mi tute ne sxatis tiun manieron de vivo kion mi pensis cxu mi venis+ tian longan vojon por fari tion kion mi lauxbone povus fari hejme kaj+ kun miaj parencoj cxirkaux mi kaj pligrandigxis mia malgxojo cxar la+ bonamiko kiu min alsxipis tien-cxi intencas nune lasi tiun-cxi+ terbordon++ kiam mi estis knabo kaj ekiris surmaron mi metis en la manojn de mia+ onklino iom da mono pri kiu mia bonamiko diris ke mi bone farus se+ mi gxin elspezus pro mia bieno tial post kiam li revenis hejmon li+ alsendis iom da gxi kontante kaj la restajxon kiel tukoj sxtofoj+ lanajxoj kaj similajxoj kiujn li acxetis mia onklino tiam metis en+ liajn manojn iom da livroj kiel donaco al li por montri sian+ dankecon pro cxio kion li faris por mi kaj per tiu mono li afable+ acxetis sklavon por mi intertempe mi jam acxetis sklavon tial mi nun+ havas du kaj cxio prosperis dum la sekvanta jaro+ </text>+</lipsum>\ No newline at end of filediff --git a/src/app/dev/DevToys.Tools/Assets/Lipsums/theraven.xml b/src/app/dev/DevToys.Tools/Assets/Lipsums/theraven.xmlnew file mode 100644index 000000000..fc588c357--- /dev/null+++ b/src/app/dev/DevToys.Tools/Assets/Lipsums/theraven.xml@@ -0,0 +1,134 @@+<?xml version="1.0" encoding="utf-8"?>++<lipsum>+ <copyright>This text is under public domain</copyright>+ <title>The Raven</title>+ <author>Edgar Allan Poe</author>+ <text>+ once upon a midnight dreary while i pondered weak and weary+ over many a quaint and curious volume of forgotten lore+ while i nodded nearly napping suddenly there came a tapping+ as of some one gently rapping rapping at my chamber door+ tis some visiter i muttered tapping at my chamber door+ only this and nothing more++ ah distinctly i remember it was in the bleak december+ and each separate dying ember wrought its ghost upon the floor+ eagerly i wished the morrow vainly i had sought to borrow+ from my books surcease of sorrowsorrow for the lost lenore+ for the rare and radiant maiden whom the angels name lenore+ nameless here for evermore++ and the silken sad uncertain rustling of each purple curtain+ thrilled mefilled me with fantastic terrors never felt before+ so that now to still the beating of my heart i stood repeating+ tis some visiter entreating entrance at my chamber door+ some late visiter entreating entrance at my chamber door+ this it is and nothing more++ presently my soul grew stronger hesitating then no longer+ sir said i or madam truly your forgiveness i implore+ but the fact is i was napping and so gently you came rapping+ and so faintly you came tapping tapping at my chamber door+ that i scarce was sure i heard youhere i opened wide the door+ darkness there and nothing more++ deep into that darkness peering long i stood there wondering fearing+ doubting dreaming dreams no mortals ever dared to dream before+ but the silence was unbroken and the stillness gave no token+ and the only word there spoken was the whispered word lenore+ this i whispered and an echo murmured back the word lenore+ merely this and nothing more++ back into the chamber turning all my soul within me burning+ soon again i heard a tapping something louder than before+ surely said i surely that is something at my window lattice+ let me see then what thereat is and this mystery explore+ let my heart be still a moment and this mystery explore+ tis the wind and nothing more++ open here i flung the shutter when with many a flirt and flutter+ in there stepped a stately raven of the saintly days of yore+ not the least obeisance made he not a minute stopped or stayed he+ but with mien of lord or lady perched above my chamber door+ perched upon a bust of pallas just above my chamber door+ perched and sat and nothing more++ then the ebony bird beguiling my sad fancy into smiling+ by the grave and stern decorum of the countenance it wore+ though thy crest be shorn and shaven thou i said art sure no craven+ ghastly grim and ancient raven wandering from the nightly shore+ tell me what thy lordly name is on the nights plutonian shore+ quoth the raven nevermore++ much i marvelled this ungainly fowl to hear discourse so plainly+ though its answer little meaninglittle relevancy bore+ for we cannot help agreeing that no living human being+ ever yet was blessed with seeing bird above his chamber door+ bird or beast upon the sculptured bust above his chamber door+ with such name as nevermore++ but the raven sitting lonely on that placid bust spoke only+ that one word as if its soul in that one word he did outpour+ nothing farther then he uttered not a feather then he fluttered+ till i scarcely more than muttered other friends have flown before+ on the morrow he will leave me as my hopes have flown before+ then the bird said nevermore++ startled at the stillness broken by reply so aptly spoken+ doubtless said i what it utters is its only stock and store+ caught from some unhappy master whom unmerciful disaster+ followed fast and followed faster till his songs one burden bore+ till the dirges of his hope that melancholy burden bore+ of nevernevermore++ but the raven still beguiling all my sad soul into smiling+ straight i wheeled a cushioned seat in front of bird and bust and door+ then upon the velvet sinking i betook myself to linking+ fancy unto fancy thinking what this ominous bird of yore+ what this grim ungainly ghastly gaunt and ominous bird of yore+ meant in croaking nevermore++ this i sat engaged in guessing but no syllable expressing+ to the fowl whose fiery eyes now burned into my bosoms core+ this and more i sat divining with my head at ease reclining+ on the cushions velvet lining that the lamplight gloated oer+ but whose velvet violet lining with the lamplight gloating oer+ she shall press ah nevermore++ then methought the air grew denser perfumed from an unseen censer+ swung by seraphim whose footfalls tinkled on the tufted floor+ wretch i cried thy god hath lent theeby these angels he hath sent thee+ respiterespite and nepenthe from thy memories of lenore+ quaff oh quaff this kind nepenthe and forget this lost lenore+ quoth the raven nevermore++ prophet said i thing of evilprophet still if bird or devil+ whether tempter sent or whether tempest tossed thee here ashore+ desolate yet all undaunted on this desert land enchanted+ on this home by horror hauntedtell me truly i implore+ is thereis there balm in gileadtell metell me i implore+ quoth the raven nevermore++ prophet said i thing of evilprophet still if bird or devil+ by that heaven that bends above usby that god we both adore+ tell this soul with sorrow laden if within the distant aidenn+ it shall clasp a sainted maiden whom the angels name lenore+ clasp a rare and radiant maiden whom the angels name lenore+ quoth the raven nevermore++ be that our sign of parting bird or fiend i shrieked upstarting+ get thee back into the tempest and the nights plutonian shore+ leave no black plume as a token of that lie thy soul has spoken+ leave my loneliness unbrokenquit the bust above my door+ take thy beak from out my heart and take thy form from off my door+ quoth the raven nevermore++ and the raven never flitting still is sitting still is sitting+ on the pallid bust of pallas just above my chamber door+ and his eyes have all the seeming of a demons that is dreaming+ and the lamplight oer him streaming throws his shadows on the floor+ and my soul from out that shadow that lies floating on the floor+ shall be liftednevermore+ </text>+</lipsum>\ No newline at end of filediff --git a/src/app/dev/DevToys.Tools/Assets/Lipsums/tierrayluna.xml b/src/app/dev/DevToys.Tools/Assets/Lipsums/tierrayluna.xmlnew file mode 100644index 000000000..9bf2ddff2--- /dev/null+++ b/src/app/dev/DevToys.Tools/Assets/Lipsums/tierrayluna.xml@@ -0,0 +1,58 @@+<?xml version="1.0" encoding="utf-8"?>++<lipsum>+ <copyright>This text is under public domain</copyright>+ <title>Tierra y Luna</title>+ <author>Federico García Lorca</author>+ <text>+ me quedo con el transparente hombrecillo+ que come los huevos de la golondrina+ me quedo con el nino desnudo+ que pisotean los borrachos de brooklyn+ con las criaturas mudas que pasan bajo los arcos+ con el arroyo de venas ansioso de abrir sus manecitas++ tierra tan sólo tierra+ tierra para los manteles estremecidos+ para la pupila viciosa de nube+ para las heridas recientes y el húmedo pensamiento+ tierra para todo lo que huye de la tierra++ no es la ceniza en vilo de las cosas quemadas+ ni los muertos que mueven sus lenguas bajo los árboles+ es la tierra desnuda que bala por el cielo+ y deja atrás los grupos ligeros de ballenas++ es la tierra alegrísima imperturbable nadadora+ la que yo encuentro en el nino y en las criaturas que pasan los arcos+ viva la tierra de mi pulso y del baile de los helechos+ que deja a veces por el aire un duro perfil de faraón++ me quedo con la mujer fría+ donde se queman los musgos inocentes+ me quedo con los borrachos de brooklyn+ que pisan al nino desnudo+ me quedo con los signos desgarrados+ de la lenta comida de los osos++ pero entonces baja la luna despenada por las escaleras+ poniendo las ciudades de hule celeste y talco sensitivo+ llenando los pies de mármol la llanura sin recodos+ y olvidando bajo las sillas diminutas carcajadas de algodón++ oh diana diana diana vacía+ convexa resonancia donde la abeja se vuelve loca+ mi amor de paso tránsito larga muerte gustada+ nunca la piel ilesa de tu desnudo huido++ es tierra dios mío tierra lo que vengo buscando+ embozo de horizonte latido y sepultura+ es dolor que se acaba y amor que se consume+ torre de sangre abierta con las manos quemadas++ pero la luna subía y bajaba las escaleras+ repartiendo lentejas desangradas en los ojos+ dando escobazos de plata a los ninos de los muelles+ y borrando mi apariencia por el término del aire+ </text>+</lipsum>\ No newline at end of filediff --git a/src/app/dev/DevToys.Tools/DevToys.Tools.csproj b/src/app/dev/DevToys.Tools/DevToys.Tools.csprojindex 8dcfa7b1b..25b626041 100644--- a/src/app/dev/DevToys.Tools/DevToys.Tools.csproj+++ b/src/app/dev/DevToys.Tools/DevToys.Tools.csproj@@ -108,6 +108,11 @@<AutoGen>True</AutoGen><DependentUpon>HashAndChecksumGenerator.resx</DependentUpon></Compile>+ <Compile Update="Tools\Generators\LoremIpsum\LoremIpsumGenerator.Designer.cs">+ <DesignTime>True</DesignTime>+ <AutoGen>True</AutoGen>+ <DependentUpon>LoremIpsumGenerator.resx</DependentUpon>+ </Compile><Compile Update="Tools\Generators\Password\PasswordGenerator.Designer.cs"><DesignTime>True</DesignTime><AutoGen>True</AutoGen>@@ -225,6 +230,10 @@<Generator>ResXFileCodeGenerator</Generator><LastGenOutput>HashAndChecksumGenerator.Designer.cs</LastGenOutput></EmbeddedResource>+ <EmbeddedResource Update="Tools\Generators\LoremIpsum\LoremIpsumGenerator.resx">+ <Generator>ResXFileCodeGenerator</Generator>+ <LastGenOutput>LoremIpsumGenerator.Designer.cs</LastGenOutput>+ </EmbeddedResource><EmbeddedResource Update="Tools\Generators\Password\PasswordGenerator.resx"><Generator>ResXFileCodeGenerator</Generator><LastGenOutput>PasswordGenerator.Designer.cs</LastGenOutput>@@ -274,6 +283,19 @@<ItemGroup><EmbeddedResource Include="..\..\..\..\assets\font\DevToys-Tools-Icons.ttf" Link="Assets\fonts\DevToys-Tools-Icons.ttf" /><EmbeddedResource Include="Assets\GitHubMarkdown\index.html" />+ <EmbeddedResource Include="Assets\Lipsums\childharold.xml" />+ <EmbeddedResource Include="Assets\Lipsums\decameron.xml" />+ <EmbeddedResource Include="Assets\Lipsums\faust.xml" />+ <EmbeddedResource Include="Assets\Lipsums\inderfremde.xml" />+ <EmbeddedResource Include="Assets\Lipsums\lebateauivre.xml" />+ <EmbeddedResource Include="Assets\Lipsums\lemasque.xml" />+ <EmbeddedResource Include="Assets\Lipsums\LICENSE.MD" />+ <EmbeddedResource Include="Assets\Lipsums\loremipsum.xml" />+ <EmbeddedResource Include="Assets\Lipsums\nagyonfaj.xml" />+ <EmbeddedResource Include="Assets\Lipsums\omagyar.xml" />+ <EmbeddedResource Include="Assets\Lipsums\robinsonokruso.xml" />+ <EmbeddedResource Include="Assets\Lipsums\theraven.xml" />+ <EmbeddedResource Include="Assets\Lipsums\tierrayluna.xml" /></ItemGroup><ItemGroup>diff --git a/src/app/dev/DevToys.Tools/Helpers/LoremIpsum/Features.cs b/src/app/dev/DevToys.Tools/Helpers/LoremIpsum/Features.csnew file mode 100644index 000000000..485773bc5--- /dev/null+++ b/src/app/dev/DevToys.Tools/Helpers/LoremIpsum/Features.cs@@ -0,0 +1,11 @@+// Forked from https://github.com/alexcpendleton/NLipsum++namespace DevToys.Tools.Helpers.LoremIpsum;++internal enum Features+{+ Paragraphs,+ Sentences,+ Words,+ Characters+}diff --git a/src/app/dev/DevToys.Tools/Helpers/LoremIpsum/FormatStrings.cs b/src/app/dev/DevToys.Tools/Helpers/LoremIpsum/FormatStrings.csnew file mode 100644index 000000000..cc28638c0--- /dev/null+++ b/src/app/dev/DevToys.Tools/Helpers/LoremIpsum/FormatStrings.cs@@ -0,0 +1,51 @@+// Forked from https://github.com/alexcpendleton/NLipsum++namespace DevToys.Tools.Helpers.LoremIpsum;++/// <summary>+/// Common formatting strings.+/// </summary>+internal static class FormatStrings+{+ /// <summary>+ /// A string with no formatting.+ /// </summary>+ internal static string Unformatted => "{0}";++ /// <summary>+ /// Formatting strings for Paragraphs.+ /// </summary>+ internal static class Paragraph+ {+ /// <summary>+ /// An Html paragraph. "<p>Lorem ipsum dolor sit amet</p>"+ /// </summary>+ public static string Html => "<p>{0}</p>";++ /// <summary>+ /// A block of text ending with a new line and/or carriage return (based on Environment).+ /// </summary>+ public static string LineBreaks => "{0}" + Environment.NewLine + Environment.NewLine;+ }++ /// <summary>+ /// Formatting strings for Sentences.+ /// </summary>+ internal static class Sentence+ {+ /// <summary>+ /// A typical sentence ending with a period/full stop. "Lorem ipsum dolor sit amet."+ /// </summary>+ public static string Phrase => "{0}.";++ /// <summary>+ /// A sentence ending with a question mark.. "Lorem ipsum dolor sit amet?"+ /// </summary>+ public static string Question => "{0}?";++ /// <summary>+ /// An sentence ending with an exclamation point/mark. "Lorem ipsum dolor sit amet!"+ /// </summary>+ public static string Exclamation => "{0}!";+ }+}diff --git a/src/app/dev/DevToys.Tools/Helpers/LoremIpsum/LipsumGenerator.cs b/src/app/dev/DevToys.Tools/Helpers/LoremIpsum/LipsumGenerator.csnew file mode 100644index 000000000..b83944875--- /dev/null+++ b/src/app/dev/DevToys.Tools/Helpers/LoremIpsum/LipsumGenerator.cs@@ -0,0 +1,279 @@+// Forked from https://github.com/alexcpendleton/NLipsum++using System.Text;+using System.Text.RegularExpressions;++namespace DevToys.Tools.Helpers.LoremIpsum;++/// <summary>+/// Represents a utility that generates Lipsum from a source.+/// </summary>+internal sealed class LipsumGenerator+{+ private const string LoremIpsumStartText = "Lorem ipsum dolor sit amet";++ private LipsumsCorpus _lipsum = LipsumsCorpus.LoremIpsum;+ private StringBuilder _lipsumText = new();+ private IReadOnlyList<string> _preparedWords = Array.Empty<string>();++ internal LipsumGenerator(LipsumsCorpus lipsum)+ {+ _lipsum = lipsum;+ LipsumText = new StringBuilder(Lipsums.GetText(lipsum));+ }++ internal LipsumGenerator(string rawData, bool isXml)+ {+ /*+ * If we're receiving an XML string we need to do some+ * parsing to retrieve the lipsum text.+ */+ LipsumText = isXml ?+ LipsumUtilities.GetTextFromRawXml(rawData) : new StringBuilder(rawData);+ }++ /// <summary>+ /// Gets or sets the text used to generate lipsum.+ /// </summary>+ internal StringBuilder LipsumText+ {+ get => _lipsumText;+ set+ {+ _lipsumText = value;+ PreparedWords = PrepareWords();+ }+ }++ /// <summary>+ /// Gets the words prepared from the LipsumText.+ /// </summary>+ internal IReadOnlyList<string> PreparedWords+ {+ get => _preparedWords;+ private set => _preparedWords = value;+ }++ /// <summary>+ /// Generates 'count' features. The format string will be applied to the feature not the result.+ /// </summary>+ /// <param name="count">How many features are desired.</param>+ /// <param name="feature">The desired feature, such as Paragraph or Sentence.</param>+ /// <returns></returns>+ internal string GenerateLipsum(int count, Features feature)+ {+ var results = new StringBuilder();+ string[] data;+ TextFeature? options = null;+ if (feature == Features.Paragraphs)+ {+ data = GenerateParagraphs(count, FormatStrings.Paragraph.LineBreaks);+ }+ else if (feature == Features.Sentences)+ {+ data = GenerateSentences(count, FormatStrings.Sentence.Phrase);+ options = Sentence.Medium;+ }+ else if (feature == Features.Words)+ {+ data = GenerateWords(count);+ options = Word.Medium;+ }+ else if (feature == Features.Characters)+ {+ data = GenerateCharacters(count);+ }+ else+ {+ throw new NotImplementedException();+ }++ int length = data.Length;+ for (int i = 0; i < length; i++)+ {+ results.Append(data[i]);+ if (options is not null)+ {+ results.Append(options.Delimiter);+ }+ }++ string result = results.ToString();++ // If the user has selected the Lorem Ipsum lipsum, we want to always start the result by "Lorem ipsum dolor sit amet".+ if (_lipsum == LipsumsCorpus.LoremIpsum+ && (feature == Features.Sentences || feature == Features.Paragraphs))+ {+ result = ApplyStartWords(LoremIpsumStartText, result);+ }++ return result.Trim();+ }++ /// <summary>+ /// Generates a single string (in an array with only this as an element)+ /// by getting the first 'count' characters from LipsumText.+ /// </summary>+ /// <param name="count"></param>+ /// <param name="formatString"></param>+ /// <returns></returns>+ internal string[] GenerateCharacters(int count)+ {+ string[] result = new string[1];++ /* This whole method needs some thought.+ * Right now it just grabs 'count' amount+ * of characters from the beginning of the+ * LipsumText. It'd be nice if it could+ * generate sentences and then truncate them+ * but I can't think of an elegant way to+ * do that at the moment. TODO. */++ if (count >= LipsumText.Length)+ {+ count = LipsumText.Length - 1;+ }+ char[] chars = LipsumText.ToString().Substring(0, count).ToCharArray();++ result[0] = new string(chars);++ return result;+ }++ /// <summary>+ /// Generates 'count' medium-sized paragraphs of lipsum text.+ /// </summary>+ /// <param name="count">The number of paragraphs desired.</param>+ /// <param name="formatString">The string used to format the paragraphs. Will not perform formatting if null or empty.</param>+ private string[] GenerateParagraphs(int count, string formatString)+ {+ Paragraph options = Paragraph.Medium;+ options.FormatString = formatString;+ return GenerateParagraphs(count, options);+ }++ /// <summary>+ /// Generates 'count' paragraphs of lipsum text.+ /// </summary>+ /// <param name="count">The number of paragraphs desired.</param>+ /// <param name="options">Used to determine the minimum and maximum sentences per paragraphs, and format string if applicable.</param>+ /// <returns></returns>+ internal string[] GenerateParagraphs(int count, Paragraph options)+ {+ /*+ * TODO: These generate methods could probably be+ * refactored into one method that takes a count+ * and a TextFeature. */+ string[] paragraphs = new string[count];+ string[] sentences = new string[] { };+ for (int i = 0; i < count; i++)+ {+ /* Get a random amount of sentences based on the+ * min and max from the paragraph options */+ sentences = GenerateSentences(LipsumUtilities.+ RandomInt((int)options.GetMinimum(), (int)options.GetMaximum()));++ // Shove them all together in sentence fashion.+ string joined = string.Join(options.Delimiter, sentences);++ // Format if allowed.+ paragraphs[i] = string.IsNullOrEmpty(options.FormatString) ?+ joined : options.Format(joined);+ }++ return paragraphs;+ }++ /// <summary>+ /// Generates 'count' sentences of lipsum text, using a Medium length sentence. Will use Phase formatting.+ /// </summary>+ /// <param name="count">The number of sentences desired.</param>+ private string[] GenerateSentences(int count)+ {+ return GenerateSentences(count, FormatStrings.Sentence.Phrase);+ }++ /// <summary>+ /// Generates 'count' sentences of lipsum text, using a Medium length sentence.+ /// </summary>+ /// <param name="count">The number of sentences desired.</param>+ /// <param name="formatString">The string used to format the sentences. Will not perform formatting if null or empty.</param>+ /// <returns></returns>+ private string[] GenerateSentences(int count, string formatString)+ {+ Sentence options = Sentence.Medium;+ options.FormatString = formatString;+ return GenerateSentences(count, options);+ }++ /// <summary>+ /// Generates 'count' sentences of lipsum text.+ /// If options.FormatString is not null or empty that string used to format the sentences.+ /// </summary>+ /// <param name="count">The number of sentences desired.</param>+ /// <param name="options">Used to determine the minimum and maximum words per sentence, and format string if applicable.</param>+ /// <returns></returns>+ internal string[] GenerateSentences(int count, Sentence options)+ {+ string[] sentences = new string[count];+ string[] words = new string[] { };++ for (int i = 0; i < count; i++)+ {+ /* Get a random amount of words based on the+ * min and max from the Sentence options */+ words = GenerateWords(LipsumUtilities.+ RandomInt((int)options.MinimumWords, (int)options.MaximumWords));++ // Shove them all together in sentence fashion.+ string joined = string.Join(options.Delimiter, words);++ // Format if allowed.+ sentences[i] = string.IsNullOrEmpty(options.FormatString) ?+ joined : options.Format(joined);+ }++ return sentences;+ }++ /// <summary>+ /// Generates the amount of lipsum words.+ /// </summary>+ /// <param name="count">The amount of words to generate.</param>+ /// <returns></returns>+ internal string[] GenerateWords(int count)+ {+ string[] words = new string[count];++ for (int i = 0; i < count; i++)+ {+ words[i] = LipsumUtilities.RandomElement(PreparedWords);+ }++ return words;+ }++ /// <summary>+ /// Retrieves all of the words in the <see cref="LipsumText"/> as an array.+ /// </summary>+ /// <returns></returns>+ private IReadOnlyList<string> PrepareWords()+ {+ return LipsumUtilities.RemoveEmptyElements(Regex.Split(LipsumText.ToString(), @"\s"));+ }++ private static string ApplyStartWords(string startText, string originalText)+ {+ if (string.IsNullOrWhiteSpace(startText))+ {+ return originalText;+ }++ char space = ' ';+ string[] startTokens = (startText ?? "").Split(space, StringSplitOptions.RemoveEmptyEntries);+ string[] endTokens = (originalText ?? "").Split(space, StringSplitOptions.RemoveEmptyEntries);+ int wordsNeeded = Math.Min(startTokens.Length, endTokens.Length);++ return string.Join(space, startTokens.Take(wordsNeeded).Concat(endTokens.Skip(wordsNeeded)));+ }+}diff --git a/src/app/dev/DevToys.Tools/Helpers/LoremIpsum/LipsumUtilities.cs b/src/app/dev/DevToys.Tools/Helpers/LoremIpsum/LipsumUtilities.csnew file mode 100644index 000000000..229863bff--- /dev/null+++ b/src/app/dev/DevToys.Tools/Helpers/LoremIpsum/LipsumUtilities.cs@@ -0,0 +1,92 @@+// Forked from https://github.com/alexcpendleton/NLipsum++using System.Text;+using System.Xml.Linq;++namespace DevToys.Tools.Helpers.LoremIpsum;++internal static class LipsumUtilities+{+ /// <summary>+ /// Reads raw Xml and grabs the <text> node's inner text.+ /// </summary>+ /// <param name="rawXml">The Xml to be parsed.+ /// It should follow the lipsum.dtd but really all it needs+ /// a text node as a child of the document element.+ /// (<root><text>your lipsum text</text></root>+ /// </param>+ /// <returns></returns>+ internal static StringBuilder GetTextFromRawXml(string rawXml)+ {+ var text = new StringBuilder();+ XDocument data = LoadXmlDocument(rawXml);+ Guard.IsNotNull(data.Root);+ XElement? textNode = data.Root.Element("text");+ if (textNode != null)+ {+ text.Append(textNode.Value);+ }++ return text;+ }++ /// <summary>+ /// Creates an XDocument from a string.+ /// </summary>+ /// <param name="rawXml">The Xml from which to load the XDocument</param>+ /// <returns></returns>+ private static XDocument LoadXmlDocument(string rawXml)+ {+ var document = XDocument.Parse(rawXml);+ return document;+ }++ /* Is this the best way to do this?+ * It seems smelly to have a static member+ * for randoms.+ */+ private static readonly Random rand = new();++ /// <summary>+ /// Get a random integer.+ /// </summary>+ /// <param name="min">The minimum value.</param>+ /// <param name="max">The maximum value.</param>+ /// <returns></returns>+ internal static int RandomInt(int min, int max)+ {+ int i = rand.Next(min, max);+ return i;+ }++ /// <summary>+ /// Gets a random element from a string array.+ /// </summary>+ /// <param name="source">The array from which to retrieve a random element.</param>+ /// <returns></returns>+ internal static string RandomElement(IReadOnlyList<string> source)+ {+ return source[RandomInt(0, source.Count - 1)];+ }++ /// <summary>+ /// Removes empty elements from an array.+ /// </summary>+ /// <param name="source">The array from which to remove empty items.</param>+ /// <returns></returns>+ internal static IReadOnlyList<string> RemoveEmptyElements(string[] source)+ {+ var results = new List<string>();+ int length = source.Length;++ for (int i = 0; i < length; i++)+ {+ if (source[i] != null && source[i].Trim().Length > 0)+ {+ results.Add(source[i]);+ }+ }++ return results;+ }+}diff --git a/src/app/dev/DevToys.Tools/Helpers/LoremIpsum/Lipsums.cs b/src/app/dev/DevToys.Tools/Helpers/LoremIpsum/Lipsums.csnew file mode 100644index 000000000..e6b8b671e--- /dev/null+++ b/src/app/dev/DevToys.Tools/Helpers/LoremIpsum/Lipsums.cs@@ -0,0 +1,47 @@+// Forked from https://github.com/alexcpendleton/NLipsum++using System.Reflection;++namespace DevToys.Tools.Helpers.LoremIpsum;++/// <summary>+/// All of these Lipsums are derived from the files at http://lipsum.sourceforge.net/+/// </summary>+internal static class Lipsums+{+ internal static string GetText(LipsumsCorpus lipsum)+ {+ return lipsum switch+ {+ LipsumsCorpus.ChildHarold => GetTextFromRawXml("childharold"),+ LipsumsCorpus.Decameron => GetTextFromRawXml("decameron"),+ LipsumsCorpus.Faust => GetTextFromRawXml("faust"),+ LipsumsCorpus.InDerFremde => GetTextFromRawXml("inderfremde"),+ LipsumsCorpus.LeBateauIvre => GetTextFromRawXml("lebateauivre"),+ LipsumsCorpus.LeMasque => GetTextFromRawXml("lemasque"),+ LipsumsCorpus.LoremIpsum => GetTextFromRawXml("loremipsum"),+ LipsumsCorpus.NagyonFaj => GetTextFromRawXml("nagyonfaj"),+ LipsumsCorpus.Omagyar => GetTextFromRawXml("omagyar"),+ LipsumsCorpus.RobinsonoKruso => GetTextFromRawXml("robinsonokruso"),+ LipsumsCorpus.TheRaven => GetTextFromRawXml("theraven"),+ LipsumsCorpus.TierrayLuna => GetTextFromRawXml("tierrayluna"),+ _ => throw new NotSupportedException(),+ };+ }++ private static string GetTextFromRawXml(string resourceName)+ {+ return LipsumUtilities.GetTextFromRawXml(ReadEmbeddedResource(resourceName)).ToString();+ }++ private static string ReadEmbeddedResource(string name)+ {+ var assembly = Assembly.GetExecutingAssembly();+ string resourceName = $"DevToys.Tools.Assets.Lipsums.{name}.xml";++ using Stream stream = assembly.GetManifestResourceStream(resourceName)!;+ using StreamReader reader = new(stream, System.Text.Encoding.UTF8);+ string text = reader.ReadToEnd();+ return text;+ }+}diff --git a/src/app/dev/DevToys.Tools/Helpers/LoremIpsum/LipsumsCorpus.cs b/src/app/dev/DevToys.Tools/Helpers/LoremIpsum/LipsumsCorpus.csnew file mode 100644index 000000000..ac6ef9b75--- /dev/null+++ b/src/app/dev/DevToys.Tools/Helpers/LoremIpsum/LipsumsCorpus.cs@@ -0,0 +1,17 @@+namespace DevToys.Tools.Helpers.LoremIpsum;++internal enum LipsumsCorpus+{+ ChildHarold,+ Decameron,+ Faust,+ InDerFremde,+ LeBateauIvre,+ LeMasque,+ LoremIpsum,+ NagyonFaj,+ Omagyar,+ RobinsonoKruso,+ TheRaven,+ TierrayLuna+}diff --git a/src/app/dev/DevToys.Tools/Helpers/LoremIpsum/Paragraph.cs b/src/app/dev/DevToys.Tools/Helpers/LoremIpsum/Paragraph.csnew file mode 100644index 000000000..cf2e10a17--- /dev/null+++ b/src/app/dev/DevToys.Tools/Helpers/LoremIpsum/Paragraph.cs@@ -0,0 +1,68 @@+// Forked from https://github.com/alexcpendleton/NLipsum++namespace DevToys.Tools.Helpers.LoremIpsum;++/// <summary>+/// A Paragraph that can be formatted..+/// </summary>+internal sealed class Paragraph : TextFeature+{+ private Sentence _sentenceOptions = Sentence.Medium;++ /// <summary>+ /// Instantiates a paragraph with no formatting.+ /// </summary>+ /// <param name="minSentences">The minimum amount of sentences to be included in this paragraph.</param>+ /// <param name="maxSentences">The maximum amount of sentences to be included in this paragraph.</param>+ internal Paragraph(uint minSentences, uint maxSentences)+ : this(minSentences, maxSentences, FormatStrings.Unformatted) { }++ internal Paragraph(uint minSentences, uint maxSentences, string formatString)+ {+ MinimumSentences = minSentences;+ MaximumSentences = maxSentences;+ FormatString = formatString;+ }++ /// <summary>+ /// Gets or sets the minimum amount of sentences in this paragraph.+ /// </summary>+ internal uint MinimumSentences+ {+ get => MinimumValue;+ set => MinimumValue = value;+ }++ /// <summary>+ /// Gets or sets the maximum amount of words in this paragraph.+ /// </summary>+ internal uint MaximumSentences+ {+ get => MaximumValue;+ set => MaximumValue = value;+ }++ /// <summary>+ /// Gets a Short Paragraph. (MinimumSentences = 2, MaximumSentences=8)+ /// </summary>+ internal static Paragraph Short => new(2, 8);++ /// <summary>+ /// Gets a Medium length Paragraph. (MinimumSentences = 3, MaximumSentences=20)+ /// </summary>+ internal static Paragraph Medium => new(3, 20);++ /// <summary>+ /// Gets a Long Paragraph. (MinimumSentences = 6, MaximumSentences=40)+ /// </summary>+ internal static Paragraph Long => new(6, 40);++ /// <summary>+ /// Gets or sets the options for the sentences in this paragraph. Default is Sentence.Medium+ /// </summary>+ internal Sentence SentenceOptions+ {+ get => _sentenceOptions;+ set => _sentenceOptions = value;+ }+}diff --git a/src/app/dev/DevToys.Tools/Helpers/LoremIpsum/Sentence.cs b/src/app/dev/DevToys.Tools/Helpers/LoremIpsum/Sentence.csnew file mode 100644index 000000000..e27b2b7dc--- /dev/null+++ b/src/app/dev/DevToys.Tools/Helpers/LoremIpsum/Sentence.cs@@ -0,0 +1,73 @@+// Forked from https://github.com/alexcpendleton/NLipsum++namespace DevToys.Tools.Helpers.LoremIpsum;++/// <summary>+/// A sentence that can be formatted.+/// </summary>+internal sealed class Sentence : TextFeature+{+ /// <summary>+ /// Instantiates a sentence with Phrase formatting.+ /// </summary>+ /// <param name="minWords">The minimum amount of words to be included in this sentence.</param>+ /// <param name="maxWords">The maximum amount of words to be included in this sentence.</param>+ internal Sentence(uint minWords, uint maxWords)+ : this(minWords, maxWords, FormatStrings.Sentence.Phrase) { }++ /// <summary>+ /// Instantiates a sentence based on the passed criteria.+ /// </summary>+ /// <param name="minWords">The minimum amount of words to be included in this sentence.</param>+ /// <param name="maxWords">The maximum amount of words to be included in this sentence.</param>+ /// <param name="formatString">The string used to format this sentence.</param>+ internal Sentence(uint minWords, uint maxWords, string formatString)+ {+ FormatString = formatString;+ MinimumWords = minWords;+ MaximumWords = maxWords;+ }++ /// <summary>+ /// Gets or sets the minimum amount of words in this sentence.+ /// </summary>+ internal uint MinimumWords+ {+ get => MinimumValue;+ set => MinimumValue = value;+ }++ /// <summary>+ /// Gets or sets the maximum amount of words in this sentence.+ /// </summary>+ internal uint MaximumWords+ {+ get => MaximumValue;+ set => MaximumValue = value;+ }++ /// <summary>+ /// Gets a Short Sentence. (MinimumWords = 2, MaximumWords=8)+ /// </summary>+ internal static Sentence Short => new(2, 8);++ /// <summary>+ /// Gets a Medium length Sentence. (MinimumWords = 3, MaximumWords=20)+ /// </summary>+ internal static Sentence Medium => new(3, 20);++ /// <summary>+ /// Gets a Long Sentence. (MinimumWords = 6, MaximumWords=40)+ /// </summary>+ internal static Sentence Long => new(6, 40);++ internal override string Format(string text)+ {+ string result = base.Format(text);+ if (result.Length > 1)+ {+ result = string.Concat(result.Substring(0, 1).ToUpper(), result.AsSpan(1));+ }+ return result;+ }+}diff --git a/src/app/dev/DevToys.Tools/Helpers/LoremIpsum/TextFeature.cs b/src/app/dev/DevToys.Tools/Helpers/LoremIpsum/TextFeature.csnew file mode 100644index 000000000..57aa45f32--- /dev/null+++ b/src/app/dev/DevToys.Tools/Helpers/LoremIpsum/TextFeature.cs@@ -0,0 +1,76 @@+// Forked from https://github.com/alexcpendleton/NLipsum++namespace DevToys.Tools.Helpers.LoremIpsum;++/// <summary>+/// Represents a part or section of text, such as a paragraph or sentence.+/// </summary>+internal abstract class TextFeature+{+ private uint _minimumValue = 0;+ private uint _maximumValue = 0;+ private string _formatString = string.Empty;++ private string _delimiter = " ";++ /// <summary>+ /// Gets or sets the minimum amount of sub features in this feature.+ /// </summary>+ protected uint MinimumValue+ {+ get => _minimumValue;+ set => _minimumValue = value;+ }++ /// <summary>+ /// Gets or sets the maximum amount of sub features in this feature.+ /// </summary>+ protected uint MaximumValue+ {+ get => _maximumValue;+ set => _maximumValue = value;+ }++ /// <summary>+ /// Gets or sets how this feature should be rendered. By default: "{0}." (ends with a period.)+ /// For an html tag you could use "<div>{0}</div>".+ /// You get the picture.+ /// </summary>+ internal string FormatString+ {+ get => _formatString;+ set => _formatString = value;+ }++ /// <summary>+ /// Gets or sets the delimiter between the subparts.+ /// </summary>+ internal string Delimiter+ {+ get => _delimiter;+ set => _delimiter = value;+ }++ /// <summary>+ /// Formats this feature based on its FormatString.+ /// </summary>+ /// <param name="text">The text with which to format the string.</param>+ /// <returns></returns>+ internal virtual string Format(string text)+ {+ return string.Format(FormatString, text);+ }++ /* This kind of smells */+ /// <summary>+ /// Gets the minimum sub feature value.+ /// </summary>+ /// <returns></returns>+ internal uint GetMinimum() { return MinimumValue; }++ /// <summary>+ /// Gets the maximum sub feature value.+ /// </summary>+ /// <returns></returns>+ internal uint GetMaximum() { return MaximumValue; }+}diff --git a/src/app/dev/DevToys.Tools/Helpers/LoremIpsum/Word.cs b/src/app/dev/DevToys.Tools/Helpers/LoremIpsum/Word.csnew file mode 100644index 000000000..cbe9e2872--- /dev/null+++ b/src/app/dev/DevToys.Tools/Helpers/LoremIpsum/Word.cs@@ -0,0 +1,63 @@+namespace DevToys.Tools.Helpers.LoremIpsum;++internal sealed class Word : TextFeature+{+ /// <summary>+ /// Instantiates a medium sized sentence with Phrase formatting.+ /// </summary>+ internal Word() : this(Medium.MinimumValue, Medium.MaximumValue) { }++ /// <summary>+ /// Instantiates a sentence with Phrase formatting.+ /// </summary>+ /// <param name="minWords">The minimum amount of words to be included in this sentence.</param>+ /// <param name="maxWords">The maximum amount of words to be included in this sentence.</param>+ internal Word(uint minWords, uint maxWords)+ : this(minWords, maxWords, FormatStrings.Unformatted) { }++ /// <summary>+ /// Instantiates a sentence based on the passed criteria.+ /// </summary>+ /// <param name="minWords">The minimum amount of words to be included in this sentence.</param>+ /// <param name="maxWords">The maximum amount of words to be included in this sentence.</param>+ /// <param name="formatString">The string used to format this sentence.</param>+ internal Word(uint minWords, uint maxWords, string formatString)+ {+ FormatString = formatString;+ MinimumValue = minWords;+ MaximumValue = maxWords;+ }++ /// <summary>+ /// Gets or sets the minimum amount of characters in this word.+ /// </summary>+ internal uint MinimumCharacters+ {+ get => MinimumValue;+ set => MinimumValue = value;+ }++ /// <summary>+ /// Gets or sets the maximum amount of characters in this word.+ /// </summary>+ internal uint MaximumCharacters+ {+ get => MaximumValue;+ set => MaximumValue = value;+ }++ /// <summary>+ /// Gets a Short Sentence. (MinimumWords = 2, MaximumWords=8)+ /// </summary>+ internal static Word Short => new(1, 3);++ /// <summary>+ /// Gets a Medium length Sentence. (MinimumWords = 3, MaximumWords=20)+ /// </summary>+ internal static Word Medium => new(4, 8);++ /// <summary>+ /// Gets a Long Sentence. (MinimumWords = 6, MaximumWords=40)+ /// </summary>+ internal static Word Long => new(10, 25);+}diff --git a/src/app/dev/DevToys.Tools/Tools/Generators/LoremIpsum/LoremIpsumGenerator.Designer.cs b/src/app/dev/DevToys.Tools/Tools/Generators/LoremIpsum/LoremIpsumGenerator.Designer.csnew file mode 100644index 000000000..ef70badb9--- /dev/null+++ b/src/app/dev/DevToys.Tools/Tools/Generators/LoremIpsum/LoremIpsumGenerator.Designer.cs@@ -0,0 +1,333 @@+//------------------------------------------------------------------------------+// <auto-generated>+// This code was generated by a tool.+// Runtime Version:4.0.30319.42000+//+// Changes to this file may cause incorrect behavior and will be lost if+// the code is regenerated.+// </auto-generated>+//------------------------------------------------------------------------------++namespace DevToys.Tools.Tools.Generators.LoremIpsum {+ using System;+++ /// <summary>+ /// A strongly-typed resource class, for looking up localized strings, etc.+ /// </summary>+ // This class was auto-generated by the StronglyTypedResourceBuilder+ // class via a tool like ResGen or Visual Studio.+ // To add or remove a member, edit your .ResX file then rerun ResGen+ // with the /str option, or rebuild your VS project.+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]+ internal class LoremIpsumGenerator {++ private static global::System.Resources.ResourceManager resourceMan;++ private static global::System.Globalization.CultureInfo resourceCulture;++ [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]+ internal LoremIpsumGenerator() {+ }++ /// <summary>+ /// Returns the cached ResourceManager instance used by this class.+ /// </summary>+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]+ internal static global::System.Resources.ResourceManager ResourceManager {+ get {+ if (object.ReferenceEquals(resourceMan, null)) {+ global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("DevToys.Tools.Tools.Generators.LoremIpsum.LoremIpsumGenerator", typeof(LoremIpsumGenerator).Assembly);+ resourceMan = temp;+ }+ return resourceMan;+ }+ }++ /// <summary>+ /// Overrides the current thread's CurrentUICulture property for all+ /// resource lookups using this strongly typed resource class.+ /// </summary>+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]+ internal static global::System.Globalization.CultureInfo Culture {+ get {+ return resourceCulture;+ }+ set {+ resourceCulture = value;+ }+ }++ /// <summary>+ /// Looks up a localized string similar to Lorem Ipsum Generator tool.+ /// </summary>+ internal static string AccessibleName {+ get {+ return ResourceManager.GetString("AccessibleName", resourceCulture);+ }+ }++ /// <summary>+ /// Looks up a localized string similar to Configuration.+ /// </summary>+ internal static string ConfigurationTitle {+ get {+ return ResourceManager.GetString("ConfigurationTitle", resourceCulture);+ }+ }++ /// <summary>+ /// Looks up a localized string similar to Text corpus to use.+ /// </summary>+ internal static string CorpusOptionDescription {+ get {+ return ResourceManager.GetString("CorpusOptionDescription", resourceCulture);+ }+ }++ /// <summary>+ /// Looks up a localized string similar to Generate Lorem Ipsum (or similar) placeholder text.+ /// </summary>+ internal static string Description {+ get {+ return ResourceManager.GetString("Description", resourceCulture);+ }+ }++ /// <summary>+ /// Looks up a localized string similar to Number of words, sentences or paragraphs to generate.+ /// </summary>+ internal static string LengthDescription {+ get {+ return ResourceManager.GetString("LengthDescription", resourceCulture);+ }+ }++ /// <summary>+ /// Looks up a localized string similar to Number of words, sentences or paragraphs to generate.+ /// </summary>+ internal static string LengthOptionDescription {+ get {+ return ResourceManager.GetString("LengthOptionDescription", resourceCulture);+ }+ }++ /// <summary>+ /// Looks up a localized string similar to Length.+ /// </summary>+ internal static string LengthTitle {+ get {+ return ResourceManager.GetString("LengthTitle", resourceCulture);+ }+ }++ /// <summary>+ /// Looks up a localized string similar to Childe Harold's Pilgrimage (Lord Byron).+ /// </summary>+ internal static string LipsumChildHarold {+ get {+ return ResourceManager.GetString("LipsumChildHarold", resourceCulture);+ }+ }++ /// <summary>+ /// Looks up a localized string similar to Decameron - Novella Prima (Giovanni Boccaccio).+ /// </summary>+ internal static string LipsumDecameron {+ get {+ return ResourceManager.GetString("LipsumDecameron", resourceCulture);+ }+ }++ /// <summary>+ /// Looks up a localized string similar to Faust (Goethe), German.+ /// </summary>+ internal static string LipsumFaust {+ get {+ return ResourceManager.GetString("LipsumFaust", resourceCulture);+ }+ }++ /// <summary>+ /// Looks up a localized string similar to In der Fremde (Heinrich Heine), German.+ /// </summary>+ internal static string LipsumInDerFremde {+ get {+ return ResourceManager.GetString("LipsumInDerFremde", resourceCulture);+ }+ }++ /// <summary>+ /// Looks up a localized string similar to Le Bateau Ivre (Arthur Rimbaud), French.+ /// </summary>+ internal static string LipsumLeBateauIvre {+ get {+ return ResourceManager.GetString("LipsumLeBateauIvre", resourceCulture);+ }+ }++ /// <summary>+ /// Looks up a localized string similar to Le Masque (Charles Baudelaire), French.+ /// </summary>+ internal static string LipsumLeMasque {+ get {+ return ResourceManager.GetString("LipsumLeMasque", resourceCulture);+ }+ }++ /// <summary>+ /// Looks up a localized string similar to Lorem Ipsum (Marcus Tullius Cicero), Latin.+ /// </summary>+ internal static string LipsumLoremIpsum {+ get {+ return ResourceManager.GetString("LipsumLoremIpsum", resourceCulture);+ }+ }++ /// <summary>+ /// Looks up a localized string similar to Nagyon fáj (József Attila), Hungarian.+ /// </summary>+ internal static string LipsumNagyonFaj {+ get {+ return ResourceManager.GetString("LipsumNagyonFaj", resourceCulture);+ }+ }++ /// <summary>+ /// Looks up a localized string similar to Ómagyar-Mária siralom (Ismeretlen), Hungarian.+ /// </summary>+ internal static string LipsumOmagyar {+ get {+ return ResourceManager.GetString("LipsumOmagyar", resourceCulture);+ }+ }++ /// <summary>+ /// Looks up a localized string similar to Robinsono Kruso (Daniel Defoe), Esperanto.+ /// </summary>+ internal static string LipsumRobinsonoKruso {+ get {+ return ResourceManager.GetString("LipsumRobinsonoKruso", resourceCulture);+ }+ }++ /// <summary>+ /// Looks up a localized string similar to The Raven (Edward Allen Poe), English.+ /// </summary>+ internal static string LipsumTheRaven {+ get {+ return ResourceManager.GetString("LipsumTheRaven", resourceCulture);+ }+ }++ /// <summary>+ /// Looks up a localized string similar to Tierra y Luna (Federico García Lorca), Spanish.+ /// </summary>+ internal static string LipsumTierrayLuna {+ get {+ return ResourceManager.GetString("LipsumTierrayLuna", resourceCulture);+ }+ }++ /// <summary>+ /// Looks up a localized string similar to Text corpus.+ /// </summary>+ internal static string LipsumTitle {+ get {+ return ResourceManager.GetString("LipsumTitle", resourceCulture);+ }+ }++ /// <summary>+ /// Looks up a localized string similar to Lorem Ipsum Generator.+ /// </summary>+ internal static string LongDisplayTitle {+ get {+ return ResourceManager.GetString("LongDisplayTitle", resourceCulture);+ }+ }++ /// <summary>+ /// Looks up a localized string similar to Output.+ /// </summary>+ internal static string Output {+ get {+ return ResourceManager.GetString("Output", resourceCulture);+ }+ }++ /// <summary>+ /// Looks up a localized string similar to Paragraphs.+ /// </summary>+ internal static string ParagraphsType {+ get {+ return ResourceManager.GetString("ParagraphsType", resourceCulture);+ }+ }++ /// <summary>+ /// Looks up a localized string similar to Refresh.+ /// </summary>+ internal static string Refresh {+ get {+ return ResourceManager.GetString("Refresh", resourceCulture);+ }+ }++ /// <summary>+ /// Looks up a localized string similar to Sentences.+ /// </summary>+ internal static string SentencesType {+ get {+ return ResourceManager.GetString("SentencesType", resourceCulture);+ }+ }++ /// <summary>+ /// Looks up a localized string similar to Lorem Ipsum.+ /// </summary>+ internal static string ShortDisplayTitle {+ get {+ return ResourceManager.GetString("ShortDisplayTitle", resourceCulture);+ }+ }++ /// <summary>+ /// Looks up a localized string similar to Generate words, sentences or paragraphs of Lorem Ipsum.+ /// </summary>+ internal static string TypeDescription {+ get {+ return ResourceManager.GetString("TypeDescription", resourceCulture);+ }+ }++ /// <summary>+ /// Looks up a localized string similar to Whether words, sentences or paragraphs should be generated.+ /// </summary>+ internal static string TypeOptionDescription {+ get {+ return ResourceManager.GetString("TypeOptionDescription", resourceCulture);+ }+ }++ /// <summary>+ /// Looks up a localized string similar to Type.+ /// </summary>+ internal static string TypeTitle {+ get {+ return ResourceManager.GetString("TypeTitle", resourceCulture);+ }+ }++ /// <summary>+ /// Looks up a localized string similar to Words.+ /// </summary>+ internal static string WordsType {+ get {+ return ResourceManager.GetString("WordsType", resourceCulture);+ }+ }+ }+}diff --git a/src/app/dev/DevToys.Tools/Tools/Generators/LoremIpsum/LoremIpsumGenerator.resx b/src/app/dev/DevToys.Tools/Tools/Generators/LoremIpsum/LoremIpsumGenerator.resxnew file mode 100644index 000000000..64c33814e--- /dev/null+++ b/src/app/dev/DevToys.Tools/Tools/Generators/LoremIpsum/LoremIpsumGenerator.resx@@ -0,0 +1,210 @@+<?xml version="1.0" encoding="utf-8"?>+<root>+ <!--+ Microsoft ResX Schema++ Version 2.0++ The primary goals of this format is to allow a simple XML format+ that is mostly human readable. The generation and parsing of the+ various data types are done through the TypeConverter classes+ associated with the data types.++ Example:++ ... ado.net/XML headers & schema ...+ <resheader name="resmimetype">text/microsoft-resx</resheader>+ <resheader name="version">2.0</resheader>+ <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>+ <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>+ <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>+ <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>+ <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">+ <value>[base64 mime encoded serialized .NET Framework object]</value>+ </data>+ <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">+ <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>+ <comment>This is a comment</comment>+ </data>++ There are any number of "resheader" rows that contain simple+ name/value pairs.++ Each data row contains a name, and value. The row also contains a+ type or mimetype. Type corresponds to a .NET class that support+ text/value conversion through the TypeConverter architecture.+ Classes that don't support this are serialized and stored with the+ mimetype set.++ The mimetype is used for serialized objects, and tells the+ ResXResourceReader how to depersist the object. This is currently not+ extensible. For a given mimetype the value must be set accordingly:++ Note - application/x-microsoft.net.object.binary.base64 is the format+ that the ResXResourceWriter will generate, however the reader can+ read any of the formats listed below.++ mimetype: application/x-microsoft.net.object.binary.base64+ value : The object must be serialized with+ : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter+ : and then encoded with base64 encoding.++ mimetype: application/x-microsoft.net.object.soap.base64+ value : The object must be serialized with+ : System.Runtime.Serialization.Formatters.Soap.SoapFormatter+ : and then encoded with base64 encoding.++ mimetype: application/x-microsoft.net.object.bytearray.base64+ value : The object must be serialized into a byte array+ : using a System.ComponentModel.TypeConverter+ : and then encoded with base64 encoding.+ -->+ <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">+ <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />+ <xsd:element name="root" msdata:IsDataSet="true">+ <xsd:complexType>+ <xsd:choice maxOccurs="unbounded">+ <xsd:element name="metadata">+ <xsd:complexType>+ <xsd:sequence>+ <xsd:element name="value" type="xsd:string" minOccurs="0" />+ </xsd:sequence>+ <xsd:attribute name="name" use="required" type="xsd:string" />+ <xsd:attribute name="type" type="xsd:string" />+ <xsd:attribute name="mimetype" type="xsd:string" />+ <xsd:attribute ref="xml:space" />+ </xsd:complexType>+ </xsd:element>+ <xsd:element name="assembly">+ <xsd:complexType>+ <xsd:attribute name="alias" type="xsd:string" />+ <xsd:attribute name="name" type="xsd:string" />+ </xsd:complexType>+ </xsd:element>+ <xsd:element name="data">+ <xsd:complexType>+ <xsd:sequence>+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />+ <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />+ </xsd:sequence>+ <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />+ <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />+ <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />+ <xsd:attribute ref="xml:space" />+ </xsd:complexType>+ </xsd:element>+ <xsd:element name="resheader">+ <xsd:complexType>+ <xsd:sequence>+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />+ </xsd:sequence>+ <xsd:attribute name="name" type="xsd:string" use="required" />+ </xsd:complexType>+ </xsd:element>+ </xsd:choice>+ </xsd:complexType>+ </xsd:element>+ </xsd:schema>+ <resheader name="resmimetype">+ <value>text/microsoft-resx</value>+ </resheader>+ <resheader name="version">+ <value>2.0</value>+ </resheader>+ <resheader name="reader">+ <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>+ </resheader>+ <resheader name="writer">+ <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>+ </resheader>+ <data name="AccessibleName" xml:space="preserve">+ <value>Lorem Ipsum Generator tool</value>+ </data>+ <data name="ConfigurationTitle" xml:space="preserve">+ <value>Configuration</value>+ </data>+ <data name="CorpusOptionDescription" xml:space="preserve">+ <value>Text corpus to use</value>+ </data>+ <data name="Description" xml:space="preserve">+ <value>Generate Lorem Ipsum (or similar) placeholder text</value>+ </data>+ <data name="LengthDescription" xml:space="preserve">+ <value>Number of words, sentences or paragraphs to generate</value>+ </data>+ <data name="LengthOptionDescription" xml:space="preserve">+ <value>Number of words, sentences or paragraphs to generate</value>+ </data>+ <data name="LengthTitle" xml:space="preserve">+ <value>Length</value>+ </data>+ <data name="LipsumChildHarold" xml:space="preserve">+ <value>Childe Harold's Pilgrimage (Lord Byron)</value>+ </data>+ <data name="LipsumDecameron" xml:space="preserve">+ <value>Decameron - Novella Prima (Giovanni Boccaccio)</value>+ </data>+ <data name="LipsumFaust" xml:space="preserve">+ <value>Faust (Goethe), German</value>+ </data>+ <data name="LipsumInDerFremde" xml:space="preserve">+ <value>In der Fremde (Heinrich Heine), German</value>+ </data>+ <data name="LipsumLeBateauIvre" xml:space="preserve">+ <value>Le Bateau Ivre (Arthur Rimbaud), French</value>+ </data>+ <data name="LipsumLeMasque" xml:space="preserve">+ <value>Le Masque (Charles Baudelaire), French</value>+ </data>+ <data name="LipsumLoremIpsum" xml:space="preserve">+ <value>Lorem Ipsum (Marcus Tullius Cicero), Latin</value>+ </data>+ <data name="LipsumNagyonFaj" xml:space="preserve">+ <value>Nagyon fáj (József Attila), Hungarian</value>+ </data>+ <data name="LipsumOmagyar" xml:space="preserve">+ <value>Ómagyar-Mária siralom (Ismeretlen), Hungarian</value>+ </data>+ <data name="LipsumRobinsonoKruso" xml:space="preserve">+ <value>Robinsono Kruso (Daniel Defoe), Esperanto</value>+ </data>+ <data name="LipsumTheRaven" xml:space="preserve">+ <value>The Raven (Edward Allen Poe), English</value>+ </data>+ <data name="LipsumTierrayLuna" xml:space="preserve">+ <value>Tierra y Luna (Federico García Lorca), Spanish</value>+ </data>+ <data name="LipsumTitle" xml:space="preserve">+ <value>Text corpus</value>+ </data>+ <data name="LongDisplayTitle" xml:space="preserve">+ <value>Lorem Ipsum Generator</value>+ </data>+ <data name="Output" xml:space="preserve">+ <value>Output</value>+ </data>+ <data name="ParagraphsType" xml:space="preserve">+ <value>Paragraphs</value>+ </data>+ <data name="Refresh" xml:space="preserve">+ <value>Refresh</value>+ </data>+ <data name="SentencesType" xml:space="preserve">+ <value>Sentences</value>+ </data>+ <data name="ShortDisplayTitle" xml:space="preserve">+ <value>Lorem Ipsum</value>+ </data>+ <data name="TypeDescription" xml:space="preserve">+ <value>Generate words, sentences or paragraphs of Lorem Ipsum</value>+ </data>+ <data name="TypeOptionDescription" xml:space="preserve">+ <value>Whether words, sentences or paragraphs should be generated</value>+ </data>+ <data name="TypeTitle" xml:space="preserve">+ <value>Type</value>+ </data>+ <data name="WordsType" xml:space="preserve">+ <value>Words</value>+ </data>+</root>\ No newline at end of filediff --git a/src/app/dev/DevToys.Tools/Tools/Generators/LoremIpsum/LoremIpsumGeneratorCommandLineTool.cs b/src/app/dev/DevToys.Tools/Tools/Generators/LoremIpsum/LoremIpsumGeneratorCommandLineTool.csnew file mode 100644index 000000000..0d5690109--- /dev/null+++ b/src/app/dev/DevToys.Tools/Tools/Generators/LoremIpsum/LoremIpsumGeneratorCommandLineTool.cs@@ -0,0 +1,46 @@+using DevToys.Tools.Helpers.LoremIpsum;+using Microsoft.Extensions.Logging;++namespace DevToys.Tools.Tools.Generators.LoremIpsum;++[Export(typeof(ICommandLineTool))]+[Name(internalComponentName: "LoremIpsumGenerator")]+[CommandName(+ Name = "loremipsum",+ Alias = "li",+ ResourceManagerBaseName = "DevToys.Tools.Tools.Generators.LoremIpsum.LoremIpsumGenerator",+ DescriptionResourceName = nameof(LoremIpsumGenerator.Description))]+internal sealed class LoremIpsumGeneratorCommandLineTool : ICommandLineTool+{+ [CommandLineOption(+ Name = "corpus",+ Alias = "c",+ DescriptionResourceName = nameof(LoremIpsumGenerator.CorpusOptionDescription))]+ internal LipsumsCorpus Corpus { get; set; } = LipsumsCorpus.LoremIpsum;++ [CommandLineOption(+ Name = "type",+ Alias = "t",+ DescriptionResourceName = nameof(LoremIpsumGenerator.TypeOptionDescription))]+ internal Features Type { get; set; } = Features.Paragraphs;++ [CommandLineOption(+ Name = "length",+ Alias = "l",+ DescriptionResourceName = nameof(LoremIpsumGenerator.LengthOptionDescription))]+ internal int Length { get; set; } = 1;++ public ValueTask<int> InvokeAsync(ILogger logger, CancellationToken cancellationToken)+ {+ if (Length <= 0)+ {+ return ValueTask.FromResult(-1);+ }++ var generator = new LipsumGenerator(Corpus);+ string generatedText = generator.GenerateLipsum(Length, Type);++ Console.WriteLine(generatedText);+ return ValueTask.FromResult(0);+ }+}diff --git a/src/app/dev/DevToys.Tools/Tools/Generators/LoremIpsum/LoremIpsumGeneratorGuiTool.cs b/src/app/dev/DevToys.Tools/Tools/Generators/LoremIpsum/LoremIpsumGeneratorGuiTool.csnew file mode 100644index 000000000..b67a398cb--- /dev/null+++ b/src/app/dev/DevToys.Tools/Tools/Generators/LoremIpsum/LoremIpsumGeneratorGuiTool.cs@@ -0,0 +1,194 @@+using System.Globalization;+using System.Reflection.Emit;+using DevToys.Api;+using DevToys.Tools.Helpers.LoremIpsum;+using DevToys.Tools.Models;+using DevToys.Tools.Tools.Generators.UUID;++namespace DevToys.Tools.Tools.Generators.LoremIpsum;++[Export(typeof(IGuiTool))]+[Name("LoremIpsumGenerator")]+[ToolDisplayInformation(+ IconFontName = "DevToys-Tools-Icons",+ IconGlyph = '\u0111',+ GroupName = PredefinedCommonToolGroupNames.Generators,+ ResourceManagerAssemblyIdentifier = nameof(DevToysToolsResourceManagerAssemblyIdentifier),+ ResourceManagerBaseName = "DevToys.Tools.Tools.Generators.LoremIpsum.LoremIpsumGenerator",+ ShortDisplayTitleResourceName = nameof(LoremIpsumGenerator.ShortDisplayTitle),+ LongDisplayTitleResourceName = nameof(LoremIpsumGenerator.LongDisplayTitle),+ DescriptionResourceName = nameof(LoremIpsumGenerator.Description),+ AccessibleNameResourceName = nameof(LoremIpsumGenerator.AccessibleName))]+internal sealed class LoremIpsumGeneratorGuiTool : IGuiTool+{+ /// <summary>+ /// The type of lipsum to generate.+ /// </summary>+ private static readonly SettingDefinition<LipsumsCorpus> lipsum+ = new(+ name: $"{nameof(LoremIpsumGeneratorGuiTool)}.{nameof(lipsum)}",+ defaultValue: LipsumsCorpus.LoremIpsum);++ /// <summary>+ /// Whether a word, sentence, or paragraph should be generated.+ /// </summary>+ private static readonly SettingDefinition<Features> type+ = new(+ name: $"{nameof(LoremIpsumGeneratorGuiTool)}.{nameof(type)}",+ defaultValue: Features.Paragraphs);++ /// <summary>+ /// The amount of words, sentences, or paragraphs to generate.+ /// </summary>+ private static readonly SettingDefinition<int> length+ = new(+ name: $"{nameof(LoremIpsumGeneratorGuiTool)}.{nameof(length)}",+ defaultValue: 1);++ private enum GridColumn+ {+ Stretch+ }++ private enum GridRow+ {+ Settings,+ Results+ }++ private readonly ISettingsProvider _settingsProvider;+ private readonly IUIMultiLineTextInput _outputText = MultilineTextInput();++ private LipsumGenerator _generator;++ [ImportingConstructor]+ public LoremIpsumGeneratorGuiTool(ISettingsProvider settingsProvider)+ {+ _settingsProvider = settingsProvider;+ _generator = new LipsumGenerator(_settingsProvider.GetSetting(lipsum));++ OnGenerateButtonClick();+ }++ public UIToolView View+ => new(+ isScrollable: true,+ Grid()+ .ColumnLargeSpacing()+ .RowLargeSpacing()+ .Rows(+ (GridRow.Settings, Auto),+ (GridRow.Results, new UIGridLength(1, UIGridUnitType.Fraction)))+ .Columns(+ (GridColumn.Stretch, new UIGridLength(1, UIGridUnitType.Fraction)))++ .Cells(+ Cell(+ GridRow.Settings,+ GridColumn.Stretch,+ Stack()+ .Vertical()+ .LargeSpacing()+ .WithChildren(++ Stack()+ .Vertical()+ .WithChildren(++ Label().Text(LoremIpsumGenerator.ConfigurationTitle),++ Setting()+ .Icon("FluentSystemIcons", '\uE178')+ .Title(LoremIpsumGenerator.LipsumTitle)+ .Handle(+ _settingsProvider,+ lipsum,+ OnSettingChanged,+ Item(LoremIpsumGenerator.LipsumChildHarold, LipsumsCorpus.ChildHarold),+ Item(LoremIpsumGenerator.LipsumDecameron, LipsumsCorpus.Decameron),+ Item(LoremIpsumGenerator.LipsumFaust, LipsumsCorpus.Faust),+ Item(LoremIpsumGenerator.LipsumInDerFremde, LipsumsCorpus.InDerFremde),+ Item(LoremIpsumGenerator.LipsumLeBateauIvre, LipsumsCorpus.LeBateauIvre),+ Item(LoremIpsumGenerator.LipsumLeMasque, LipsumsCorpus.LeMasque),+ Item(LoremIpsumGenerator.LipsumLoremIpsum, LipsumsCorpus.LoremIpsum),+ Item(LoremIpsumGenerator.LipsumNagyonFaj, LipsumsCorpus.NagyonFaj),+ Item(LoremIpsumGenerator.LipsumOmagyar, LipsumsCorpus.Omagyar),+ Item(LoremIpsumGenerator.LipsumRobinsonoKruso, LipsumsCorpus.RobinsonoKruso),+ Item(LoremIpsumGenerator.LipsumTheRaven, LipsumsCorpus.TheRaven),+ Item(LoremIpsumGenerator.LipsumTierrayLuna, LipsumsCorpus.TierrayLuna)),++ Setting()+ .Icon("FluentSystemIcons", '\uEB28')+ .Title(LoremIpsumGenerator.TypeTitle)+ .Description(LoremIpsumGenerator.TypeDescription)+ .Handle(+ _settingsProvider,+ type,+ OnSettingChanged,+ Item(LoremIpsumGenerator.WordsType, Features.Words),+ Item(LoremIpsumGenerator.SentencesType, Features.Sentences),+ Item(LoremIpsumGenerator.ParagraphsType, Features.Paragraphs)),++ Setting()+ .Icon("FluentSystemIcons", '\uF57D')+ .Title(LoremIpsumGenerator.LengthTitle)+ .Description(LoremIpsumGenerator.LengthDescription)+ .InteractiveElement(+ NumberInput()+ .HideCommandBar()+ .Minimum(1)+ .OnValueChanged(OnLengthChanged)+ .Value(_settingsProvider.GetSetting(length)))))),++ Cell(+ GridRow.Results,+ GridColumn.Stretch,++ _outputText+ .Title(LoremIpsumGenerator.Output)+ .ReadOnly()+ .AlwaysWrap()+ .CommandBarExtraContent(+ Button()+ .Icon("FluentSystemIcons", '\uF13D')+ .Text(LoremIpsumGenerator.Refresh)+ .OnClick(OnGenerateButtonClick)))));++ public void OnDataReceived(string dataTypeName, object? parsedData)+ {+ }++ private void OnSettingChanged(LipsumsCorpus value)+ {+ _generator = new LipsumGenerator(value);+ OnGenerateButtonClick();+ }++ private void OnSettingChanged(Features value)+ {+ OnGenerateButtonClick();+ }++ private void OnLengthChanged(double value)+ {+ _settingsProvider.SetSetting(length, (int)value);+ OnGenerateButtonClick();+ }++ private void OnGenerateButtonClick()+ {+ int length = _settingsProvider.GetSetting(LoremIpsumGeneratorGuiTool.length);+ if (length <= 0)+ {+ _outputText.Text(string.Empty);+ return;+ }++ Features type = _settingsProvider.GetSetting(LoremIpsumGeneratorGuiTool.type);++ Guard.IsNotNull(_generator);+ string output = _generator.GenerateLipsum(length, type);++ _outputText.Text(output);+ }+}diff --git a/src/app/tests/DevToys.UnitTests/Tools/Helpers/LipsumTests.cs b/src/app/tests/DevToys.UnitTests/Tools/Helpers/LipsumTests.csnew file mode 100644index 000000000..8b77897bd--- /dev/null+++ b/src/app/tests/DevToys.UnitTests/Tools/Helpers/LipsumTests.cs@@ -0,0 +1,162 @@+using DevToys.Tools.Helpers.LoremIpsum;++namespace DevToys.UnitTests.Tools.Helpers;++public class LipsumTests+{+ [Fact]+ public void LoadXml()+ {+ string template = "<root><text>{0}</text></root>";+ string expectedText = "Lorem ipsum dolor sit amet";+ string formatted = String.Format(template, expectedText);++ var lipsum = new LipsumGenerator(formatted, true);+ lipsum.LipsumText.ToString().Should().Be(expectedText);+ }++ [Fact]+ public void LoadPlainText()+ {+ string expectedText = "Lorem ipsum dolor sit amet";++ var lipsum = new LipsumGenerator(expectedText, false);+ lipsum.LipsumText.ToString().Should().Be(expectedText);+ }++ [Fact]+ public void DefaultConstructorContainsLoremIpsum()+ {+ string expected = Lipsums.GetText(LipsumsCorpus.LoremIpsum);+ var generator = new LipsumGenerator(LipsumsCorpus.LoremIpsum);+ generator.LipsumText.ToString().Should().Be(expected);+ }++ [Fact]+ public void PrepareWords()+ {+ string rawText = "lorem ipsum dolor sit amet consetetur";+ string[] expectedArray = new string[] {+ "lorem", "ipsum", "dolor", "sit", "amet", "consetetur"+ };+ int wordsInRawText = 6;++ var lipsum = new LipsumGenerator(rawText, false);+ IReadOnlyList<string> wordsPrepared = lipsum.PreparedWords;++ wordsPrepared.Should().HaveCount(wordsInRawText);+ wordsPrepared.Should().BeEquivalentTo(expectedArray);++ }++ [Fact]+ public void GenerateWords()+ {+ string rawText = "lorem ipsum dolor sit amet consetetur";++ var lipsum = new LipsumGenerator(rawText, false);++ int wordCount = 4;++ string[] generatedWords = lipsum.GenerateWords(wordCount);++ generatedWords.Should().HaveCount(wordCount);++ for (int i = 0; i < wordCount; i++)+ {+ rawText.Should().Contain(generatedWords[i]);+ }+ }++ [Fact]+ public void GenerateSentences()+ {+ string rawText = Lipsums.GetText(LipsumsCorpus.LoremIpsum);+ var lipsum = new LipsumGenerator(rawText, false);++ int desiredSentenceCount = 5;+ string[] generatedSentences = lipsum.+ GenerateSentences(desiredSentenceCount, Sentence.Medium);++ generatedSentences.Should().HaveCount(desiredSentenceCount);++ for (int i = 0; i < desiredSentenceCount; i++)+ {+ generatedSentences[i].Should().NotBeNull();+ generatedSentences[i].Should().NotBeEmpty();+ }+ }++ [Fact]+ public void SentenceCapitalizationAndPunctuation()+ {+ string rawText = "this";+ var lipsum = new LipsumGenerator(rawText, false);+ string[] generatedSentences = lipsum.GenerateSentences(1, new Sentence(1, 1));+ string desiredSentence = "This.";+ generatedSentences[0].Should().Be(desiredSentence);+ }++ [Fact]+ public void GenerateParagraphs()+ {+ string rawText = Lipsums.GetText(LipsumsCorpus.LoremIpsum);+ var lipsum = new LipsumGenerator(rawText, false);++ int desiredParagraphCount = 5;+ string[] generatedParagraphs = lipsum.GenerateParagraphs(desiredParagraphCount, Paragraph.Medium);++ generatedParagraphs.Should().HaveCount(desiredParagraphCount);++ for (int i = 0; i < desiredParagraphCount; i++)+ {+ generatedParagraphs[i].Should().NotBeNull();+ generatedParagraphs[i].Should().NotBeEmpty();+ }+ }++ [Fact]+ public void GenerateCharacters()+ {+ string rawText = "lorem ipsum dolor sit amet consetetur";+ int desiredCharacterCount = 10;+ string expectedText = rawText.Substring(0, desiredCharacterCount);++ var lipsum = new LipsumGenerator(rawText, false);++ string[] charsRetrieved = lipsum.GenerateCharacters(desiredCharacterCount);++ // This should only retrieve one string+ charsRetrieved.Should().HaveCount(1);++ string generatedString = charsRetrieved[0];+ generatedString.Should().NotBeNull();+ generatedString.Should().NotBeEmpty();++ generatedString.Should().Be(expectedText);+ }++ [Fact]+ public void RemoveEmptyElements()+ {+ string[] arrayWithEmpties = new string[] {+ "", "lorem", "ipsum", null, String.Empty, "xxx"+ };++ string[] expectedArray = new string[] {+ "lorem", "ipsum", "xxx"+ };++ int expectedLength = 3;++ IReadOnlyList<string> returnedArray = LipsumUtilities.RemoveEmptyElements(arrayWithEmpties);++ returnedArray.Should().HaveCount(expectedLength);+ returnedArray.Should().NotContain("");+ for (int i = 0; i < returnedArray.Count; i++)+ {+ returnedArray[i].Should().NotBeNull();+ }+ returnedArray.Should().BeEquivalentTo(expectedArray);+ }+}diff --git a/src/spellcheckerexclusion.dic b/src/spellcheckerexclusion.dicindex 7bf7bf360..6650fd081 100644--- a/src/spellcheckerexclusion.dic+++ b/src/spellcheckerexclusion.dic@@ -23,3 +23,4 @@ bgracolorblindsimulatorEcmasingleline+lipsum