Usage
Installation
To use Pkgname, first install it using pip:
(.venv) $ pip install pkgname
This is an example of using just the double colon:
ls -l
pwd
This is an example of code block with language:
ls -l
pwd
conda config --add channels defaults
conda config --add channels conda-forge
Creating recipes
This is coming from the original lumache.py file
To retrieve a list of random ingredients,
you can use the lumache.get_random_ingredients()
function:
- lumache.get_random_ingredients(kind=None)
Return a list of random ingredients as strings.
- Parameters:
- Raises:
lumache.InvalidKindError – If the kind is invalid.
- Returns:
The ingredients list.
- Return type:
The kind
parameter should be either "meat"
, "fish"
,
or "veggies"
. Otherwise, lumache.get_random_ingredients()
will raise an exception.
- exception lumache.InvalidKindError
Raised if the kind is invalid.
For example:
>>> import pkgname
>>> pkgname.get_random_ingredients()
['shells', 'gorgonzola', 'parsley']
add python source file as an example
#!/usr/bin/env python3
a = 2
b = 3
c = a + b
print ("c = %d" % c)
add bash source file as an example
#!/bin/bash
# Purpose: extract lines with "module-hpc" from /var/log/messages* files
# Arguments: list of files names to process.
# If empty, assume messages* files in the current directory
if [ $# -eq 0 ]; then
echo "No arguments supplied. Assuming files in current directory `pwd`"
files=`ls messages*`
else
files=$@
fi
prog=`basename $0`
help () {
printf "\nNAME\n $prog - eXtract MODule Lines from log files\n"
printf "SYNOPSIS\n $prog [OPTION]... [FILE]...\n"
printf "DESCRIPTION\n"
printf " Extract lines with 'module-hpc' from the /var/log/messages-DATE files.\n"
printf " For each processed messages-DATE file generate an output file modules-DATE.\n"
printf " If no arguments are given on the command line assume messages-DATE files\n"
printf " in the current directory.\n\n"
printf " -h, --h, -help, --help, help\n"
printf " print usage info\n\n"
exit 0
}
case "$1" in
-*h*|*help)
help
;;
*)
;;
esac
for File in $files; do
if [ ! -f $File ]; then
echo "Skip $File: not a file"
continue
fi
if [[ $File =~ ".gz" ]]; then
gunzip $File
raw=${File%.gz}
Compress=True
else
raw=$File
fi
modfile=${raw//messages/modules}
grep module-hpc $raw > $modfile
echo "Wrote " $modfile
if [ $Compress ]; then
gzip $raw
compress=False
fi
done
!include rcic-package.yaml
---
package: iperf version 3 network tester
name: iperf
version: "3.6"
extension: tar.gz
description: >
iperf3 version {{ version }}. iperf is a tool for active measurements
of the maximum achievable bandwidth on IP networks. It supports tuning
of various parameters related to timing, protocols, and buffers. For
For each test it reports the measured throughput/bitrate, loss,
and other parameters.
vendor_source: https://downloads.es.net/pub/iperf/iperf-{{ version }}.tar.gz
root: "{{ pkg_defaults.app_path }}/{{ name }}/{{ version }}"
build:
modules:
target:
install:
installextra: $(INSTALL) -m 644 README* LICENSE $(ROOT){{ root }}
List
This is a bulleted list.
It has two items, the second item uses two lines.
This is a numbered list.
It has two items too.
This is a numbered list.
It has two items too.
Nested list
this is
a list
with a nested list
and some subitems
and here the parent list continues
Table
Header row, column 1 (header rows optional) |
Header 2 |
Header 3 |
Header 4 |
---|---|---|---|
body row 1, column 1 |
column 2 |
column 3 |
column 4 |
body row 2 |
… |
… |
Links
Use Link text for inline web links. If the link text should be the web address, you don’t need special markup at all, the parser finds links and mail addresses in ordinary text.
You can also separate the link and the target definition (ref), like this:
This is a paragraph that contains a link.
This example is fro mthe top tutorial of read the docs The tutorial is aimed at people interested in learning how to use Read the Docs to host their documentation projects. You will fork a fictional software library similar to the one developed in the official Sphinx tutorial. No prior experience with Sphinx is required and you can follow this tutorial without having done the Sphinx one.
Trying the popup text
Read the Docs will try to build the documentation of your project right after you create it. To see the build logs, click on the Your documentation is building link on the project home, or alternatively navigate to the Builds page,
Trying a note:
Tip
We strongly recommend pinning all the versions required to build the documentation to avoid unexpected build errors.
Attention
We strongly recommend reading the pinning all the versions
Note
This is a simple note
TEXT
This is the repository you will import on Read the Docs, and it contains the following files:
README.rst
Basic description of the repository, you will leave it untouched.
pyproject.toml
Python project metadata that makes it installable. Useful for automatic documentation generation from sources.
pkgname.py
Source code of the fictional Python library.
docs/
Directory holding all the Sphinx documentation sources, including the Sphinx configuration
docs/source/conf.py
and the root documentdocs/source/index.rst
written in reStructuredText.
Figures
This is made with figure
This is made with image