Contenu | Rechercher | Menus

Annonce

Si vous avez des soucis pour rester connecté, déconnectez-vous puis reconnectez-vous depuis ce lien en cochant la case
Me connecter automatiquement lors de mes prochaines visites.

À propos de l'équipe du forum.

#1 Le 30/04/2011, à 22:07

Drev

Generateur de nom de version Ubuntu

Bonjour !

Voici un script en Perl pour generer des noms de version Ubuntu...

#!/usr/bin/perl

use warnings;
use strict;

my @adjs = qw(aback   abaft   abandoned   abashed   aberrant   abhorrent   abiding   abject   ablaze   abnormal   aboard   aboriginal   abortive   abounding   abrasive   abrupt   absent   absorbed   absorbing   abstracted   absurd   abusive   acceptable   accessible   accidental   accurate   acoustic   acrid   ad hoc   adamant   adaptable   addicted   adhesive   adjoining   adorable   afraid   agonizing   ahead   alcoholic   alert   alike   alive   alleged   alluring   aloof   ambiguous   ambitious   amuck   ancient   animated   apathetic   aquatic   aromatic   aspiring   assorted   astonishing   auspicious   available   average   aware   axiomatic  bad   barbarous   bashful   bawdy   beautiful   befitting   belligerent   berserk   better   big   billowy   bizarre   black bugged boiling   boorish   boring   boundless   brash   brawny   breezy   brief   bright   broad   broken   bumpy   burly    cagey   callous   capable   capricious   ceaseless   changeable   cheerful   childlike   chilly   chivalrous   chubby   chunky   clammy   classy   cloistered   cloudy   clumsy   coherent   cold   colossal   combative   comfortable   cooing   cool   cooperative   courageous   cowardly   crabby   craven   crazy   credible   creepy   crooked   cuddly   cultured   curly   curved   cynical daffy   daily   damaged   damaging   damp   dapper   dashing   dazzling   deadpan   debonair   decisive   decorous   deep   deeply   defective   delightful   demonic   deranged   deserted   detailed   determined   devilish   didactic   diligent   direful   dirty   disagreeable   discreet   disillusioned   dispensable   divergent   dizzy   domineering   draconian   dramatic   drunk   dry   dull   dusty   dynamic   dysfunctional  eager   early   earsplitting   earthy   eatable   economic   educated   efficacious   efficient   elated   elderly   elfin   elite   eminent   empty   enchanting   encouraging   endurable   energetic   entertaining   enthusiastic   equable   erect   erratic   ethereal   evanescent   evasive   evil   excellent   excited   exclusive   exotic   expensive   exuberant   exultant  fabulous   faded   fallacious   fanatical   fancy   fantastic   fascinated   fast   fat   faulty   fearless   feigned   fertile   festive   filthy   finicky   flagrant   flashy   flawless   flippant   flowery   foamy   foregoing   forgetful   fortunate   frail   fretful   friendly   functional   funny   furtive   futuristic  gabby   gainful   gamy   gaping   garrulous   gaudy   gentle   giant   giddy   gigantic   glamorous   gleaming   glib   glorious   glossy   godly   good   goofy   gorgeous   graceful   grandiose   gratis   great   greedy   green   groovy   grotesque   grouchy   gruesome   grumpy   guarded   guiltless   gullible   gusty   guttural  habitual   half   hallowed   halting   handsome   handsomely   hapless   happy   harmonious   heady   healthy   heartbreaking   heavenly   heavy   hellish   helpful   hesitant   high   highfalutin   hilarious   historical   holistic   hollow   honorable   horrible   hospitable   huge   hulking   humdrum   humorous   hungry   hurried   hurt   hypnotic   hysterical  icky   idiotic   ignorant   illegal   illustrious   imaginary   immense   imminent   impartial   imperfect   imported   incandescent   incompetent   inconclusive   industrious   innate   instinctive   internal   invincible   irate   itchy jaded   jagged   jazzy   jealous   jittery   jobless   jolly   joyous   judicious   jumbled   jumpy   juvenile kaput   kind   kindhearted   knotty   knowing   knowledgeable   known labored   lackadaisical   lacking   lamentable   languid   large   late   laughable   lavish   lazy   lean   learned   legal   lethal   level   lewd   light   likeable   literate   little   lively   long   longing   lopsided   loutish   lovely   loving   low   lowly   lucky   ludicrous   lush   luxuriant   lying   lyrical    macabre   macho   maddening   madly   magenta   magical   magnificent   majestic   makeshift   malicious   mammoth   maniacal   many   marked   massive   materialistic   mature   measly   meek   melodic   merciful   mere   mighty   mindless   miniature   minor   miscreant   moaning   modern   moldy   momentous   muddled   mundane   murky   mushy   mysterious N   naive   nappy   narrow   nasty   nauseating   nebulous   needless   needy   neighborly   nervous   new   nice   nifty   noiseless   noisy   nonchalant   nondescript   nonstop   nostalgic   nosy   noxious   null   numberless   numerous   nutritious    oafish   obedient   obeisant   obscene   obsequious   observant   obsolete   obtainable   oceanic   odd   offbeat   old   omniscient   onerous   optimal   orange   ordinary   organic   ossified   oval   overconfident   overjoyed   overrated   overt   overwrought P   painful   painstaking   panoramic   parched   parsimonious   pastoral   pathetic   peaceful   penitent   perfect   periodic   permissible   perpetual   petite   phobic   picayune   piquant   placid   plant   plant   plausible   pleasant   plucky   pointless   political   possessive   precious   premium   pretty   prickly   productive   profuse   protective   proud   psychedelic   psychotic   puffy   pumped   puny   purple Q   quack   quaint   quarrelsome   questionable   quick   quickest   quiet   quixotic   quizzical    rabid   radical   ragged   rainy   rambunctious   rampant   rare   raspy   ratty   rebel   receptive   recondite   red   redundant   reflective   relieved   reminiscent   resolute   resonant   rhetorical   righteous   rightful   ritzy   roasted   robust   romantic   roomy   round   royal   ruddy   rural   rustic   ruthless   sable   sad   sassy   satisfying   savoy   scandalous   scarce   scary   scientific   scintillating   scrawny   secretive   sedate   seemly   selective   shallow   shocking   short   shrill   silly   sincere   skillful   skinny   sloppy   slow   small   smelly   sneaky   snobbish   snotty   soggy   somber   sordid   spectacular   spicy   spiffy   spiritual   splendid   spooky   spurious   squalid   square   squeamish   staking   standing   statuesque   steadfast   stereotyped   stimulating   stingy   strange   subdued   subsequent   successful   succinct   sulky   supreme   swanky   sweltering   symptomatic   synonymous T   taboo   tacit   tacky   talented   tall   tame   tan   tangible   tangy   tart   tasteful   tawdry   tearful   telling   temporary   tender   tenuous   tested   testy   therapeutic   thinkable   threatening   tight   tightfisted   tiny   tiresome   toothsome   torpid   tough   towering   tranquil   trashy   tricky   trite   truculent tubular  typical    ubiquitous   ugliest   ugly   ultra   unable   unaccountable   unadvised   unarmed   unbecoming   unbiased   uncovered   understood   undesirable   unequaled   uneven   unsightly   unsuitable   unusual   upbeat   uppity   upset   uptight   used   utopian   utter   uttermost V   vacuous   vagabond   vague   various   vast   vengeful   venomous   verdant   versed   victorious   vigorous   vivacious   voiceless   volatile   voracious   vulgar W   wacky   waggish   wakeful   wanting   warlike   warm   wary   wasteful   wasteful   watchful   watery   weak   wealthy   weary   wee   wet   whimsical   whispering   wholesale   wicked   wide   willing   wiry   wise   wistful   woebegone   womanly   wonderful   wooden   woozy   workable   worried   worthless   wrathful   wretched   wry  x-rated  yellow   yielding   young   youthful   yummy    zany   zealous   zippy   zonked);

