Pages

Monday, February 21, 2011

deviantART Posting Tracker

A Macaw on deviantART
If you've read my post about my deviantART page, you'll know I'm trying to use it to promote my photos.  Part of that promotion is to get my photos in as many groups as possible.

There are other ways for people to see them.  As I post them, they show up on the main page as the "newest deviations".  They probably roll off of that page in a matter of minutes, though, since so many people post.  They will also show up if someone searches for particular keywords I set, or if they are viewing the "random" lists, although hits from either of those will be few and far between.  So I post to groups so that anyone watching the group gets a special notice about the image being posted.  Some of those groups have a thousand or more watchers, so that's a fairly large audience.  The problem is that each of those groups have their own posting guidelines and, more importantly, their own limits on posting frequency.  Keeping track of that got out of hand very quickly, not to mention just keeping track of which deviations I had already submitted to which group.

So I decided to start a spreadsheet to keep track of it.  That lasted one day.  My computer died and Open Office didn't even keep an auto-saved copy.  So I decided to learn MySQL.  It's not that different from Microsoft SQL, so it wasn't that hard.  I created my tables, one for groups, one for submissions, and one for status descriptions.  The groups table has a "submissionInterval" field that lets me keep track of how often I can post to a group.  In addition to the field telling me which group I submitted to, the submissions table has a field to keep track of the date I posted an image, which image I posted, and whether it was accepted, declined, or expired.  And I wrote scripts to log a submisssion, mark a submission accepted or declined, and to list what I submitted to a group or which groups I submitted an image to.  For all of the things I needed to learn, like that MySQL doesn't seem to have an equivalent for TSQL's IsNull routine, I used the online MySQL reference manual.  It's a great resource.  So far so good.

But, since I don't have Microsoft SQL, I also don't have Query Analyzer.  So I had to find a way to execute the scripts easily.  I recalled that the internet entries on how to create MySQL database also mentioned that the MySQL command-line interface would allow you to run queries scripts.  So I looked that up and found this.  A quick cut-and-paste job and I had a file for each of my scripts.  None of them would run, but I knew how to fix that.  chmod to the rescue.  Of course, I couldn't remember the syntax, so another search result to the rescue.

It's worked out well so far.  I can now run "./canSubmit.sh" to list out each of the groups that I haven't posted in recently enough to violate their policies.  It's sorted so the ones with the oldest posts are on top, so I can spread my posts out if possible.  I can run "./checkGroup.sh" to see what images I have posted to a given group, so I don't try and post again.  Or I can run "./checkSubmission.sh" to see what groups I have submitted a given image to.  I can run "./logSubmission.sh" to log the submission, which will make the given group roll off of my canSubmit list.  Finally, I can run "./acceptSubmission.sh" or "./declineSubmission.sh" when the group's reply comes in.

It's not perfect, obviously.  The output of any of the scripts isn't formatted as neatly as it would be inside the MySQL tool.  And it's still a lot of work.  A perfect solution would be fully automated.  I would just select the groups that a given image is suitable for as soon as I upload it and it would go in a queue.  Whenever the submission delay for a group expires, the tool would automatically select the next image from that group's queue and submit it.

But, that will have to wait.  The whole point of going to deviantART, this blog, facebook, etc. is so that I don't have to spend so much time supporting an app like that.  It's really not that hard to initially write, but every time deviantART changes their page a little, I would have to modify the app.  If I ever write it, I'll let you know, but don't hold your breath.

No comments:

Post a Comment