IT.COM

Free Bulk Domain Logo Generator Script

Spaceship Spaceship
Watch

Save Breach

Top Member
Impact
1,400
Wrote a bash script that generates logos from domains list. Could be useful for those who want a quick and dirty solution to bulk make logos for their domains yet don't want to spend much time, effort or, money :P

Code on Github:
https://github.com/hackerpain/domaining/blob/master/bulklogo.sh

Usage:
Code:
bulk_logo input_domains.txt time_interval
# ex: bulk_logo domains.txt 0

API Key:
Run the setup script (setup.sh in the GitHub repo), to configure the LLkey as env variable and you are good to go

Getting API Key is free as of now, thanks to @Brian Klug who made LogoLava!

How it works?
The script takes in each domain from the list, fetches the Logo from LogoLava API, and saves it as domain-name.png (for domain-name.com) which makes it easier to search for when needed.

Do share your feedback & opinions on how to improve!

cheers
 
Last edited:
4
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
Good Job @Save Breach @Brian Klug Thanks

A bit of suggestion, if someone does not know how to run a shell script, a small tutor will help.
 
Last edited:
2
•••
Last edited:
0
•••
Installation Guide

Useful resource: https://github.com/hackerpain/domaining/blob/master/README.md
As the original post can't be edited, posting it separately.

Windows

There are 3 options (or, more? virtualization like Docker?), either install a Unix-based environment like Cygwin or, install the officially recommended WSL (or, Windows Subsystem Linux) or, run a Linux VM (using Virtual Box/VMWare/etc.)

To quickly get started, I suggest to install the Windows WSL Ubuntu from Windows' official app store. This is the easiest way to get started with a quick Linux environment on your windows box. Its based on Hyper-V and loads in a few milliseconds, its a lot more featured and optimized than its closest alt, Cygwin.

The Linux VM is best option though but time-consuming. I suggest an Ubuntu VM if you chose to setup a VM.

Once its done, you can proceed to Installation step.

Installation

This process is same for Linux, Windows, or, any Unix based OS. I will assume you are using apt as your package manager, its default in Ubuntu, which you may have installed as your WSL in the previous step.

Install jq and curl using your favorite package manager -

Code:
sudo apt-get install curl jq

Next, clone this repo,
Code:
cd $HOME
git clone https://github.com/hackerpain/domaining

Code:
cd domaining

Setup, grab the API keys (from developer.godaddy.com/keys and) logolava.com
Code:
chmod +x setup.sh
./setup

Add the script to the ~/.bashrc file so that you can call them using function name
Code:
echo "source $HOME/domaining/gddomains.sh" >> ~/.bashrc # Optional
echo "source $HOME/domaining/bulklogo.sh" >> ~/.bashrc
source ~/.bashrc

Now you are all set!

Make a logo directory

Code:
mkdir logo
cd logo


Optionally, you may also use the gd_domains script to fetch all your domains in GD, then add them to a txt file
Code:
gd_domains gdportfolio.txt

then, run
Code:
bulk_logo gdportfolio.txt 0
rm -f gdportfolio.txt # if you want run this command to remve gdportolio.txt file

The images would be downloaded to $HOME/logo directory, and are ready to be viewed/used.

That's it!
Lemme know if you face any issues :)

Note:
if you are using the WSL, your $HOME directory would be in
"C:\Users\[YOUR_USER_NAME]\AppData\Local\Packages\CanonicalGroupLimited.Ubuntu20.04onWindows_9nblggh4msv6\LocalState\rootfs\home\[your_wsl_user_name]\"


Now to view/copy images, you may open File Explorer in this directory,
Code:
Win + R -> powershell -> hit Enter
cd "C:\Users\User_Name\AppData\Local\Packages\CanonicalGroupLimited.Ubuntu20.04onWindows_9nblggh4msv6\LocalState\rootfs\home\user_name\"
explorer .
 
