General TC > Programming & Scripting - Unofficial

Infocreator Script

(1/3) > >>

Sashank999:
Hi !

This is the infocreator script. This script can be used to create info files for the respective tcz in the right format.

Format is borrowed from recently corrected macchanger.tcz.info.

I have also created a patch file so that this script can be used with submitqc. But, with submitqc, the infocreator.sh script should be placed in /usr/local/bin/infocreator.

patch can be applied by using the command :

--- Code: ---patch submitqc.original < submitqc.patch
--- End code ---

Hoping the admins would approve this patch and integrate it with submitqc..

Regards,
Sashank999 .

Sashank999:
Hi !

I have updated the infocreator and the submitqc patch. Try this.

Regards,
Sashank999 .

Rich:
Hi Sashank999
I only glanced through the script but I'd like to make a couple of comments.

There is no need to switch to  ${NORMAL}  between colors:

--- Code: ---echo -e "${BLUE}Adding ${NORMAL}${WHITE}Change-log${NORMAL}${BLUE} field with text from the ${NORMAL}${WHITE}Current${NORMAL}${BLUE} field...${NORMAL}"
--- End code ---

This will do the same thing and it's much easier to read:

--- Code: ---echo -e "${BLUE}Adding ${WHITE}Change-log${BLUE} field with text from the ${WHITE}Current${BLUE} field...${NORMAL}"
--- End code ---

For spacing between  field descriptions  and the  fields data  don't use spaces like this:

--- Code: ---echo "Version:        $VERSION" >> $FILE.tcz.info
--- End code ---

Use tabs like this:

--- Code: ---echo -e "Version:\t$VERSION" >> $FILE.tcz.info
--- End code ---

Depending on the length of the  field description , 1 or 2 tabs will be required. This way all of the  fields data  will be indented 2 tabs
and aligned like this:

--- Code: ---Title: grabber.tcz
Description: Use your mouse to select an area of your screen for a screenshot in png format.
Version: 1.2
Author: Richard Rost
Original-site: None
Copying-policy: See /usr/local/share/doc/License/grabber-License.txt
Size: 12K
Extension_by: Rich
Tags: screenshot png mouse selection
Comments: Start the program from the command line by entering  grabber  or click on the
grabber icon or click the SelectiveScreenshot entry on the desktop menu..

--- End code ---

Sashank999:
Hi Rich,

I thought of the colors thing but I forgot to test it. You reminded me. Thanks  :D . Will update it soon along with  including an ncurses version in the script.

I have actually looked at macchanger.tcz (submitted by me) and then looked at the info file in a web browser. It doesn't show those tabs properly (sometimes, in firefox latest). Also, Juanito messaged me that he has fixed some errors in the info file. And what I noticed in the fixed file is tabs replaced by spaces. Hence I used the spaces.

Regards,
Sashank999 .

Rich:
Hi Sashank999

--- Quote from: Sashank999 on July 09, 2020, 10:38:19 PM --- ...  and then looked at the info file in a web browser. It doesn't show those tabs properly (sometimes, in firefox latest). ...
--- End quote ---
I just tried this with Opera11 and Firefox52 and both looked fine:
http://tinycorelinux.net/11.x/x86/tcz/grabber.tcz.info

Navigation

[0] Message Index

[#] Next page

Go to full version