Beefy Boxes and Bandwidth Generously Provided by pair Networks Bob
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

perlmonksflair.com : get your perlmonks flair!

by gideondsouza (Pilgrim)
on Aug 11, 2013 at 18:18 UTC ( #1049026=perlmeditation: print w/ replies, xml ) Need Help??

Hear Ye! Hear Ye!

In my endeavour to learn perl I built a little project for the folks at perlmonks. A flair generator :)

It's called http://www.perlmonksflair.com.

It was made with perl, varnish, dancer, starman and lots of love!

Just stick your username into the end of the url with a "jpg" and voila! You have a cool looking badge with neat graphics based on your level, all designed by my dear friend Jennifer Holt.

Enjoy! Please tell me what you think? Suggestions, feedback and insults all welcome. (There were talks with my designer about different themes and possibly an LOTR theme in tengwar?)

Feel free to post issues here : https://github.com/gideondsouza/perlmonksflair

Updates 12-Dec-13 :
  1. Site was down for some odd reason. Brought it back up.
Updates 29-Sept-13 :
  1. Cleanups and some refactoring
  2. The project is now a cpan module : PerlMonksFlairApp
Updates 10-Sept-13 :
  1. Changed the sizes for levels, making them smaller and also fit on the badge in all cases.
  2. Fixed crashes when user is initiate. (Really sorry about this one!)
Updates 21-Aug-13 :
  1. Flair badge will now show the actual level "Priest", "Monk" instead of a level.
  2. Fixed crash for usernames with spaces, dots and hyphens
  3. App ensures it gets a user (?type=user) so it works for a user like "japh"
  4. Experience shows up in black text for Scribe. (This is a wee bit of a hack) I shall talk to my designer.
  5. Images are now cached for 5 days. There is some additional browser caching added.

Thanks for reporting all those issues :)

Comment on perlmonksflair.com : get your perlmonks flair!
Re: perlmonksflair.com : get your perlmonks flair!
by tobyink (Abbot) on Aug 11, 2013 at 18:29 UTC

    It would be nice if the badges included the monk's level as a name (e.g. "Priest") instead of numerically.

    package Cow { use Moo; has name => (is => 'lazy', default => sub { 'Mooington' }) } say Cow->new->name
      Yep. I was thinking about this but wasn't too sure. If more people want it this way I shall get it done :)

      Very nice badge! I'll join the chorus for level name

      This is now done!

        Maybe smaller font?

        Oh; and the moon; on a stick.

        package Cow { use Moo; has name => (is => 'lazy', default => sub { 'Mooington' }) } say Cow->new->name
Re: perlmonksflair.com : get your perlmonks flair!
by Loops (Hermit) on Aug 11, 2013 at 18:40 UTC

    Nice job. Now if only we could set a URL for profile image instead of having to upload a fixed image...

      Ah! thanks. For a second there I thought you were suggesting putting the profile image in the badge, like most people do. But this really spoils the badge.

      Yea that's true, I tried to add the badge to my profile description but the image doesn't render! :'(

Re: perlmonksflair.com : get your perlmonks flair!
by Happy-the-monk (Monsignor) on Aug 11, 2013 at 19:18 UTC

    I like it, but it goes on strike (404) when used with my name.

    Cheers, Sören

    Créateur des bugs mobiles - let loose once, run everywhere.
    (hooked on the Perl Programming language)

      Hey!! I'm really sorry, I feel ashamed. I will try and see why this is happening!

      I think I know why and it might be simple.

        Spaces in usernames, like Your Mother, also don't work: 404. :P And 500s are pretty easy to generate. Fun though. So, nice going. If you had it on github, you'd probably already have the patches you need in pending pull requests.

      This has been fixed.
