a quick update: wordpress, plugins, css

  • The Whisker Shop has grown a bit… and then I realized the Responsive Lightbox plugin I’m using for the catalogue has stripped all my alt-text from the thumbnails. I think of “responsive” as more than just screen size: it’s about how the screens are being used. So that was disappointing.
  • So I’m working on getting my favorite Lightbox, from Lokesh Dhakar running manually. It’s been tricky, but a test page is semi-functional, although it needs work. (The images don’t cycle through, even when tied to a common gallery name.)
  • CanITowThis.com got a mini-makeover to simplify some text styling and to get fancy with a wide-screen view, where the definitions are side-by-side to the form. Thank you to everyone for the feedback about not seeing the definitions when they’re so far down on the page below the form.

#100DaysofCode – PHP edition

I switched The Whisker Shop over to use some PHP. Originally (and part of my WD4E capstone), it was HTML, CSS, and a little JS, but I wanted to keep the JS to a minimum, so it still involved a lot of repetition, copying and pasting the same code between pages, which was just annoying and antiquated.

So I put down some PHP, created a whole separate header file for the nav bar, and updated everything. I also removed the JS Lightbox from the gallery, because a Lightbox for 6 pictures felt a little silly. The site loads a lot faster now, too, although I still plan on making the photos load faster in the future, and finding a more attractive way to display that gallery page. Front-end isn’t my forte but enough people have done so many beautiful things before me, that I’m confident I can make this even prettier.

In the shorter term, I plan on updating the nav bar with a pure-CSS drop-down menu.

#100DaysofCode – link scraping script (python)

I found this great Pythonic HTML parser today and wrote a quick script for snagging the links off a page.


linkpull.py

# !/usr/bin/python

# takes URL as input, outputs all links to a file
# requires the excellent pythonic HTML parser, requests_hmtl
# parser source: https://github.com/kennethreitz/requests-html

from requests_html import HTMLSession
import os, sys

def maketextfile(linklist, filename):
    with open(filename, 'a+') as file:
        for link in linklist:
            file.write(link + '\n')

def main():
    print("\nThis is a tiny link scraper!\n")
    
    # destination file for your links:
    filename = 'linklist.txt'
    
    # get URL source:
    url = input("Enter a complete URL: ")
    
    session = HTMLSession()
    r = session.get(url)
    linklist = [link for link in r.html.absolute_links]
    maketextfile(linklist, filename)
    print("\nFinished! Your file {} is located at \n {}\n".format(filename, os.getcwd()))

main()

(part of my tiny scripts repository on github.)

#100DaysofCode – a file renaming script (python)

I can’t stand doing the same task more than 10 times in a row if there’s a way to automate it. My recent website projects have involved a lot of compressing and renaming image files, and the process is tedious. I fixed it:


renameme.py

# !/usr/bin/python

''' takes source and destination strings as input, and changes names of files in the local directory. '''

import os, sys

def fileRename(src, dest):
    for filename in os.listdir("."):
        if src in filename:
            newname = filename.replace(src, dest)
            os.rename(filename, newname)
    return

def main():
    src = input("What is the substring you need to change? ")
    dest = input("What would you like to replace it with? ")
    fileRename(src, dest)

main()

# ls
print("Process complete! New directory contents:\n{}".format(os.listdir(os.getcwd())))

(part of my tiny scripts repository on github.)

#100DaysofCode

I’ve been sussing out the details for a photo gallery… Mostly playing with CSS and Lightbox so far. I came upon a treasure trove of photos taken by a friend who passed away a year ago, and I’d like to share them with the world.

There is the main page with a basic/sample Lightbox… There will be many more photos in a gallery page and more Lightbox tweaking in the future: Eternity’s Sunrise.

Some web dev thoughts: I don’t feel like I have an eye for design, but I really enjoy tangible end results. This is why I like the idea of working on a team– I can contribute in ways that don’t involve beautification (but accessibility-improvements! those I can do!) while the real artists make things pretty. 🙂

Still, though. I think Jerry would’ve liked this gallery. He always liked simple, accessible sites.

#100DaysofCode Days 19 through 22

I have been working so much on The Whisker Shop!! I’m so excited. I’m also still tweaking it, so I’m posting this as a draft, but I’m still real excited about it. My spouse has been talking about selling cat furniture for years (in fact, you should check out the about page to read about how he came to make cat furniture), and here we are finally making it happen.

This is also my capstone for the Web Design for Everybody specialization, and I believe I could submit it at this point, but I really want to turn in a completed and polished project. I’m using my PHP knowledge from the Web Applications specialization to incorporate it into my design, and it’s cool to finally tie everything together.

And I definitely still prefer back end work 🙂

#100DaysofCode Day 18

I have been under the weather… I don’t talk about my life with disabilities here, and I might someday (this was created for people in my circles to follow my journey after all), but for now I’ll just cryptically say that I’ve just been a little unwell, and I’m proud to say I’ve kept up with regular coding, but not regular blogging.

At this point, I feel like the days of my #100DaysofCode are more of a guide rather than a true count. I’m okay with this. I hope you’re not here for a linear progression. 😉

Since the last post…

my Local Weather App is finished… I’m comfortable listing it on my Free Code Camp profile for now, but I would like to tweak it and make it my own startpage to remind me of how far I’ve come since I started coding. ♥

I am now working on The Whisker Shop (link is a placeholder as of this writing, but this is the current working draft), my spouse’s cat furniture business he’s been talking about starting for years. We’re working together as a crossover Coursera project, as he’s currently in the project management specialization. It’s been a lot of fun so far.

I’m also working on a Wikipedia Machine. I absolutely love working with APIs. They’re really frustrating and infuriating sometimes, but when they work, it’s so satisfying that it makes it all worthwhile. Practice, practice, practice.

#100DaysofCode Day 17

been working on my local weather app… it works! but it needs to be prettied up, and it needs to change based on the weather.

having some health troubles of late, but am on the mend, so I needed to take a few days off where I didn’t get much done, although I did make a point of at least glancing at code each day. (I wouldn’t count it as a Day of Code though.)