Last edited:
3
•••
Thank you! I’ve been looking for something like this for years!
 
2
•••
Thank you! I’ve been looking for something like this for years!

Glad we could help @Brian L.!
Do share your feedback, and suggest what else we can possibly automate & improve (y)

Cheers!
 
1
•••
Keep in mind, half of the idea with the Logo Lava API, you don't have to download the images. You can just start referencing them directly from your HTML code. The CDN caches images forever, so even if Logo Lava shut down the old images would continue to serve from the CDN for years after.

You can just insert the following into your HTML page without downloading anything:

HTML:
<img src="https://api.logolava.com/v1/?txt=example.com&api_key=12345" />

or here is version with more options set:

HTML:
<img src="https://api-cdn.logolava.com/v1/?margin=.15&bg=ffffff&color=157fae&gradcolor=dddddd&grad=circlecenter&w=375&h=225&api_key=v8NMW5uR&txt=azadin" />

The above code renders the following:

v1


But for those that need to download actual images (to upload somewhere else for example) this bulk tool will be helpful. Thanks!
 
Last edited:
1
•••

One problem here as of now is that the API key remains exposed and prone to abuse. Is there an option to generate signed CDN url's like AWS does with S3 uploads? The current approach exposes the API key, which could become an issue once you bring in paid plan and limits. So this doesn't seem quite feasible to me from the security context. There could be a way to generate them on the fly on the backend, and on the frontend, there would be a signed url (linking to the CDN), without any API key.


But for those that need to download actual images (to upload somewhere else for example) this bulk tool will be helpful. Thanks!

Yes, that's what most domainers would do IMO. If they execute this script in the /static/ directory of the web server hosting their portfolio for example, they can easily pull in the logo images to their server with files named corresponding to domain names, and easily embed it in the portfolio page, and for purposes like uploading it to NP listings.


Cheers!
 
Last edited:
0
•••
One problem here as of now is that the API key remains exposed and prone to abuse.

This is 100% true, but also, not uncommon. I pay Google lots of money to use their search API on a site, yet the API key they gave me can be found in "View source" of that project. Another example is the mailgun API, they have a public API key for client side apps that need to send mail.

Yes, that's what most domainers would do IMO. If they execute this script in the /static/ directory of the web server hosting their portfolio for example, they can easily pull in the logo images to their server with files named corresponding to domain names, and easily embed it in the portfolio page, and for purposes like uploading it to NP listings.

I actually don't know what you mean. What is the advantage of having the image named the same as the domain and served as a static image? It will be slower compared to serving from a professional grade CDN, it won't get caches as well, and its one more thing to keep track of, serve images for, etc.

You also mention NP listings, but again I just served a file directly by using the IMG tag.

I think I might just be missing something, I apologize and welcome clarification. Also Happy Saturday :)
 
0
•••
I pay Google lots of money to use their search API on a site,
i guess they have a security implementation like IP whitelisting, which is recommended while fetching map data, etc than fetching on client side, so that it never needs to be included on the client side

but in this case, i suggest implementing something like this -

Code:
send_get_req(api.logolava.com) -> respond with a CDN url (without API key) that links to the logo -> then back-end can use an img tag linking to the generated CDN url

I actually don't know what you mean. What is the advantage of having the image named the same as the domain and served as a static image? It will be slower compared to serving from a professional grade CDN, it won't get caches as well, and its one more thing to keep track of, serve images for, etc.

i mean for those who prefer uploading those images and serving them from their own server/CDN (for example, nameproscdn.com). For example, if I am creating a listing test.com, i would prefer naming the file as test.png for convenience. didn't mean serving file from ur CDN directly is a bad idea.

Plus if one has a big portfolio, and often need to list domains on forums like NP, for selling, they can conveniently search for the logo from locally downloaded images if they are named after the domain, maybe? that's what i meant


cheers
 
Last edited:
0
•••
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back