LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 06-02-2011, 05:50 PM   #1
Gerwar
LQ Newbie
 
Registered: Dec 2010
Location: Cancun
Distribution: Slackware 13.37-x86_64
Posts: 27

Rep: Reputation: 0
A slack-desc file generator program.


Hi everyone this thread is not meant to be as a question. I would like to introduce you a program made by me. It is a slack-desc generator. In which you enter the parameters for the file, like: the name of the program, nome of the homepage, a short description and a long description. Hope you like the program if you have comments please let me know.

EDIT:
Thanks to the advice of dugan, i've uploaded my program to github. If you want the source you can download it at https://github.com/GerardoGR/gensd

Sorry because not everybody has a github account ill post the link for the program (via megaupload), here it is: http://www.megaupload.com/?d=T58OA6WR

EDIT:
Newest release of this program http://www.megaupload.com/?d=H27BBQ25

Last edited by Gerwar; 06-24-2011 at 11:24 PM. Reason: Stable release
 
Old 06-02-2011, 06:02 PM   #2
dugan
Senior Member
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 4,972

Rep: Reputation: 1555Reputation: 1555Reputation: 1555Reputation: 1555Reputation: 1555Reputation: 1555Reputation: 1555Reputation: 1555Reputation: 1555Reputation: 1555Reputation: 1555
If you plan on open sourcing and maintaining it, then you should put it on GitHub.
 
Old 06-02-2011, 06:20 PM   #3
DragonWisard
Member
 
Registered: Sep 2004
Location: MD, USA (D.C. Suburbs)
Distribution: Slackware
Posts: 95

Rep: Reputation: 53
I agree with dugan.
 
Old 06-02-2011, 06:24 PM   #4
disturbed1
Senior Member
 
Registered: Mar 2005
Location: USA
Distribution: Slackware
Posts: 1,133
Blog Entries: 6

Rep: Reputation: 223Reputation: 223Reputation: 223
Really interesting. Thanks!

You should add some basic usage output for those that just run the program and hit enter, or ./gensd -h --help ... Right now you only get
Error: you have enter a wrong number of parameters at the command line.
 
Old 06-02-2011, 08:33 PM   #5
piratesmack
Member
 
Registered: Feb 2009
Distribution: Slackware, Arch
Posts: 518

Rep: Reputation: 133Reputation: 133
This is the python script I use to generate mine
Code:
#!/usr/bin/env python
# Usage: mkdesc.py program_name > slack-desc

import sys

def main(arg):
	print """\
# HOW TO EDIT THIS FILE:
# The "handy ruler" below makes it easier to edit a package description.  Line
# up the first '|' above the ':' following the base package name, and the '|'
# on the right side marks the last column you can put a character in.  You must
# make exactly 11 lines for the formatting to be correct.  It's also
# customary to leave one space after the ':' except on otherwise blank lines.

%s|-----handy-ruler------------------------------------------------------|
%s""" % ( " " * len(arg), (arg + ":\n") * 10 + arg + ":" )

if __name__ == "__main__" and len(sys.argv) == 2:
	main(sys.argv[1])
else:
	print "Usage: %s program_name > slack-desc" % ( sys.argv[0] )
Nothing fancy. Doesn't fill in the description or homepage, just creates a template you can edit.
 
Old 06-03-2011, 12:05 AM   #6
Gerwar
LQ Newbie
 
Registered: Dec 2010
Location: Cancun
Distribution: Slackware 13.37-x86_64
Posts: 27

Original Poster
Rep: Reputation: 0
Thank you very much for your rapid responses, and your suggestions. The github things sounds good, i didnt know about that. And i agree, i think i must have some other basic output functions like you said, the -h or --help.
 
  


Reply

Tags
makepkg, pkgtool, program, programming, slackware13


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
slack-desc: not working? Transhour Slackware 7 02-05-2011 03:51 AM
package creation and slack-desc file mobilemonkey Slackware 6 07-02-2007 11:53 AM
create a slack-desc file also learning in prep for use of makepkg acummings Slackware 10 01-27-2007 01:01 PM
Makepkg and slack-desc mirto Slackware 7 10-15-2005 04:17 PM
Format of slack-desc file Azmeen Slackware 6 07-11-2003 03:36 AM


All times are GMT -5. The time now is 08:07 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration