SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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
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.
#!/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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.