Skip to content

Commit

Permalink
Merge pull request #11 from vroncevic/dev
Browse files Browse the repository at this point in the history
[gen_pm] refactor done, updated Dockerfile, docs
  • Loading branch information
vroncevic committed Dec 5, 2021
2 parents 44e9cf8 + f45bc34 commit 771b3c4
Show file tree
Hide file tree
Showing 90 changed files with 13,672 additions and 16,111 deletions.
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
__pycache__/
*.py[cod]
*$py.class
.idea/
.vscode/
2 changes: 1 addition & 1 deletion .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
version: 2
python:
version: 2.7
version: '3.7'
sphinx:
configuration: docs/source/conf.py
formats: all
32 changes: 16 additions & 16 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@
FROM debian:10
RUN apt-get update
RUN DEBIAN_FRONTEND=noninteractive \
apt-get install -yq --no-install-recommends \
tree \
htop \
wget \
unzip \
ca-certificates \
openssl \
perl \
perl-doc
apt-get install -yq --no-install-recommends \
tree \
htop \
wget \
unzip \
ca-certificates \
openssl \
perl \
perl-doc

RUN wget https://github.com/vroncevic/sh_util/archive/v1.0.zip
RUN unzip v1.0.zip
Expand All @@ -37,12 +37,12 @@ RUN rm -Rf v1.0.zip sh_util-1.0
RUN mkdir /sh_tool/
COPY sh_tool /sh_tool/
RUN find /sh_tool/ -name "*.editorconfig" -type f -exec rm -Rf {} \;
RUN mkdir -p /root/scripts/gen_pm/ver.1.0/
RUN mkdir -p /root/scripts/gen_pm/ver.2.0/
RUN mkdir /root/bin/
RUN cp -R /sh_tool/bin/ /root/scripts/gen_pm/ver.1.0/
RUN cp -R /sh_tool/conf/ /root/scripts/gen_pm/ver.1.0/
RUN cp -R /sh_tool/log/ /root/scripts/gen_pm/ver.1.0/
RUN cp -R /sh_tool/bin/ /root/scripts/gen_pm/ver.2.0/
RUN cp -R /sh_tool/conf/ /root/scripts/gen_pm/ver.2.0/
RUN cp -R /sh_tool/log/ /root/scripts/gen_pm/ver.2.0/
RUN rm -Rf /sh_tool/
RUN chmod -R 755 /root/scripts/gen_pm/ver.1.0/
RUN ln -s /root/scripts/gen_pm/ver.1.0/bin/gen_pm.sh /root/bin/gen_pm
RUN tree /root/scripts/gen_pm/ver.1.0/
RUN chmod -R 755 /root/scripts/gen_pm/ver.2.0/
RUN ln -s /root/scripts/gen_pm/ver.2.0/bin/gen_pm.sh /root/bin/gen_pm
RUN tree /root/scripts/gen_pm/ver.2.0/
110 changes: 105 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ other information that should be provided before the tool is installed.

### Installation

