Wednesday, February 2, 2011

OCAL update - comment widget

Ooook. Hey YOU! Yes. you.

I have to tell you a secret.

I made a new widget for OCAL. It shows the latest 5 comments, down in a box called "duh duh" Latest comments. Pretty neat huh?

It's very cool learning about SQL. Someday I should...nah. it's all there on the sql tutorial pages. Go read 'em.

Editing in Aiki is fun - editing url widget lists

Yes. It is. It's so fun when you try to do something useful and find out, "hey! it actually has to stay the way it was!" Whoot!

I was trying to make my job easier by sorting the urls inside Aiki admin interface. That url list is getting bloated by the day. So I decided to make it easier on everyone, and sort it according to alphabetical. I love doing things automatically so I copied the list into Openoffice and pasted it in. It came out in one line, in one cell, so I:
  • converted it to columns (Data > Text to columns, set delimiter to "|")
  • selected the entire ROW (click on the number on the left),
  • copied the row
  • paste special-ed it (with transpose ticked)
Viola! A list that can now be sorted automatically.
  • Then put the pipeline character ("|" - Has to be in there to tell AIKI where each individual url ends) in Notepad++ by coping the spreadsheet list to NP and doing a find and replace end of line character with the pipeline.
I copied the then-sorted-to-alphabetical list back into Aiki, only to find that the URL widget list on the left side of the interface automatically updates BASED ON THE FIRST ENTRY in the url FIELD!

So my choices are  (for now),
  1. stick with a hugely bloated, correctly sorted and easy to find url list, with random pages appearing everywhere in the URL LIST ADMIN widget, or    
  2. leave the hard-to-find-stuff hugely bloated url list as it is, so that you can correctly find the pages based on their url in the URL LIST admin widget.
I went with option 3. alphabetically sort the list, and put "homepage" at the front of the list (which of course, makes it non-sorted again, but at least I get the best of both worlds...)

Some days...

 

A Day in the life of a Librarian of the OpenClipart Library.


What I actually did today: See here for the context of this title.

(nicely formatted in colours and fonts.)

I look at what clipart there is in the hidden category

1.) When I'm viewing any of the librarian clipart table-lists, what I've noticed is that the tags are commonly written as such:
Skull,halloween2010,halloween,2010,inky2010,inkscape,vector,death,rip,glow,red,grave

This format creates and duplicates a series of bugs, each time it is used on any clipart.
The first bug is that it makes the table cells very wide and unreadable if there are lots of tags like above - it breaks the word wrap. One solution is to separate the tags with a commaSPACE. Easy to fix this - I copy the tag list to Notepad++, find and replace all commas and replace them with commaSPACE. So it should look like this.
Skull, halloween2010, halloween, 2010, inky2010, inkscape, vector, death, rip, glow, red, grave 
I've asked Somebody to do these comma replacements automatically in the behind-the-scenes database, after-all, in this day and age of infotechnology, we should be able to do it automatically and quickly. But Somebody is on the toilet and not answering the phone. So now I've decided that Everybody and Anybody will do what only Somebody can do. (I only hope that Nobody doesn't show up. I don't like Nobody. He's ugly and smells funny.)

However when you are dealing with 10,000's of clipart it becomes a very obnoxious and time-consuming task to complete manually. I've found you can keep your sanity by only focusing on one clipart at a time.!Important!. Must keep sanity. Maybe. Ok maybe not. Insanity is now ok. It's too late! NO! you go there. Am I insane to keep being a librarian? Probably, but it is fun and rewarding.

The second bug of the above format is that for some unexplainable reason - to me at least, OCAL doesn't read the last tag and has problems with grouping the clipart - even though it DOES have the tag. A solution I've found (without programming) is to add a comma to the last tag, like so:
~glow, red, grave,

The proper way to do tags.
This ensures that OCAL reads all of the tags and doesn't miss out a clipart in the tag group. So in the end, you end up with a tag list that looks like this:
Skull, halloween2010, halloween, 2010, inky2010, inkscape, vector, death, rip, glow, red, grave,
Which is great! It works well, and avoids the OCALisms that currently plague the system, is readable and looks good. So, now how can I make Everybody do this unreasonable task? Simple! I make a modification to the upload page.

I make a modification
2.) I make a mistake on which widget I was editing (I was editing the remix page, instead of the upload page.) This problem is easy to make when I'm logged in twice, once as a developer, once as a librarian to test my changes, with multiple tabs open so that I can reference all the material I need to do some programming (not because of OCAL, but because I'm stupid and I'm not a programmer). Sometimes I open four different browsers to see what the changes do at each level, sysgod, librarian, regular user, and anonymous browsing. See? I told you im insane. I have four different personalities on OCAL alone. How does this make you feel knowing I'm a defacto leader by-vote-of-I'm-the-one-doing-the-work of OCAL?? lol. :) wtf? no. seriously. Tell me if you actually read that.

