Skip to content

Commit

Permalink
documentation fixes and improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
TabulateJarl8 committed Feb 22, 2023
1 parent 781856b commit 518d119
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 13 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ $ pip3 install randfacts

Via your AUR helper, like paru:
```sh
paru -S python-randfacts
$ paru -S python-randfacts
```

Or manually
Expand All @@ -45,7 +45,7 @@ import randfacts
x = randfacts.get_fact()
print(x)
```
will print a random fact like:
The above example will print a random fact like:
`Penguins can't taste sweet or savory flavors, only sour and salty ones`

This package has a filter option to filter out potentially inappropriate facts. The filter is on by default. To disable the filter, you can just set the `filter_enabled` parameter to `False`.
Expand All @@ -69,19 +69,19 @@ If you want to access the list of facts directly, you can just import the `safe_

randfacts can be executed via the command line with the following commands:

Normal execution; only safe facts
Normal execution; only SFW (safe for work) facts

```sh
$ python3 -m randfacts
```

The unsafe argument can be supplied to provide only unsafe facts
The unsafe argument can be supplied to provide only NSFW (not safe for work) facts

```sh
$ python3 -m randfacts --unsafe
```

The mixed argument can be provided to provide both safe and unsafe facts.
The mixed argument can be provided to provide both SFW and NSFW facts.

```sh
$ python3 -m randfacts --mixed
Expand Down
10 changes: 5 additions & 5 deletions randfacts/__init__.py
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
"""Module to generate random facts.
randfacts provides an interface to a list of facts installed with the module.
You can retrieve facts via the getFact method. randfacts also allows for
You can retrieve facts via the get_fact method. randfacts also allows for
execution via the command line. See the examples section for more details.
Code Examples:
Example usage of randfacts in code.
Generate a random safe fact.
Generate a random SFW (safe for work) fact.
>>> randfacts.get_fact()
Generate a random unsafe fact.
Generate a random NSFW (not safe for work) fact.
>>> randfacts.get_fact(only_unsafe=True)
Generate a random mixed fact (possibility of both safe and unsafe facts)
Generate a random mixed fact (possibility of both SFW and NSFW facts)
>>> randfacts.get_fact(False)
>>> # or
Expand All @@ -32,7 +32,7 @@
$ python3 -m randfacts --unsafe
The mixed argument can be provided to provide both safe and unsafe facts.
The mixed argument can be provided to provide both SFW and NSFW facts.
$ python3 -m randfacts --mixed
Expand Down
4 changes: 2 additions & 2 deletions randfacts/__version__.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
__title__ = "randfacts"
__description__ = "Package to generate random facts"
__url__ = "https://github.com/TabulateJarl8/randfacts"
__version__ = "0.20.0"
__version__ = "0.20.1"
__author__ = "Tabulate"
__author_email__ = "[email protected]"
__license__ = "MIT"
__copyright__ = "Copyright 2020-2021 Connor Sample"
__copyright__ = "Copyright 2020-2023 Connor Sample"
2 changes: 1 addition & 1 deletion randfacts/randfacts.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def get_fact(filter_enabled: bool = True, only_unsafe: bool = False) -> str:
only_unsafe : bool
The `only_unsafe` parameter determines if the function will only give
unsafe facts. Takes precedence over the `filter_enabled` argument.
unsafe (NSFW) facts. Takes precedence over the `filter_enabled` argument.
Returns
------
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Natural Language :: English",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
Expand Down

0 comments on commit 518d119

Please sign in to comment.