![Debian Linux OS](https://raw.githubusercontent.com/vroncevic/gen_pm/dev/docs/debtux.png)

Navigate to release **[page](https://github.com/vroncevic/gen_pm/releases)** download and extract release archive.

To install **gen_pm** type the following:
Expand All @@ -41,7 +43,33 @@ cp -R ~/sh_tool/conf/ /root/scripts/gen_pm/ver.x.y/
cp -R ~/sh_tool/log/ /root/scripts/gen_pm/ver.x.y/
```

![alt tag](https://raw.githubusercontent.com/vroncevic/gen_pm/dev/docs/setup_tree.png)
Self generated setup script and execution
```
./gen_pm_setup.sh
[setup] installing App/Tool/Script gen_pm
Sun 05 Dec 2021 04:51:29 AM CET
[setup] copy App/Tool/Script structure
[setup] remove github editor configuration files
[setup] set App/Tool/Script permission
[setup] create symbolic link of App/Tool/Script
[setup] done
/root/scripts/gen_pm/ver.2.0/
├── bin/
│   ├── center.sh
│   ├── display_logo.sh
│   └── gen_pm.sh
├── conf/
│   ├── gen_pm.cfg
│   ├── gen_pm.logo
│   └── gen_pm_util.cfg
└── log/
└── gen_pm.log
3 directories, 7 files
lrwxrwxrwx 1 root root 42 Dec 5 04:51 /root/bin/gen_pm -> /root/scripts/gen_pm/ver.2.0/bin/gen_pm.sh
```

Or You can use docker to create image/container.

Expand All @@ -57,25 +85,97 @@ ln -s /root/scripts/gen_pm/ver.x.y/bin/gen_pm.sh /root/bin/gen_pm
export PATH=${PATH}:/root/bin/
# Generating Perl package
gen_pm SimplePlTool
gen_pm FileCheck
gen_pm ver.2.0
Sun 05 Dec 2021 04:54:08 AM CET
[check_root] Check permission for current session? [ok]
[check_root] Done
__ _ ___ _ __ _ __ _ __ ___
/ _` |/ _ \ '_ \ | '_ \| '_ ` _ \
| (_| | __/ | | | | |_) | | | | | |
\__, |\___|_| |_| | .__/|_| |_| |_|
|___/ |_|
Info github.io/gen_pm ver.2.0
Issue github.io/issue
Author vroncevic.github.io
[gen_pm] Loading basic and util configuration!
100% [================================================]
[load_conf] Loading App/Tool/Script configuration!
[check_cfg] Checking configuration file [/root/scripts/gen_pm/ver.2.0/conf/gen_pm.cfg] [ok]
[check_cfg] Done
[load_conf] Done
[load_util_conf] Load module configuration!
[check_cfg] Checking configuration file [/root/scripts/gen_pm/ver.2.0/conf/gen_pm_util.cfg] [ok]
[check_cfg] Done
[load_util_conf] Done
[check_tool] Checking tool [/usr/bin/h2xs]? [ok]
[check_tool] Done
[gen_pm] Generating module [FileCheck]
Defaulting to backwards compatibility with perl 5.30.0
If you intend this module to be compatible with earlier perl versions, please
specify a minimum perl version with the -b option.
Writing FileCheck/lib/FileCheck.pm
Writing FileCheck/Makefile.PL
Writing FileCheck/README
Writing FileCheck/t/FileCheck.t
Writing FileCheck/Changes
Writing FileCheck/MANIFEST
[gen_pm] Set owner!
[gen_pm] Set permission!
[gen_pm] Done
[logging] Checking directory [/root/scripts/gen_pm/ver.2.0/log/]? [ok]
[logging] Write info log!
[logging] Done
[check_tool] Checking tool [/usr/bin/tree]? [ok]
[check_tool] Done
FileCheck/
├── Changes
├── lib
│   └── FileCheck.pm
├── Makefile.PL
├── MANIFEST
├── README
└── t
└── FileCheck.t
2 directories, 6 files
```

### Dependencies

**gen_pm** requires next modules and libraries:
**gen_pm** requires next modules and libraries
* sh_util [https://github.com/vroncevic/sh_util](https://github.com/vroncevic/sh_util)

### Shell tool structure

**gen_pm** is based on MOP.

Code structure:
Shell tool structure
```
sh_tool/
├── bin/
│   ├── center.sh
│   ├── display_logo.sh
│   └── gen_pm.sh
├── conf/
│   ├── gen_pm.cfg
│   ├── gen_pm.logo
│   └── gen_pm_util.cfg
└── log/
└── gen_pm.log
Expand All @@ -85,7 +185,7 @@ sh_tool/

[![Documentation Status](https://readthedocs.org/projects/gen_pm/badge/?version=latest)](https://gen_pm.readthedocs.io/projects/gen_pm/en/latest/?badge=latest)

More documentation and info at:
More documentation and info at
* [https://gen_pm.readthedocs.io/en/latest/](https://gen_pm.readthedocs.io/en/latest/)
* [https://www.gnu.org/software/bash/manual/](https://www.gnu.org/software/bash/manual/)

Expand Down
Binary file modified docs/build/doctrees/environment.pickle
Binary file not shown.
Binary file modified docs/build/doctrees/index.doctree
Binary file not shown.
2 changes: 1 addition & 1 deletion docs/build/html/.buildinfo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: 7722a8f0931a0cae0ea3f5ec25b8a2e9
config: 4e7905d395f3abb33012e362eac2cc02
tags: 645f666f9bcd5a90fca523b33c5a78b7
14 changes: 11 additions & 3 deletions docs/build/html/_sources/index.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,16 @@ other information that should be provided before the tool is installed.
Installation
-------------

|Debian Linux OS|

.. |Debian Linux OS| image:: https://raw.githubusercontent.com/vroncevic/gen_pm/dev/docs/debtux.png
:target: https://www.debian.org

Navigate to release `page`_ download and extract release archive.

.. _page: https://github.com/vroncevic/gen_pm/releases

To install **gen_pm** type the following:
To install **gen_pm** type the following

.. code-block:: bash
Expand All @@ -57,7 +62,7 @@ Or You can use Docker to create image/container.
Dependencies
-------------

**gen_pm** requires next modules and libraries:
**gen_pm** requires next modules and libraries

* sh_util `https://github.com/vroncevic/sh_util <https://github.com/vroncevic/sh_util>`_

Expand All @@ -66,15 +71,18 @@ Shell tool structure

**gen_pm** is based on MOP.

Code structure:
Shell tool structure

.. code-block:: bash
sh_tool/
├── bin/
│   ├── center.sh
│   ├── display_logo.sh
│   └── gen_pm.sh
├── conf/
│   ├── gen_pm.cfg
│   ├── gen_pm.logo
│   └── gen_pm_util.cfg
└── log/
└── gen_pm.log
Expand Down
Binary file removed docs/build/html/_static/ajax-loader.gif
Binary file not shown.

0 comments on commit 771b3c4

Please sign in to comment.