USA Linux Users Group Forum Index
Log in Register FAQ Memberlist Search USA Linux Users Group Forum Index Album

BBIPS - Command Line Utilities - Just released !

 
Post new topic   Reply to topic   printer-friendly view    USA Linux Users Group Forum Index » Shell Scripting and Programming
View previous topic :: View next topic  
Author Message
crouse
Site Admin


Joined: 17 Apr 2024
Posts: 11833
Location: Iowa

PostPosted: Thu Sep 07, 2024 9:43 pm    Post subject: BBIPS - Command Line Utilities - Just released ! Reply with quote

BBIPS - Command Line Utilities - Just released !

I wrote these after working on the main bbips program recently, and decided that individual functions could also be seperate programs, sometimes making it easier to chain them together to do multiple operations to image files. This is the first release, and this contains 20 seperate programs to manipulate your images files.

To install these simply open a shell and run this command:

Code:
wget "http://bbips.org/downloads/bbipsinstall.sh"; sh bbipsinstall.sh; rm -f bbipsinstall.sh


This will do the following.

1. Create a directory if not already present "~/.bbips"
2. Download into that directory "bbips-clu.tar.gz" (http://bbips.org/downloads/bbips-clu.tar.gz)
3. Extracts everything from bbips-clu.tar.gz to "~/.bbips"
4. Removes the file bbips-clu.tar.gz (cleanup)
5. Downloads the file bbipsbashrc (overwrites it if it exists) (http://bbips.org/downloads/bbipsbashrc)
6. Checks to see if your .bashrc file has already been modified yet
7. If .bashrc hasn't been modified, sources in the bbipsbashrc file.
8. Exits

Now.... if you follow the directions, you will close this shell and open a new shell (effectively reloading your bashrc file for you). Now, from the command line, run the command "bbhelp"


#### WARNING WARNING WARNING WARNING
#
# These alias run bbips functions from the command line one at a time.
# They also change the image your working on, and do NOT make copies !
# THESE ALIAS'S RUN COMMANDS THAT CHANGE IMAGES DIRECTLEY !!!
# THIS SET OF BBIPS FUNCTIONS DOES NOT MAKE BACKUP COPIES OF YOUR IMAGES !!!
# IT IS SUGGESTED THAT YOU ONLY RUN THESE COMMANDS ON COPIES OF YOUR IMAGES AND NOT THE ORIGINALS !!
#
#### WARNING WARNING WARNING WARNING


What does this stuff do ? -- bbhelp
These commands run from the command line and edit/modify all the jpegs in a directory.

Quote:

BBIPS command line utility help

WARNING - most bbips commands work DIRECTLEY on your images !!!
It is recommended that you work on jpg COPIES ONLY to prevent loss of originals.

bbcopy | Create a directory and COPY all images into it.
------------------
bbresize | RESIZEs all images width x height
bbrotate | ROTATEs all images clockwise x number of degrees
bbflip | FLIPs images top to bottom vertically.
bbflop | FLOPs images side to side horizontally.
bbatxt | ADDS TEXT to images.
------------------
bbborder | Creates a border on all images color x size
bbgrayscale | Converts images to Black and White
bbsepia | Converts all images to SEPIA toned x percentage
bbpaint | Simulates an oil painting on all images
bbnormalize | Normalizes all images
bbcolorize | Colorizes all images. Format rgb.
bbgamma | Gamma correct for all images
bbsolarize | Solorizes all images.
------------------
bbhelp | This lists the bbips command alias's
bbindex | Creates a index.jpg of all .jpg (not .JPG) files.
bbgzip | Creates a GZIPped file containing all the images.
------------------
bbapcom | APpend COMments to the images.
bbrecom | Displays (REads) COMments on all images.
bbwrcom | WRites COMments to all images, overwriting any existing comments.


If you find these useful..... let me know Wink Feedback is always appreciated.

Crouse
http://usalug.org/phpBB2/viewtopic.html?p=84980



_________________
Veronica - Arch Linux 64-bit -- Kernel 2.6.33.4-1
Archie/Jughead - Arch Linux 32-bit -- Kernel 2.6.33.4-1
Betty/Reggie - Arch Linux (VBox) 32-bit -- Kernel 2.6.33.4-1
BumbleBee - OpenSolaris-SunOS 5.11


Last edited by crouse on Sat Sep 16, 2024 11:03 pm; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website AIM Address
coastie
Moderator Bot


Joined: 24 Apr 2024
Posts: 3064
Location: The Fox Den in the Big Easy

PostPosted: Thu Sep 07, 2024 10:16 pm    Post subject: Reply with quote

It won't create a new folder and put new pictures in the dir?



_________________
Ubuntu on the thinkpad
Easy Peasy on the EEEPC
Desktop is down.
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
crouse
Site Admin


Joined: 17 Apr 2024
Posts: 11833
Location: Iowa

PostPosted: Fri Sep 08, 2024 5:21 am    Post subject: Reply with quote

coastie wrote:
It won't create a new folder and put new pictures in the dir?


bbcopy will..... from a command line..... cd into the directory of jpegs.....

bbcopy ANYNAMEHERE

copies all the .jpg's into a new dir ANYNAMEHERE

then cd into the ANYNAMEHERE dir and run any of the commands you want on these images....as they are copies of the main ones Wink

In other words...... always use bbcopy first..... THEN use the others Wink



_________________
Veronica - Arch Linux 64-bit -- Kernel 2.6.33.4-1
Archie/Jughead - Arch Linux 32-bit -- Kernel 2.6.33.4-1
Betty/Reggie - Arch Linux (VBox) 32-bit -- Kernel 2.6.33.4-1
BumbleBee - OpenSolaris-SunOS 5.11
Back to top
View user's profile Send private message Visit poster's website AIM Address
crouse
Site Admin


Joined: 17 Apr 2024
Posts: 11833
Location: Iowa

PostPosted: Fri Sep 08, 2024 5:32 am    Post subject: Reply with quote

You can ALSO now script these together into a bashscript Wink

Put this script into the .bbips directory (chmod a+x to make it executable) ....and it will run by itself too.

Call it -- mybbscript

Code:

#!/bin/bash
# File: mybbscript

#### First lets make copies of the images and put them into a new directory called COPYS
bbcopy COPYS
#### Next, lets now move into the COPYS directory
cd COPYS
#### Now we are going to resize all the images in the copies directory to 800x800 max size
bbresize 800 800
#### Now we are putting a 2 pixel black border on every image
bbborder black 2
#### Now we are converting all images to black and white
bbgrayscale
#### Now we are putting text on every image
bbatxt "Produced with bbips command line utilites"
#### Now we are done  :)
exit 0


As you can see , you just performed multiple operations on alot of images all at once. And it's easy to change things to do just what you want..... choose your size, border color, border size, text etc etc etc....

That's just a bit of what you can do Wink Hope that made some sense Smile

A sample pic produced by running the above script on it.....
http://usalug.org/phpBB2/album_pic.html?pic_id=47



_________________
Veronica - Arch Linux 64-bit -- Kernel 2.6.33.4-1
Archie/Jughead - Arch Linux 32-bit -- Kernel 2.6.33.4-1
Betty/Reggie - Arch Linux (VBox) 32-bit -- Kernel 2.6.33.4-1
BumbleBee - OpenSolaris-SunOS 5.11
Back to top
View user's profile Send private message Visit poster's website AIM Address
coastie
Moderator Bot


Joined: 24 Apr 2024
Posts: 3064
Location: The Fox Den in the Big Easy

PostPosted: Fri Sep 08, 2024 10:13 am    Post subject: Reply with quote

looks good so far. i'm getting ready to run it for the first time Wink



_________________
Ubuntu on the thinkpad
Easy Peasy on the EEEPC
Desktop is down.
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
coastie
Moderator Bot


Joined: 24 Apr 2024
Posts: 3064
Location: The Fox Den in the Big Easy

PostPosted: Fri Sep 08, 2024 10:22 am    Post subject: Reply with quote

works pretty good Wink if i get some time at work today i'll ssh home and upload some pics to the album.



_________________
Ubuntu on the thinkpad
Easy Peasy on the EEEPC
Desktop is down.
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
crouse
Site Admin


Joined: 17 Apr 2024
Posts: 11833
Location: Iowa

PostPosted: Wed Sep 13, 2024 2:34 am    Post subject: Reply with quote

https://sourceforge.net/new/



_________________
Veronica - Arch Linux 64-bit -- Kernel 2.6.33.4-1
Archie/Jughead - Arch Linux 32-bit -- Kernel 2.6.33.4-1
Betty/Reggie - Arch Linux (VBox) 32-bit -- Kernel 2.6.33.4-1
BumbleBee - OpenSolaris-SunOS 5.11
Back to top
View user's profile Send private message Visit poster's website AIM Address
coastie
Moderator Bot


Joined: 24 Apr 2024
Posts: 3064
Location: The Fox Den in the Big Easy

PostPosted: Wed Sep 13, 2024 2:46 am    Post subject: Reply with quote

i posted about it on digg Very Happy , has had 8 diggs so far.



_________________
Ubuntu on the thinkpad
Easy Peasy on the EEEPC
Desktop is down.
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
crouse
Site Admin


Joined: 17 Apr 2024
Posts: 11833
Location: Iowa

PostPosted: Wed Sep 13, 2024 2:56 am    Post subject: Reply with quote

Nice, thanks, I finally got it on sourceforge. Just been to lazy lately lol.



_________________
Veronica - Arch Linux 64-bit -- Kernel 2.6.33.4-1
Archie/Jughead - Arch Linux 32-bit -- Kernel 2.6.33.4-1
Betty/Reggie - Arch Linux (VBox) 32-bit -- Kernel 2.6.33.4-1
BumbleBee - OpenSolaris-SunOS 5.11
Back to top
View user's profile Send private message Visit poster's website AIM Address
crouse
Site Admin


Joined: 17 Apr 2024
Posts: 11833
Location: Iowa

PostPosted: Tue Oct 10, 2024 4:20 pm    Post subject: Reply with quote

Updates: bbips command line utilities updated ......

Modified the following:

bbresize : Now does not use the "size" only "-resize" as needed by imagemagick.
bbsolarize: Fixed solarize function to use the ${1} input. Did not work correctly.
bbips: Added bbips.0.4.0 to the file. Now the most current bbips is included in the download. This is also aliased so it can be run by just typing "bbips" at the command line.

In the install, added line to remove entire .bbips directory if it exists.

All files
http://bbips.org/downloads/bbips-clu.tar.gz

Installer script
http://bbips.org/downloads/bbipsinstall.sh

One line installation/update:
(run this line to update/install bbips with one cut-n-paste line)
Code:
wget "http://bbips.org/downloads/bbipsinstall.sh"; sh bbipsinstall.sh; rm -f bbipsinstall.sh



_________________
Veronica - Arch Linux 64-bit -- Kernel 2.6.33.4-1
Archie/Jughead - Arch Linux 32-bit -- Kernel 2.6.33.4-1
Betty/Reggie - Arch Linux (VBox) 32-bit -- Kernel 2.6.33.4-1
BumbleBee - OpenSolaris-SunOS 5.11
Back to top
View user's profile Send private message Visit poster's website AIM Address
JoshA
New Member


Joined: 24 Dec 2024
Posts: 1

PostPosted: Sun Dec 24, 2024 6:04 am    Post subject: Use in Debian based distributions Reply with quote

In Debian based distros, you may want to change the lines alias lines starting with 'sh' to use bash.

So for example,
Code:
alias bbapcom='sh ~/.bbips/bbapcom'


should actually be

Code:
alias bbapcom='bash ~/.bbips/bbapcom'


The reason for this is that debain based distros use dash for /bin/sh rather than bash. Dash is not smart enough to handle some of the more advanced features that bash can. As a result, you get weird errors saying '[[: Command Not Found' and other weird things.

--Josh



_________________
Currently Running Kubuntu
Also Use: Kanotix, Slax, Slackware
Back to top
View user's profile Send private message
crouse
Site Admin


Joined: 17 Apr 2024
Posts: 11833
Location: Iowa

PostPosted: Sun Dec 24, 2024 6:34 am    Post subject: Reply with quote

Debian based ????? or are we just talking the "buntu" family ? Seems like they like to stray from the norm alot.....



_________________
Veronica - Arch Linux 64-bit -- Kernel 2.6.33.4-1
Archie/Jughead - Arch Linux 32-bit -- Kernel 2.6.33.4-1
Betty/Reggie - Arch Linux (VBox) 32-bit -- Kernel 2.6.33.4-1
BumbleBee - OpenSolaris-SunOS 5.11
Back to top
View user's profile Send private message Visit poster's website AIM Address
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    USA Linux Users Group Forum Index » Shell Scripting and Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All content © 2024-2009 - Usa Linux Users Group
This forum is powered by phpBB. © 2024-2009 phpBB Group
Theme created by phpBBStyles.com and modified by Crouse