#http://en.wikipedia.org/wiki/List_of_animal_names
my @animals = qw(Aardvark Buffalo Alligator Buffalo Ant Anteater Antelope Ape Armadillo Donkey Baboon Badger Barracuda Bat Bear Beaver Bee Bison Boar Bush baby Butterfly Camel Cat Cattle Chamois Cheetah Chicken Chimpanzee Cobra Cockroach Cormorant Cougar Coyote Crab Crane Crocodile Crow Deer Dog Dogfish Dolphin Donkey/Ass Dove Dragonfly Duck Dugong Eagle Echidna Eel Eland Elephant Elephant seal Elk  Falcon Ferret Finch Fly Fox Frog Gaur Gazelle Gerbil Giant Panda Giraffe Gnu Goat Goose Gorilla Guanaco Guinea fowl Guinea pig Gull Hamster Hare Hawk Hedgehog Heron Hippopotamus Hornet Horse[note 11] Hyena Iguana Jackal Jaguar Jellyfish Kangaroo Koala Komodo dragon Kouprey Kudu Lark Lemur Leopard Lion Llama Loris Louse Lobster Lyrebird Magpie Mallard Manatee Meerkat Mink Mole Monkey Moose Mouse Mosquito Mule Nightingale Okapi Oryx Ostrich Otter Owl Ox Oyster Panther Partridge Peafowl Pelican Penguin Pig Pigeon Pony Porcupine Quelea Rabbit Raccoon Rail Ram Rat Raven Red deer Red panda Reindeer (caribou) Rhinoceros Salamander Sea lion Seal Seahorse Seastar Shark Sheep Shrew Skunk Snail Snake Spider Squid Squirrel Stinkbug Swan Tapir Tarsier Tiger Toad Turkey Turtle Vicuña Walrus Wasp Water buffalo Weasel Whale Wolf Worm Yak Zebra);

