Script repository

Script repository

I would like to propose a repository of scripts somewhere on pixls.us. There are some useful scripts already in the forums, but since they are not indexed, it is not easy to find them.

If @patdavid decides to give this a try – in order to avoid accumulating a lot of useless and outdated scripts – some rules should be in place:

  • The scripts must be vetted by admins and/or moderators with good coding knowledge. Even the scripts by a coding guru must be looked at by someone else.

  • Whoever submits a script must maintain it; unmantained scripts will be deleted without further notice after a certain period of time (a year?). It is not the site admin’s job to chase after the script authors.

  • The script must be documented properly at the beginning with something like:

    Author: Author’s Name.

    Date: The date of the latest change to the script.

    Version: Version number of the script.

    Usage: How to use the script.

    Purpose: The function of the script.

    Note: Any pertinent notes.

  • The code must be thoroughly commented.

  • The scripts should have a minimal license (e.g. BSD license).

Let’s hear what you guys think about this.

1 Like

I already have an organization setup on Github for precisely this sort of thing. It’s all ready to go! :slight_smile:

I can even link other repos as sub-modules if it makes sense (so the author doesn’t have to do anything other than maintain their own repo).

I, for one, am quite in support of this idea.

1 Like

I really like that idea.

Only I would throw in to have the scripts somehow realated to the OS they are made for, lin, win, osx or all or something like this.

i.e. I’ve done some python scripts to be used with GIMP but those are only for win, as the external tools those do call are win exe files.

We certainly welcome pull requests against the github repo!

I agree with most of your points, except for the maintenance one, I feel that will drive away contributors.

I also prefer the GPL (personal preference, not looking for flames!), but any free software friendly license should be fine (BSD, GPL, apache, MIT, etc etc). We should require a clear license statement though.

if only I would understand what that means :slight_smile:

Seems unreasonable to me. If a script works, it works. If there isn’t an update for a year or more doesn’t mean it stopped working.

  • The scripts must be vetted by admins and/or moderators with good coding knowledge. Even the scripts by a coding guru must be looked at by someone else.

Depends if you want to check quality or innocuousness. The perfect script doesn’t exist, it is a compromise between available time and quality. I admit I have seen some awful stuff out there, but that just tells me that the repository should have a big “Caveat emptor” banner. The ugly duckling could turn into a beautiful swan if the author is pestered enough. A simple “like” button could be enough to attract users to the best ones.

  • Whoever submits a script must maintain it; unmantained scripts will be deleted without further notice after a certain period of time (a year?). It is not the site admin’s job to chase after the script authors.

One of the goals of OSS is to allow anyone to become the new maintainer of an existing piece of code.

  • The script must be documented properly at the beginning with something like:# Author: Author’s Name.# Date: The date of the latest change to the script.# Version: Version number of the script.# Usage: How to use the script.# Purpose: The function of the script.# Note: Any pertinent notes.

Authors tend to do that all by themselves. Some scripts may require more usage notes than what can fit in a plain text header (images, etc…)

  • The code must be thoroughly commented.

For some level of “thoroughly”. Taking a personal example, I write a lot of scripts around Gimp paths. The script code is fairly straightforward if you know

  • The Gimp API
  • Some Euclidean geometry and trigonometry
  • Bezier splines

Anyone who can maintain the scripts should already know these and require little explanations.

  • The scripts should have a minimal license (e.g. BSD license).

Yes.

GitHub is a nice way to share code between developers but IMHO it is totally unfit to deliver scripts to end-users (I envisioned to move my SF repos to GitHub but an attempt convinced me that SF is still the best, alas).

ok, I somehow managed to setup a github - still not sure whether I know what I’m doing here - anyway

and uploaded those py scripts I changed to integrate some addon stuff.

Perhaps Understanding the GitHub flow · GitHub Guides van be of some help. Githib’s docs are actually pretty good.

If you want to contribute to the pixls repo, you would for it, create a branch, commit the changes or additions, push the changes to your fork of the pixls repo, then click the pull request button on your fork.

I disagree on this, actually. I don’t think it’s any worse than SF in this regard.

You can fully flesh out an README.md that can include a full page of instructions including linking to packaged versions of your scripts from within the repo for folks to download. As in most things, careful creation of a README.md fie will help guide end-users to what they need…

Technical arguments aside, SourceForge lost my trust by bundling adware and taking over accounts in order to bundle said adware. I realize that they’re under new management now, and that management seems to be taking the right steps, but that does not grant them a do-over with my trust.

@andabata, @Ofnuts Yes, maintainership should be easly transferable but if the original author has disappeared and does not answer request by the site admin, then what?
That’s where it must be possible to either delete the script or find another maintainer for it.

@Ofnuts The part about well commented code is not so much for the developer, but for someone with less experience who wants to understand the code.

@patdavid Github repo? Sounds unnecessarily complicated. I was imagining something like the software page here on pixls.us (PIXLS.US - Software) but for scripts. The name, a short description and a download link. Nothing more.

@Ofnuts The idea with the “like” button I like. :wink:

For the sake of maintenance, I’d assume a script is working until someone says that it isn’t. Then we decide what to do with it when it is broken. It will always be incumbent on the person executing the script to ensure it gives them the required results.

Too many requirements will detur people from sharing; we want to encourage sharing. Good citation will help some of these problems.

Some sort of revision control should be required, be it github, source forge, gitlab, bitbucket, or whatever.

1 Like

This gets covered by using a Free Software license - hopefully anyone can pick it up if they’d like at that point.

This is exactly what a github repo will give us, while still allowing a developer to actively maintain their code. We can include their repo as a sub-module (or accept pull requests).

It might be easier if I create a simple example to illustrate what I mean. When I get a moment I’ll fix up a repo to show what I mean. If it makes sense, great! Otherwise I am also ok with putting up a page or another category on the forums to support this idea!

@martin_malepo I’ve invited you to the pixls.us github organization.

I’m not sure I like the idea of submodules… If the NPM debacle has taught us anything, it is “have your own copy!”

1 Like

Thanks for the invite @patdavid I signed up yesterday evening