ShopDreamUp AI ArtDreamUp
Deviation Actions
I do my best to credit all the authors of all the vectors. It takes quite a bit of time to make all of those links you see at the bottom of each comic. Lots of copying and pasting and selecting certain bits with the mouse and digging around here and there and blah blah blah. Since I'm doing this for fun, I'd like to minimize the not-fun part as much as possible. I've been meaning to write a script to help with this for a long time.
When I download a vector from DA, I don't rename it. So I have files with names like "obey_pinkie_by_alexiy777-d4w1e8z.png". The file name handily contains enough information to be able to link back to the work on DA if you know the format. I also name all of my photoshop layers after the image that they contain. That means I can create a 'credit line' by analyzing the name of the layers.
I should be able to write a script that takes the 'ID' part (d4w1e8z) and spits out a full credit line, ripe for me to paste in to DA. And indeed I can -- here it is.
import glob
import sys
from os.path import split
def find_file(art_id, mypath='/Users/decoherence/Pictures/'):
print('searching for {0}**/*{1}*'.format(mypath,art_id))
result=glob.glob('{0}**/*{1}*'.format(mypath,art_id), recursive=True)
filename=split(result[0])[-1]
return(filename)
def get_info(file):
artist, art_id = file.split('_by_')[-1].split('.')[0].split('-')
return(artist, art_id)
def generate_credit_string(artist,art_id):
credit_string = ':icon{0}: http://{0}.deviantart.com/gallery/#/{1}'.format(artist, art_id)
return(credit_string)
if __name__ == '__main__':
horsefile = find_file(sys.argv[1])
artist, art_id=get_info(horsefile)
credit = generate_credit_string(artist, art_id)
print(credit)
For example:
I just take that last line and paste it in to DA et viola, alexiy777 has a credit!
errr... I realize that shows up as a link, above. I guess that's proof that it works. The real output looks more like this
: iconalexiy777 : ht tp://alexiy777.deviantart.com/gallery/#/d4w1e8z
that's purposefully broken so that it prints. If anyone knows how to keep that from being interpreted by DA's magic parser, let me know!
To further automate it I think I would have to do some kind of Photoshop integration or start organizing pictures differently (like copying or linking them to the project folder for each comic, for instance) but this script cuts down about 80% of the manual labour so it will do for now.
When I download a vector from DA, I don't rename it. So I have files with names like "obey_pinkie_by_alexiy777-d4w1e8z.png". The file name handily contains enough information to be able to link back to the work on DA if you know the format. I also name all of my photoshop layers after the image that they contain. That means I can create a 'credit line' by analyzing the name of the layers.
I should be able to write a script that takes the 'ID' part (d4w1e8z) and spits out a full credit line, ripe for me to paste in to DA. And indeed I can -- here it is.
import glob
import sys
from os.path import split
def find_file(art_id, mypath='/Users/decoherence/Pictures/'):
print('searching for {0}**/*{1}*'.format(mypath,art_id))
result=glob.glob('{0}**/*{1}*'.format(mypath,art_id), recursive=True)
filename=split(result[0])[-1]
return(filename)
def get_info(file):
artist, art_id = file.split('_by_')[-1].split('.')[0].split('-')
return(artist, art_id)
def generate_credit_string(artist,art_id):
credit_string = ':icon{0}: http://{0}.deviantart.com/gallery/#/{1}'.format(artist, art_id)
return(credit_string)
if __name__ == '__main__':
horsefile = find_file(sys.argv[1])
artist, art_id=get_info(horsefile)
credit = generate_credit_string(artist, art_id)
print(credit)
For example:
$ python .\creditor.py d4w1e8z
searching for /Users/decoherence/Pictures/**/*d4w1e8z*
fav.me/d4w1e8z
I just take that last line and paste it in to DA et viola, alexiy777 has a credit!
errr... I realize that shows up as a link, above. I guess that's proof that it works. The real output looks more like this
: iconalexiy777 : ht tp://alexiy777.deviantart.com/gallery/#/d4w1e8z
that's purposefully broken so that it prints. If anyone knows how to keep that from being interpreted by DA's magic parser, let me know!
To further automate it I think I would have to do some kind of Photoshop integration or start organizing pictures differently (like copying or linking them to the project folder for each comic, for instance) but this script cuts down about 80% of the manual labour so it will do for now.
credit.py
I do my best to credit all the authors of all the vectors. It takes quite a bit of time to make all of those links you see at the bottom of the page. Lots of copying and pasting and selecting certain bits with the mouse and digging around here and there and blah blah blah. Since I'm doing this for fun, I'd like to minimize the not-fun part as much as possible. I've been meaning to write a script to help with this for a long time.
When I download a vector from DA, I don't rename it. So I have files with names like "obey_pinkie_by_alexiy777-d4w1e8z.png". The file name handily contains enough information to be able to link back to the work on D
Devious Journal Entry
It hass been a very long time since I posted anything. So what have I been doing? Writing music. Yes, it is pony related. Will I ever get back to this comic? Maybe, if I can think of something good. I just really hate Photoshop and there are lots of comics out there that are far better than anything I could do. There are still at least two more comics in a half-complete state -- at the very least I'll try to finish those and get them up. After that, who knows? I might get inspired or something. No promises, though.
Thank you for joining me so far. I hope you will enjoy what's coming next.
(Not) New Format
I've been having some trouble getting 'back in the groove' with the comic. It's not that I don't have the motivation to do it, it's that I'm working on three at once! So many ideas have piled up while I was traveling that I can't work on just one and that means chronology is getting thrown out the window. SO! I think the way I've done things makes sense so I'm going to make it all official and such.
Basically, comics that move the plot forward will be called "Comic Eight, Comic Nine, Comic Three Thousand Eleventy One" and such. Those comics will care about chronology. Random comics that don't impact the plot will be called "Comic 8a, Comic 9
Back Home!
Well, I've actually been home for a week or so but life and work have kept me away. Anyway, we now return to our regular schedule of one post per every random number of days (as opposed to weeks.)
In other news, we have like half a foot of snow now! It all dumped down over the last couple of days. Aren't you jealous? ;)
(really I just wanted to get the Iqaluit post off the front page :P )
© 2016 - 2024 decoherence
Comments0
Join the community to add your comment. Already a deviant? Log In