Skip to content

Commit 26ead9e

Browse files
authored
Merge pull request #39 from codePerfectPlus/doc-patch-1
updating docs
2 parents 0be751c + 3cf59a9 commit 26ead9e

14 files changed

Lines changed: 339 additions & 133 deletions

.readthedocs.yaml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,13 @@ build:
1111
tools:
1212
python: "3.9"
1313

14-
mkdocs:
15-
configuration: mkdocs.yml
14+
# Build documentation in the docs/ directory with Sphinx
15+
sphinx:
16+
configuration: docs/conf.py
17+
18+
# If using Sphinx, optionally build your docs in additional formats such as PDF
19+
formats:
20+
- pdf
1621

1722
# Optionally declare the Python requirements required to build your docs
1823
python:

README.md

Lines changed: 1 addition & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -32,43 +32,10 @@
3232

3333
[RandomProfile](https://pypi.org/project/random-profile/) is a powerful and simple tool to generate fake data. You can use it to mock classes, populate databases and much more. You can check the full documentation here. Check on [Pypi](https://pypi.org/project/random-profile/)
3434

35-
## Installation
36-
37-
- This is A python 3 Package.
38-
- Install python 3.0+ or Anaconda 3.0+
39-
40-
```bash
41-
pip install random-profile # using pip
42-
conda install random-profile # using anaconda
43-
```
4435

4536
## Documentation
4637

47-
### As Python Module
48-
You can use the RandomProfile as a module in your python code. You can check the full documentation here.
49-
50-
```python
51-
from random_profile import RandomProfile
52-
rp = RandomProfile(num=5)
53-
54-
rp.full_profile(num=10)
55-
```
56-
57-
for detailed documentation check [here](https://randomprofilegenerator.readthedocs.io/)
58-
59-
### As Command Line Tool
60-
You can also use the RandomProfile as a command line tool. You can check the full documentation here.
61-
62-
```bash
63-
random-profile --help
64-
Usage: random-profile [OPTIONS]
65-
```
66-
67-
```bash
68-
random-profile -n 10 -p
69-
```
70-
71-
for detailed documentation check [here](https://randomprofilegenerator.readthedocs.io/)
38+
Documentation is available at [ReadTheDocs](https://randomprofilegenerator.readthedocs.io/en/latest/)
7239

7340
## Upcoming Features
7441

docs/Makefile

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Minimal makefile for Sphinx documentation
2+
#
3+
4+
# You can set these variables from the command line, and also
5+
# from the environment for the first two.
6+
SPHINXOPTS ?=
7+
SPHINXBUILD ?= sphinx-build
8+
SOURCEDIR = source
9+
BUILDDIR = build
10+
11+
# Put it first so that "make" without argument is like "make help".
12+
help:
13+
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
14+
15+
.PHONY: help Makefile
16+
17+
# Catch-all target: route all unknown targets to Sphinx using the new
18+
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
19+
%: Makefile
20+
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

docs/README.md

Lines changed: 0 additions & 94 deletions
This file was deleted.

docs/command_line_usage.rst

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
Command line usages
2+
=========
3+
4+
`Random Profile Generator` can be used as a command line tool.
5+
It can be used to generate a random profile and save it to a file.
6+
It can also be used to generate a random profile and print it to the console.
7+
8+
Usages:
9+
10+
.. code-block:: bash
11+
12+
random-profile --help
13+
Usage: random-profile [OPTIONS]
14+
15+
random-profile -n 10 -p
16+
17+
optional arguments:
18+
-h, --help show this help message and exit
19+
-n N Number of random profiles
20+
21+
-f, --fullname Get full name instead of first name
22+
-p, --profile Get full profile instead of first name
23+
-l, --lastname Get last name instead of first name
24+
-ip, --ipv4 Get an ipv4 IP address
25+
-j, --jobtitle Get job title
26+
27+
Get Random Profile:
28+
------------
29+
30+
.. code-block:: bash
31+
32+
# n = number of random profiles, p = profile
33+
random_profile -n 10 -p
34+
35+
Get First Name:
36+
------------
37+
38+
.. code-block:: bash
39+
40+
# n = number of random profiles, f = first name
41+
random_profile -n 10 -f
42+
43+
Get Last Name:
44+
------------
45+
46+
.. code-block:: bash
47+
48+
# n = number of random profiles, l = last name
49+
random_profile -n 10 -l
50+
51+
Get Job Title:
52+
------------
53+
54+
.. code-block:: bash
55+
56+
# n = number of random profiles, j = job title
57+
random_profile -n 10 -j
58+
59+
Get IPv4 Address:
60+
------------
61+
62+
.. code-block:: bash
63+
64+
# n = number of random profiles, ip = ipv4
65+
random_profile -n 10 -ip
66+
67+
Get Random Profile and Save to File:
68+
------------
69+
70+
.. code-block:: bash
71+
72+
# n = number of random profiles, p = profile
73+
random_profile -n 10 -p > random_profiles.txt
74+
75+
Get Random Profile version:
76+
------------
77+
78+
.. code-block:: bash
79+
80+
random_profile --version
81+
82+
random-profile 0.2.3

docs/conf.py

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
from datetime import datetime
2+
3+
project = 'audiobook'
4+
copyright = '2022, Deeapk Raj'
5+
author = 'Deeapk Raj'
6+
release = '2.0.4'
7+
8+
extensions = [
9+
'sphinx.ext.autosectionlabel'
10+
]
11+
12+
releases_github_path = "Py-Contributors/RandomProfileGenerator"
13+
14+
autosectionlabel_prefix_document = True
15+
16+
templates_path = ['_templates']
17+
source_suffix = ".rst"
18+
master_doc = "index"
19+
year = datetime.now().year
20+
copyright = "{} Deepak Raj".format(year)
21+
22+
html_theme = 'sphinx_rtd_theme' # 'pydata_sphinx_theme' 'alabaster'
23+
24+
html_static_path = ['_static']
25+
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store', '.venv']
26+
html_sidebars = { '**': ['globaltoc.html', 'relations.html', 'sourcelink.html', 'searchbox.html'] }

docs/import_as_module.rst

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
Import as module
2+
------------
3+
4+
You can import the module and use it in your own scripts.
5+
6+
.. code-block:: python
7+
8+
from random_profile import RandomProfile
9+
rp = RandomProfile()
10+
11+
# For first name
12+
rp.first_name(num=10)
13+
14+
# For full name
15+
rp.full_name(num=8)
16+
17+
# override the num value
18+
rp.full_profile(num=10)
19+
20+
# For last name
21+
rp.last_name(num=6)

docs/index.rst

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
2+
.. RandomProfileGenerator documentation master file, created by
3+
sphinx-quickstart on Sat Oct 29 16:13:30 2022.
4+
You can adapt this file completely to your liking, but it should at least
5+
contain the root `toctree` directive.
6+
.. rst-class:: hide-header
7+
8+
Welcome to RandomProfileGenerator's documentation!
9+
=====================================
10+
11+
|PyPI download month|
12+
13+
.. |PyPI download month| image:: https://img.shields.io/pypi/dm/RandomProfileGenerator.svg
14+
:target: https://pypi.python.org/pypi/RandomProfileGenerator/
15+
16+
|PyPI version fury.io|
17+
18+
.. |PyPI version fury.io| image:: https://badge.fury.io/py/RandomProfileGenerator.svg
19+
:target: https://pypi.python.org/pypi/RandomProfileGenerator/
20+
21+
|Open Source Love svg3|
22+
23+
.. |Open Source Love svg3| image:: https://badges.frapsoft.com/os/v3/open-source.svg?v=103
24+
:target: https://github.com/ellerbrock/open-source-badges/
25+
26+
.. image:: https://raw.githubusercontent.com/DrakeEntity/project-Image/master/9b2ca712-347a-4987-bac7-a4c3d106ed24_200x200.png
27+
:width: 200
28+
:alt: Py-Contributors Logo
29+
:align: right
30+
31+
32+
`RandomProfileGenerator` is a powerful and simple tool to generate fake data.
33+
You can use it to mock classes, populate databases and much more.
34+
You can check the full documentation here.
35+
36+
RandomProfileGenerator project developed under the MIT license by Py-Contributors.
37+
Py-Contributors is open source community of developers who are working on various python projects.
38+
39+
If you love open source contributions.
40+
41+
* Join the community on `Discord <https://discord.gg/JfbK3bS>`_.
42+
* join the community on `Github <https://github.com/Py-Contributors/support/issues/new?assignees=&labels=invite+me+to+the+organisation&template=invite.yaml&title=Please+invite+me+to+the+GitHub+Community+Organization>`_.
43+
44+
Other Projects by Py-Contributors:
45+
--------------
46+
47+
* `AudioBook <https://audiobook.readthedocs.io/en/latest//>`_
48+
* `Cybel - The Discord Bot <https://github.com/Py-Contributors/Cybel>`_
49+
* `Twitterify - Tweet-retweet bot <https://github.com/Py-Contributors/twitterify>`_
50+
51+
|forthebadge made-with-python|
52+
53+
.. |forthebadge made-with-python| image:: http://ForTheBadge.com/images/badges/made-with-python.svg
54+
:target: https://www.python.org/
55+
56+
57+
.. toctree::
58+
:hidden:
59+
60+
introduction.rst
61+
installation.rst
62+
command_line_usage.rst
63+
import_as_module.rst
64+
changelog.rst
65+
roadmap.rst
66+
run_test_cases.rst
67+
68+

0 commit comments

Comments
 (0)