This problem happens alot (What? me losing my mind?). Nevermind. Onward clipart soldiers.
I spend ten minutes that feels like an eternity-because-im-aware-that-10,000's-of-people-are-using-the-site-and-every-minute-counts trying to make sure that it's back to how it was before I fiddled with it - or fix it again. Most of the time that works. I'm driven to bring order to the chaos that is OCAL. I know it doesn't lool like that sometimes, but OCAL is a good thing. I will not let it die! Sometimes I gotta get my hands dirty.

3) After recovering from that foobar, I open up the correct widget to edit, the upload page. I go to edit the header and find that I have to go to the database itself, because the header is not in HTML, it's in the database cell field itself. I sigh, and open the correct form (double checking!!!). When I find the correct database I have to find out where that dang header is because it's in a different field that what is displayed. So I type in something that may or may not make a big difference to the number of cliparts being submitted with an incorrect format. (It's only incorrect because Somebody is on the toilet :-). The system should be able to handle these commas without us having to manually do this a certain way.)

I find out that the field header is too large for the restricted area that has been artificially created for the clipart upload page. I sigh and put this as another thing to look at - to fix, at a later date. Hopefully the message will get through to people. It looks ugly, but it communicates all that I want it to.

4) I get to actually CHANGING the clipart in the first point, so that I can continue reading what cliparts are there in the hidden. Yay! progress. Wash rinse repeat in changing clipart's tag lists to include a space after each comma, and end in a comma. While I'm there I remove any duplicate tags I find, and unecessary tags, like "png, media, svg, image,"

6) Wait what's this?? Chrome and Firefox display the tables differently! Ugh. chalk it up to something else to fix. There are already bug reports on this one so I don't need to make another one. Well. sort of. There's not a bug that describes this exactly. Ok ok. I go make a bug report. https://bugs.launchpad.net/openclipart/+bug/712169. There, are you happy now, chovynz's-analytical-left-side-brain??

7) I feel miserable for a few minutes complaining in my head about the number of things that need doing, while trying to ignore the kids in the background - because I'm working on my volunteery unpaid work. I make a poem. Ain't it special?

This sucks.
I like ducks.
My hands are dirty with teh programmers mucks.
I wish I could fuxxorsrofllolwtfbbqkaythnxbie?

I do one Task
8) I have to start all over again because by the time that I finish wirting that poem up, OCAL has logged me out. "LOL". Sigh. I close all now redundant reference windows. I login in on my librarian account to do the 10 cliparts with no tags / 10 cliparts with no description, the job that is actually ON my todo list for today. I gleefully count the number of cliparts I've changed for the better today, by adding tags or descriptions. 1,2,3,4,5,6,7,8,9,10. I'm glad I can do this. It makes me fool myself into thinking that I'm making the world a better place, by adding text to a picture's meta record, so that someone else someday can easily find these cliparts in a search, and what the cliparts are for - just in case they don't have a graphical display - or eyes. I shovel chicken shit, so that you dont have to! yay!

Mind you it's making the number of clipart with no descriptions go down, so that's a good thing right? I'm manually ticking over an automatic number! Yay! Save the whales. I change the titles and remove underscores too, when I find clipart that have underscores or characters that shouldn't be used in titles. They mess up the php. I added a comma to the ends of most. I added a description. Sometimes I add spaces, sometimes remove them.

I get to 10 clipart and feel, empty. Like, I've done good. And nobody will know. Not that I want a big deal made about it either. But I do wonder sometimes, does anyone actually care about descriptions on cliparts? There certainly are bigger things to concern yourself with, like the floods in australia and the upcoming class 5 typhoon warning that ozzie is getting. That just sucks. Still without the cleaners, you'd all be covered in shit. So I guess I'm doing a good job. 

Be nice to your cleaners.



On my to do list for OCAL today.

  • Populate the HQ with the tables of the database so that we can see what we can use, so that I can make tools that are useful for librarians doing their jobs. I want to get at least two more tables in today.
  • Add some headers to librarian pages of "No Tags" and "No Descriptions" so that navigation is easier/more accessible
  • Think about how to make a librarian toolbelt overlay for the website. One click tool belt option instead of the awkward navigation as is currently used.
  • Find some bugs I can actually help out with and do one. Many of the bugs I'm unable to do, since I don't know the background coding necessary.
  • Reduce the number of Clipart with no descriptions by 10 by the end of today.I've done two already.
  • See if I can make a remix counter on the individual artist's page.
  • Consider making the layout less blocked in. I hate that 900 pixel wide lock-in. I really do. I like fluidity better. I wonder if I can get away with actually just making it fluid and nobody will notice. :)