Tiny Core Linux
General TC => Programming & Scripting - Unofficial => Topic started by: Sashank999 on July 08, 2020, 04:52:50 AM
-
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 :
patch submitqc.original < submitqc.patch
Hoping the admins would approve this patch and integrate it with submitqc..
Regards,
Sashank999 .
-
Hi !
I have updated the infocreator and the submitqc patch. Try this.
Regards,
Sashank999 .
-
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:
echo -e "${BLUE}Adding ${NORMAL}${WHITE}Change-log${NORMAL}${BLUE} field with text from the ${NORMAL}${WHITE}Current${NORMAL}${BLUE} field...${NORMAL}"
This will do the same thing and it's much easier to read:
echo -e "${BLUE}Adding ${WHITE}Change-log${BLUE} field with text from the ${WHITE}Current${BLUE} field...${NORMAL}"
For spacing between field descriptions and the fields data don't use spaces like this:
echo "Version: $VERSION" >> $FILE.tcz.info
Use tabs like this:
echo -e "Version:\t$VERSION" >> $FILE.tcz.info
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:
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..
-
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 .
-
Hi Sashank999
... and then looked at the info file in a web browser. It doesn't show those tabs properly (sometimes, in firefox latest). ...
I just tried this with Opera11 and Firefox52 and both looked fine:
http://tinycorelinux.net/11.x/x86/tcz/grabber.tcz.info
-
Hi Rich,
Oh. It looks fine now. I think it was a problem in browser (I have updated it after submitting this script). I will replace it with tabs ;) .
Regards,
Sashank999 .
-
Hi !
I have applied all of said changes, now its your turn to try.
New changes : Added help and usage commands, replaced some blocks of "if" code.
-
Hi !
I wish all people to test this infocreator script and create .info files very easily and interactively.
Regards,
Sashank999 .
-
Hi !
TBH, I am actually inspired by submitqc but I was disappointed as it does not create info files. Some of the code is actually inspired by submitqc.
Now, it also creates md5 hash file and .tcz.list. I also added 2 functions (greet and bye) to reduce the size.
Regards,
Sashank999 .
-
This is my 251st post. Thanks to Forum and its administrators for promoting me to Sr.Member ! :) .
This update includes some changes so that script may change change-log and current fields.
Now, it features automatic removal of pycache directories from python packages.
-
Hi !
This infocreator script has been updated with a lot of bug fixes of previous versions (which even I didn't notice previously :-[).
Change-log :
Now it features automatic version, author, original-site, copying-policy of python3.6 (tested only on python3.6 module "overlay") modules.
And as usual please test it and report any bugs.