[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnuastro-commits] master a0f88d16: Book: copyright highlighted in the s
From: |
Mohammad Akhlaghi |
Subject: |
[gnuastro-commits] master a0f88d16: Book: copyright highlighted in the script of writing part of tutorial |
Date: |
Thu, 20 Oct 2022 07:27:44 -0400 (EDT) |
branch: master
commit a0f88d162bbda560a791b3cf405528d63edecfa3
Author: Faezeh Bijarchian <fbidjarchian@gmail.com>
Commit: Mohammad Akhlaghi <mohammad@akhlaghi.org>
Book: copyright highlighted in the script of writing part of tutorial
Until now, the "Writing scripts to automate the steps" section of the
genenral tutorial didn't mention adding a copyright in a script. But it is
an essential part of any script that tells us who is writing the script,
under what license the script is made, etc. Therefore, was is necessary to
introduce this concept (and how to do it) in this section for new script
writers.
With this commit, some explanations about adding a copyright statement in
the script have been added. Then in the last script, we added copyright
after the shebang to illustrate the most critical information that a script
should provide to readers. Also in this section, a link to the "Your
rights" and GNU GPL sections of the book have been added.
---
doc/gnuastro.texi | 30 ++++++++++++++++++++++++++++--
1 file changed, 28 insertions(+), 2 deletions(-)
diff --git a/doc/gnuastro.texi b/doc/gnuastro.texi
index d64aca46..7a8ea237 100644
--- a/doc/gnuastro.texi
+++ b/doc/gnuastro.texi
@@ -4725,14 +4725,40 @@ if ! [ -d DIRNAME ]; then mkdir DIRNAME; fi
@end example
@end table
+@cartouche
@noindent
-Taking these tips into consideration, we can write a better version of the
script above that includes checks on every step to avoid repeating
steps/commands.
+@strong{Copyright notice:} A very important thing to put @emph{at the top} of
your script is a one-line description of what it does adn its copyright
information (see the example below).
+Here, we specify who is the author(s) of this script, in which years, and
under what license others are allowed to use this file.
+Without it, your script does not credibility or identity, and others cannot
trust, use or acknowledge your work on it.
+Since Gnuastro is itself licensed under a
@url{https://en.wikipedia.org/wiki/Copyleft,copyleft} license (see @ref{Your
rights} and @ref{GNU General Public License} or GNU GPL, the license finishes
with a template on how to add it), any script that uses Gnuastro should also
have a copyleft license: we recommend the same GNU GPL v3+ like below.
+@end cartouche
+
+Taking the above points into consideration, we can write a better version of
the script above.
Please compare this script with the previous one carefully to spot the
differences.
These are very important points that you will definitely encouter during your
own research, and knowing them can greatly help your productiveity, so pay
close attention (even in the comments).
@example
-$ cat gnuastro-tutorial-2.sh
#!/bin/bash
+# Script to download and keep the deep region of the XDF survey.
+#
+# Copyright (C) 2021-2022 Original Author <original@@email.server>
+# Copyright (C) 2022 Your Name <yourname@@email.server>
+#
+# This script is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This script is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Gnuastro. If not, see <http://www.gnu.org/licenses/>.
+
+
+# Abort the script in case of an error.
set -e
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gnuastro-commits] master a0f88d16: Book: copyright highlighted in the script of writing part of tutorial,
Mohammad Akhlaghi <=