Re: perlmonksflair.com : get your perlmonks flair!
by Anonymous Monk on Aug 12, 2013 at 01:19 UTC
Re: perlmonksflair.com : get your perlmonks flair!
by syphilis (Canon) on Aug 12, 2013 at 03:15 UTC
    Neat idea - and nicely implemented, too !!.
    I'm another of those that would prefer the "Level" to be replaced with the actual title ... and, depending upon what others think, I'd perhaps do away with the "Experience" entry altogether.

    Cheers,
    Rob
Re: perlmonksflair.com : get your perlmonks flair!
by hossman (Prior) on Aug 12, 2013 at 06:08 UTC

    FWIW: You can get someones eperience really easily w/o needing to parse HTML using the xml display type, ie: http://perlmonks.org/?node=gideondsouza;displaytype=xml

    But for reasons i'm not clear on, the XML displyatype doesn't include the level, so you'd have to compute that from the experience.

      Hey! That's really cool. It's weird why it doesn't include levels. I'll try and make this and all updates together.

      I'm not entirely certain how much faster it will turn out if I parse xml instead of html. I am searching for all td tags though and there are a lot of them

Re: perlmonksflair.com : get your perlmonks flair!
by pokki (Scribe) on Aug 12, 2013 at 11:38 UTC

    Neat, but the Scribe picture makes "Experience" hard to read, white on white: here

Re: perlmonksflair.com : get your perlmonks flair!
by QM (Vicar) on Aug 12, 2013 at 13:32 UTC
    Blocked by WebSense at my $work.

    -QM
    --
    Quantum Mechanics: The dreams stuff is made of

      Ah That's too bad!
      Do you know why WebSense does the blocking?
Re: perlmonksflair.com : get your perlmonks flair!
by Grimy (Monk) on Aug 13, 2013 at 08:08 UTC
    and viola!

    Err… “viola” is the French word for “raped”. You probably meant “voilà”. Just sayin’.

      “viola” is the French word for “raped”

      really? But most of the time, viola is just a violet.

      Cheers, Sören

      Créateur des bugs mobiles - let loose once, run everywhere.
      (hooked on the Perl Programming language)

        It's perfectly correct. Violer is the verb "to rape"; conjugated into the 3rd person, singular past tense, it's viola.

        But also it's a violet, and a musical instrument.

        I can't imagine many contexts where the three usages would be likely to be confused.

        package Cow { use Moo; has name => (is => 'lazy', default => sub { 'Mooington' }) } say Cow->new->name
      Yes yes! I mean't voila!
Re: perlmonksflair.com : get your perlmonks flair!
by Anonymous Monk on Aug 26, 2013 at 09:51 UTC
    Are all the pictures male?
      Um. I think Beadle is female. Didn't mean to be gender bias. The artwork was designed by a female.
Re: perlmonksflair.com : get your perlmonks flair!
by Boldra (Deacon) on Aug 27, 2013 at 08:08 UTC

    Very nice, thankyou! The link to http://www.jenniferleigh.ca/ seems to be broken.



    - Boldra
      You're very welcome. I Fixed the link!
Re: perlmonksflair.com : get your perlmonks flair!
by sotona (Acolyte) on Sep 20, 2013 at 10:35 UTC
    Since the flair is cached for 5 days, it doesn't reflect the real experience points. Is there any possibility to check an actual exp level and generate the new flair if smth changed?

      I'm not entirely sure if I get you. Are you saying I should fetch the XP and check if it has changed? It would defeat the purpose of caching a bit. I have an extremely light server running this app and wanted to avoid the call to the site itself. Perlmonks.org is very slow, and making calls to check it everytime would be expensive.

      As alternatives I was thinking of (1) A sliding cache window, if your XP updates frequently then I will cache less frequently. But this is hard because it means I have to write a varnish plugin. (2) A feature to allow users to refresh the cache for just their flair. This is slightly more do-able

      If you submit it as an issue I will take this up when I can: https://github.com/gideondsouza/perlmonksflair/issues/new

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlmeditation [id://1049026]
Approved by tobyink
Front-paged by tobyink
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (6)
As of 2014-04-18 02:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (460 votes), past polls