BBOSAK2143 wrote:Once again our hero is working to improve computer technology again! Before I signed in took a look at what TheeMahn is up to with RepoMaster! The agony and defeat we all face when those programs we want to install through .deb. This has been an ongoing battle since way way before I took the Linux plunge! To be able to successfully repair, rebuild and install packages that are troublesome is a much sought after possession! While others rest on minimal improvements to the computing world, TheeMahn just moves on to a new advancement! This is what impresses me the most! He is unrelenting in his pursuit to make things better for everyone!!! So now as of his latest venture, I am calling him a hero! He deserves a great deal of respect and recognition as his accomplishments make a huge difference to the world of computing! Is great and awesome to see things being done and sincerely wish I had more knowledge and could offer any assistance to such a huge endeavor of such! Is truly an honor to be part of a forum where knowledge is so immense and the developer continually advances to more greatness!!!!
#!/bin/bash
# REPOMASTER - Auto build, repository management script
# Script via TheeMahn <[email protected]>
#
# This script will extract, build all debs in each subfolder
# as well as lintian each resulting deb recording any
# error result to a seperate log and move resulting deb
# to then .debs/ if no errors. Eventually will not move
# any with warnings (does so now). The script will eventually fix all errors
# without human intervention. Who makes errors? Not computers.
# The scipt now implements -f or fix switch still not 100% and
# why you do not have it beyond copywrite.
#
# Beyond that, if that was not enough, will publish your repository online.
# It will GPG key sign your debs generate you a release file and dists,
# auto assign each prospective deb accordingly via architecture,
# rsyncing it to your server of choice. I wrote this program to lose a few
# of my jobs, so I can program & be more attentive to our forums.
#
# Future version varibles, do not trust the programmer.
# All we care about is compliance. (this feature is not implemented
# yet): Another 1 % of errors gone. The goal is 100% we are
# at about 90% off the rip. Just in permission rights.
# the below 3 line do nothing currently. Funny, what I use to build
# this program is this program.
#
#PACKAGE=(cat ultimate-edition-nautilus-scripts-1.7_all/DEBIAN/control|grep 'Package: ')
#PVERSION=(cat ultimate-edition-nautilus-scripts-1.7_all/DEBIAN/control|grep 'Version: ')
#PARCH=(cat ultimate-edition-nautilus-scripts-1.7_all/DEBIAN/control|grep 'Architecture: ')
#
# Eventually we will pipe the above info out in the following format
# mkdir $PACKAGE-$PVERSION_$PARCH/ I did not write the manual, however this
# software will write a manual for you & that is the tip of the iceburg.
#
# The largest task at hand currently is version control. I do not want to extract, nor
# build ultamatix-1.8.0-6_all.deb, ultamatix-1.8.0-7_all.deb, ultamatix-1.8.0-8_all.deb
# ultamatix-1.8.9_all.deb, ultamatix-1.9.0_all.deb, ultamatix-1.9.1_all.deb,
# ultamatix-1.9.2_all.deb, ultamatix-1.9.3_all.deb... Before we even extract and waste my
# time or yours. I want to delete all, but version 1.9.3. Completely opposite when I began
# this project. Clean it up in the end, was my mode of thinking. Perhaps a -s or --scan
# switch is evident. Natuarally with a prompt before we even begin constructing your
# repository. A thorn in my side as a Repository manager. The whole point in me writing
# it initially.
#
# A future version will impement a service to automatically fix / prompt you in any
# error and autofix prior to entering your system. Ultimately, a bulletproof O/S.
# Ultimate Edition will be the first on the planet to utilize this feature.
# I wonder why? Who is writting it? Does that mean Ubuntu is screwed or fall behind?
# No, no O/S left behind, however they will pay me. End user fret not.
#
# I will be paid, but not by you. Once you see the code I have written you will
# understand I deserve it ;) Largest script I have ever seen by one guy. The
# Internet is large & I have them all.
#
# What started as a simple script, has became quite complicated.
#
# We begin - first we grab all subfolders. If you do not wish to
# have a certain deb compiled or built please rename the folder begining
# with a period, which makes it hidden to this script.
#
# 12/25/2012: Service feature is implemented, howevever not bulletproof. Once set to stone
# I can take a minimal install a 50 mb download. Install this program as a service
# and request a few gig of programs and they will roll into the O/S perfected.
#!/bin/bash
###########################################################
## Mergepdf Tool ##
## Created by TheeMahn: <[email protected]> ##
## Licensed under GNU GPL v3 or later, at your option. ##
## http://www.gnu.org/licenses/gpl.html ##
###########################################################
#
# Mergepdf is a part of the tm-tools package.
# Many of the tools are heavy and are not
# intended to be ran by the common user.
# The tools are typically geared for the admininstrator.
# please see man tmtools for more info.
#
# http://ultimateedition.info
MERGEPDF="1.7.1-6"
# set colors so errors etc. stand out.
txtblk='\e[0;30m' # Black - Regular
txtred='\e[0;31m' # Red
txtgrn='\e[0;32m' # Green
txtylw='\e[0;33m' # Yellow
txtblu='\e[0;34m' # Blue
txtpur='\e[0;35m' # Purple
txtcyn='\e[0;36m' # Cyan
txtwht='\e[0;37m' # White
bldblk='\e[1;30m' # Black - Bold
bldred='\e[1;31m' # Red
bldgrn='\e[1;32m' # Green
bldylw='\e[1;33m' # Yellow
bldblu='\e[1;34m' # Blue
bldpur='\e[1;35m' # Purple
bldcyn='\e[1;36m' # Cyan
bldwht='\e[1;37m' # White
unkblk='\e[4;30m' # Black - Underline
undred='\e[4;31m' # Red
undgrn='\e[4;32m' # Green
undylw='\e[4;33m' # Yellow
undblu='\e[4;34m' # Blue
undpur='\e[4;35m' # Purple
undcyn='\e[4;36m' # Cyan
undwht='\e[4;37m' # White
bakblk='\e[40m' # Black - Background
bakred='\e[41m' # Red
badgrn='\e[42m' # Green
bakylw='\e[43m' # Yellow
bakblu='\e[44m' # Blue
bakpur='\e[45m' # Purple
bakcyn='\e[46m' # Cyan
bakwht='\e[47m' # White
txtrst='\e[0m' # Text Reset
function Help {
echo -e "${txtwht}
PDFMerge $VERSION
==============
PDFMerge is a part of the tm-tools package. Many of the tools are heavy and are not
intended to be ran by the common user. The tools are geared for the admininstrator.
please see man tmtools for more info.
PDFMerge -<OUTFILE>
possible commands...
-o --output PDF file to write
-m --metadata update metadata from filename.
-v --version dump version info
-h --help this help message
Useage Output;
pdfmerge -o merged.pdf
Will process all files in current folder merging them into one pdf.
Useage Metadata;
Will stamp the title of all pdf's in current folder with current filename
stripping underscores.
Useage Help;
PDFMerge -h
Displays this message. For futher information please refer to the manpages.
man pdfmerge
"
echo "
GNU PDFMerge home page: <http://www.ultimateedition.info/>.
E-mail bug reports to: <[email protected]>.
Be sure to include the word PDFMerge somewhere in the Subject: field."
exit 0
}
function Version {
echo "PDFMerge $VERSION
==============
GNU PDFMerge home page: <http://www.ultimateedition.info/>.
E-mail bug reports to: <[email protected]>.
Be sure to include the word pdfmerge"
}
function PREPROCESS()
{
ls *.pdf > tmp.txt
cat tmp.txt | while read FILE
do
echo $FILE
RETVAL=$(echo $? | sed 's/0//g')
#echo "Something to the screen..." >&2
echo $RETVAL
done
}
function Metadata()
{
ls *.pdf > tmp.txt
cat tmp.txt | while read FILE
do
pdftk $FILE dump_data output $FILE.tags
#Manipulate
SFILE=${FILE%%.pdf}
TITLE=$(echo $SFILE | sed 's/_/ /g')
#To be implemented - Not used
#sed -i "8s/InfoValue.*/InfoValue: Linux Magazine/g" $FILE.tags
sed -i "4s/InfoValue.*/InfoValue: $TITLE/g" $FILE.tags
mv $FILE TEMP.pdf
pdftk TEMP.pdf update_info $FILE.tags output $FILE
# Clean up
rm TEMP.pdf
rm $FILE.tags
RETVAL=$(echo $? | sed 's/0//g')
echo $RETVAL
done
# Clean up
rm tmp.txt
}
case "$1" in
-h|--help|-\?) Help; exit 0;;
-v|--version) Version; exit 0;;
-o|--output) PDFTP=$(PREPROCESS $1); echo -e "Processing command: pdftk $PDFTP cat output $2${txtrst}"; pdftk $PDFTP cat output $2; exit 0;;
-m|--metadata) echo -e "${bldgrn}Processing command: pdftk $FILE dump_data output $FILE.tags${txtrst}"; PDFTP=$(Metadata $1); exit 0;;
*) Help; exit 0;;
esac
Users browsing this forum: No registered users and 5 guests