if($#ARGV == -1){
    print 'Usage:'. $0 .' Match [Mode]'."\n";
    print 'Match: Beginning of your Ubuntu distribution name'."\n";
    print 'Mode: 0 Match for adjectives, 1 Match for animals. 0 by defaults or Match differant of 1'."\n";
    exit();
}

my $filter = $ARGV[0];
my $mode = 0;
if(defined $ARGV[1] and $ARGV[1] == 1){
    $mode = $ARGV[1];
}

my $first_letter = substr($filter, 0, 1);

my @filtered_adjs = grep ($mode == 0 ? /^$filter/i : /^$first_letter/i, @adjs);
my @filtered_animals = grep ($mode == 0 ? /^$first_letter/i : /^$filter/i, @animals);

if($#filtered_adjs == -1){
    print 'No adjective matchs'."\n";
    exit();
}

if($#filtered_animals == -1){
    print 'No animal matchs'."\n";
    exit();
}


foreach my $animal (@filtered_animals){
    print $filtered_adjs[rand($#filtered_adjs)] .' '.$animal."\n";
}


1;

exemple :

perl ./ubuntu_name_maker.pl rad
radical Rabbit
radical Raccoon
radical Rail
radical Ram
radical Rat
radical Raven
radical Red
radical Red
radical Reindeer
radical Rhinoceros

Je verai bien radical rat comme prochain nom apres oneric ocelot ^^

Hors ligne

#2 Le 02/05/2011, à 15:22

macchiato

Re : Generateur de nom de version Ubuntu

Oui mais depuis la version 6.06 LTS  Dapper Drake le nom suit l'alphabet donc logiment se serait en "P"

moi je propose "Picky Pelican" Pelican pointilleux

Hors ligne