WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Infocreator Script  (Read 4909 times)

Offline Sashank999

  • Sr. Member
  • ****
  • Posts: 396
Infocreator Script
« on: July 08, 2020, 07: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 :
Code: [Select]
patch submitqc.original < submitqc.patch
Hoping the admins would approve this patch and integrate it with submitqc..

Regards,
Sashank999 .

Offline Sashank999

  • Sr. Member
  • ****
  • Posts: 396
Re: Infocreator Script
« Reply #1 on: July 09, 2020, 10:00:47 AM »
Hi !

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

Regards,
Sashank999 .

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11635
Re: Infocreator Script
« Reply #2 on: July 09, 2020, 10:37:21 AM »
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: [Select]
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:
Code: [Select]
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:
Code: [Select]
echo "Version:        $VERSION" >> $FILE.tcz.info
Use tabs like this:
Code: [Select]
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:
Code: [Select]
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..

Offline Sashank999

  • Sr. Member
  • ****
  • Posts: 396
Re: Infocreator Script
« Reply #3 on: July 09, 2020, 10:38:19 PM »
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 .

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11635
Re: Infocreator Script
« Reply #4 on: July 09, 2020, 10:51:52 PM »
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

Offline Sashank999

  • Sr. Member
  • ****
  • Posts: 396
Re: Infocreator Script
« Reply #5 on: July 09, 2020, 11:04:39 PM »
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 .

Offline Sashank999

  • Sr. Member
  • ****
  • Posts: 396
Re: Infocreator Script
« Reply #6 on: July 10, 2020, 09:14:33 AM »
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.

Offline Sashank999

  • Sr. Member
  • ****
  • Posts: 396
Re: Infocreator Script
« Reply #7 on: July 13, 2020, 09:01:44 AM »
Hi !

I wish all people to test this infocreator script and create .info files very easily and interactively.

Regards,
Sashank999 .

Offline Sashank999

  • Sr. Member
  • ****
  • Posts: 396
Re: Infocreator Script
« Reply #8 on: July 24, 2020, 03:50:36 AM »
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 .

Offline Sashank999

  • Sr. Member
  • ****
  • Posts: 396
Re: Infocreator Script
« Reply #9 on: July 30, 2020, 09:10:13 AM »
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.

Offline Sashank999

  • Sr. Member
  • ****
  • Posts: 396
Re: Infocreator Script
« Reply #10 on: August 05, 2020, 03:56:25 AM »
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.