Best practices for getting started? Suggestion for lowering barrier to entry. #113

Closed
opened 2021-11-20 13:24:07 +00:00 by ungleich-gitea · 13 comments

Created by: mcdviii

Hello,

Is the documentation found here the most up-to-date? The quick-start guide found on YouTube is quite outdated. I'm willing to throw together a new one on asciinema.org if the project is interested.

*Created by: mcdviii* Hello, Is the documentation [found here](https://nico.schottelius.org/software/cdist) the most up-to-date? The [quick-start guide](https://www.youtube.com/watch?v=PRMjzy48eTI) found on YouTube is quite outdated. I'm willing to throw together a new one on [asciinema.org](https://asciinema.org/) if the project is interested.
ungleich-gitea added the
done
label 2021-11-20 13:24:07 +00:00
poljakowski was assigned by ungleich-gitea 2021-11-20 13:24:07 +00:00
Author
Owner

closed

closed
Author
Owner

@rage Added in ea291efbf6.

@rage Added in https://code.ungleich.ch/ungleich-public/cdist/commit/ea291efbf6d61f357345d569e4e1d72f00cf1013.
Author
Owner

mentioned in merge request !782

mentioned in merge request !782
Author
Owner

assigned to @poljakowski

assigned to @poljakowski
Author
Owner

@rage I will update it if needed and add it.

@rage I will update it if needed and add it.
Author
Owner

reopened

reopened
Author
Owner

@poljakowski, could this helper script be distributed with cdist?

@poljakowski, could this helper script be distributed with cdist?
Author
Owner

closed

closed
Author
Owner

Created by: asteven

I am using the following script since many years.

[21:13:51] crius:~% cat ~/bin/cdist-new-type 
#!/bin/bash

type_name="$1"
#type_base_path=~/.cdist/type
type_base_path="$PWD/type"

error() {
   echo "$@" >&2
}

die() {
   error "$@"
   exit 1
}

[ -n "$type_name" ] || die "Missing argument: TYPE_NAME"
cd "$type_base_path" || die "Could not change to type directory: $type_base_path
You have to run me from within a cdist conf directory, e.g. ~/.cdist."

year=$(date +%Y)
author_name="Steven Armstrong"
author_email="steven-cdist--@--armstrong.cc"
copyright="# $year $author_name ($author_email)"

license="# This file is part of cdist.
#
# cdist 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.
#
# cdist 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 cdist. If not, see <http://www.gnu.org/licenses/>.
#
"

set -e

mkdir "$type_name"
cd "$type_name"

### man page
header="cdist-type${type_name}(7)"
header_length="${#header}"
cat >> man.rst << DONE
$header
$(printf -v line "%${header_length}s" " "; echo "${line// /=}")

NAME
----
cdist-type${type_name} - TODOC


DESCRIPTION
-----------
This space intentionally left blank.


REQUIRED PARAMETERS
-------------------
None.


OPTIONAL PARAMETERS
-------------------
None.


BOOLEAN PARAMETERS
------------------
None.


EXAMPLES
--------

.. code-block:: sh

    # TODOC
    ${type_name}


SEE ALSO
--------
:strong:\`cdist-type\`\\ (7)


AUTHORS
-------
$author_name <$author_email>


COPYING
-------
Copyright \(C) $year $author_name. Free use of this software is
granted under the terms of the GNU General Public License version 3 (GPLv3).
DONE

### manifest
cat >> manifest << DONE
#!/bin/sh -e
#
${copyright}
#
${license}

os=\$(cat "\$__global/explorer/os")

case "\$os" in
   *)
      echo "Your operating system (\$os) is currently not supported by this type (\${__type##*/})." >&2
      echo "Please contribute an implementation for it if you can." >&2
      exit 1
   ;;
esac
DONE
chmod +x manifest

# gencode-remote
cat >> gencode-remote << DONE
#!/bin/sh -e
#
${copyright}
#
${license}
DONE
chmod +x gencode-remote

echo "$type_base_path/$type_name"
*Created by: asteven* I am using the following script since many years. ```sh [21:13:51] crius:~% cat ~/bin/cdist-new-type #!/bin/bash type_name="$1" #type_base_path=~/.cdist/type type_base_path="$PWD/type" error() { echo "$@" >&2 } die() { error "$@" exit 1 } [ -n "$type_name" ] || die "Missing argument: TYPE_NAME" cd "$type_base_path" || die "Could not change to type directory: $type_base_path You have to run me from within a cdist conf directory, e.g. ~/.cdist." year=$(date +%Y) author_name="Steven Armstrong" author_email="steven-cdist--@--armstrong.cc" copyright="# $year $author_name ($author_email)" license="# This file is part of cdist. # # cdist 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. # # cdist 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 cdist. If not, see <http://www.gnu.org/licenses/>. # " set -e mkdir "$type_name" cd "$type_name" ### man page header="cdist-type${type_name}(7)" header_length="${#header}" cat >> man.rst << DONE $header $(printf -v line "%${header_length}s" " "; echo "${line// /=}") NAME ---- cdist-type${type_name} - TODOC DESCRIPTION ----------- This space intentionally left blank. REQUIRED PARAMETERS ------------------- None. OPTIONAL PARAMETERS ------------------- None. BOOLEAN PARAMETERS ------------------ None. EXAMPLES -------- .. code-block:: sh # TODOC ${type_name} SEE ALSO -------- :strong:\`cdist-type\`\\ (7) AUTHORS ------- $author_name <$author_email> COPYING ------- Copyright \(C) $year $author_name. Free use of this software is granted under the terms of the GNU General Public License version 3 (GPLv3). DONE ### manifest cat >> manifest << DONE #!/bin/sh -e # ${copyright} # ${license} os=\$(cat "\$__global/explorer/os") case "\$os" in *) echo "Your operating system (\$os) is currently not supported by this type (\${__type##*/})." >&2 echo "Please contribute an implementation for it if you can." >&2 exit 1 ;; esac DONE chmod +x manifest # gencode-remote cat >> gencode-remote << DONE #!/bin/sh -e # ${copyright} # ${license} DONE chmod +x gencode-remote echo "$type_base_path/$type_name" ```
Author
Owner

Created by: oxr463

The quick-start guide found in the documentation seems adequate to me; I was able to follow it without any issues.

It would be nice to have a to have a tool for creating new types automatically, something similar to pdk.

*Created by: oxr463* The [quick-start guide](https://www.nico.schottelius.org/software/cdist/man/latest/cdist-quickstart.html) found in the documentation seems adequate to me; I was able to follow it without any issues. It would be nice to have a to have a tool for creating new types automatically, something similar to [`pdk`](https://github.com/puppetlabs/pdk).
Author
Owner

Created by: darko-poljak

4.10.1

** All work and no play makes Jack a dull boy **

Darko

On Wed, Jul 18, 2018, 02:08 mcdviii notifications@github.com wrote:

Hello! Glad to see we are on the same page! I agree asciinima is a pretty
cool project. ^^ I've seen it being used by Zsh plugin projects, & a couple
others.

So the latest stable version of cdist is 4.1, is that correct? I still
need to wrap my head around how much of cdist works, still--but I would
like to learn it while creating a getting started guide.

I would also like to eventually do some more in-depth tutorials on core
functionality, but I'll focus on the quick-start guide first.

Unless directed otherwise I'll focus my attention on the latest
documentation available on the project website.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/ungleich/cdist/issues/677#issuecomment-405766808, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AFDiMfYGe7tnuV5cnBqlXGU0bhlDsHxWks5uHnyRgaJpZM4VHo70
.

*Created by: darko-poljak* 4.10.1 ** All work and no play makes Jack a dull boy ** Darko On Wed, Jul 18, 2018, 02:08 mcdviii <notifications@github.com> wrote: > Hello! Glad to see we are on the same page! I agree asciinima is a pretty > cool project. ^^ I've seen it being used by Zsh plugin projects, & a couple > others. > > So the latest stable version of cdist is 4.1, is that correct? I still > need to wrap my head around how much of cdist works, still--but I would > like to learn it while creating a getting started guide. > > I would also like to eventually do some more in-depth tutorials on core > functionality, but I'll focus on the quick-start guide first. > > Unless directed otherwise I'll focus my attention on the latest > documentation available on the project website. > > — > You are receiving this because you are subscribed to this thread. > Reply to this email directly, view it on GitHub > <https://github.com/ungleich/cdist/issues/677#issuecomment-405766808>, or mute > the thread > <https://github.com/notifications/unsubscribe-auth/AFDiMfYGe7tnuV5cnBqlXGU0bhlDsHxWks5uHnyRgaJpZM4VHo70> > . >
Author
Owner

Created by: mcdviii

Hello! Glad to see we are on the same page! I agree asciinima is a pretty cool project. ^^ I've seen it being used by Zsh plugin projects, & a couple others.

So the latest stable version of cdist is 4.1, is that correct? I still need to wrap my head around how much of cdist works, still--but I would like to learn it while creating a getting started guide.

I would also like to eventually do some more in-depth tutorials on core functionality, but I'll focus on the quick-start guide first.

Unless directed otherwise I'll focus my attention on the latest documentation available on the project website.

*Created by: mcdviii* Hello! Glad to see we are on the same page! I agree asciinima is a pretty cool project. ^^ I've seen it being used by Zsh plugin projects, & a couple others. So the latest stable version of `cdist` is 4.1, is that correct? I still need to wrap my head around how much of cdist works, still--but I would like to learn it while creating a getting started guide. I would also like to eventually do some more in-depth tutorials on core functionality, but I'll focus on the quick-start guide first. Unless directed otherwise I'll focus my attention on the latest documentation available on the project website.
Author
Owner

Created by: telmich

That's a very cool idea @mcdviii ! We are not only open for it, but would very much welcome it! Also, asciicinema looks pretty cool...

*Created by: telmich* That's a very cool idea @mcdviii ! We are not only open for it, but would very much welcome it! Also, asciicinema looks pretty cool...
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: ungleich-public/cdist#113
No description provided.