Skip to content

Commit

Permalink
Change package to be called xkcd_pass.
Browse files Browse the repository at this point in the history
  • Loading branch information
adambirds committed Apr 28, 2021
1 parent 6b01332 commit e9070d7
Show file tree
Hide file tree
Showing 17 changed files with 94 additions and 94 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: Build xkpassgen
name: Build xkcd_pass

on: push
jobs:
build-n-publish:
name: Build xkpassgen
name: Build xkcd_pass
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@master
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/publish-to-pypi.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: Publish xkpassgen to PyPI
name: Publish xkcd_pass to PyPI

on: push
jobs:
build-n-publish:
name: Publish xkpassgen to PyPI
name: Publish xkcd_pass to PyPI
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@master
Expand All @@ -25,13 +25,13 @@ jobs:
--wheel
--outdir dist/
.
- name: Publish xkpassgen to Test PyPI
- name: Publish xkcd_pass to Test PyPI
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository_url: https://test.pypi.org/legacy/
skip_existing: true
- name: Publish xkpassgen to PyPI
- name: Publish xkcd_pass to PyPI
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@master
with:
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -134,4 +134,4 @@ dmypy.json

# Exclusions

!src/xkpassgen/lib/
!src/xkcd_pass/lib/
4 changes: 2 additions & 2 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
recursive-include src/xkpassgen/lib/ *
recursive-include src/xkpassgen/static/ *
recursive-include src/xkcd_pass/lib/ *
recursive-include src/xkcd_pass/static/ *
32 changes: 16 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
# xkpassgen
![build status](https://github.com/adambirds/xkcd-password-gen/actions/workflows/build.yml/badge.svg)
[![PyPI version](https://badge.fury.io/py/xkpassgen.svg)](https://badge.fury.io/py/xkpassgen)
[![codecov](https://codecov.io/gh/adambirds/xkcd-password-gen/branch/master/graph/badge.svg?token=4RKK2ABREH)](https://codecov.io/gh/adambirds/xkcd-password-gen)
![PyPI - Downloads](https://img.shields.io/pypi/dm/xkpassgen)
# xkcd_pass
![build status](https://github.com/adambirds/xkcd_password-gen/actions/workflows/build.yml/badge.svg)
[![PyPI version](https://badge.fury.io/py/xkcd_pass.svg)](https://badge.fury.io/py/xkcd_pass)
[![codecov](https://codecov.io/gh/adambirds/xkcd_password-gen/branch/master/graph/badge.svg?token=4RKK2ABREH)](https://codecov.io/gh/adambirds/xkcd_password-gen)
![PyPI - Downloads](https://img.shields.io/pypi/dm/xkcd_pass)

A flexible and scriptable password generator which generates strong passphrases, inspired by XKCD 936

```
$ xkpassgen
$ xkcd_pass
> HeadscarfSuddenDumping93
```

![](https://imgs.xkcd.com/comics/password_strength.png)

## Install
`xkpassgen` can easily be installed with the following command:
`xkcd_pass` can easily be installed with the following command:

```
pip install xkpassgen
pip install xkcd_pass
```

or manually by:
Expand All @@ -27,25 +27,25 @@ python setup.py install
```

## Source
The source code can be found [here](https://github.com/adambirds/xkcd-password-gen).
The source code can be found [here](https://github.com/adambirds/xkcd_password-gen).

Contributions welcome and gratefully appreciated!

## Requirements
Python 3 (Version 3.6 or later).

## Running `xkpassgen`
`xkpassgen` can be called with no arguments with an output using the default wordfile and settings.
## Running `xkcd_pass`
`xkcd_pass` can be called with no arguments with an output using the default wordfile and settings.
```
$ xkpassgen
$ xkcd_pass
> HeadscarfSuddenDumping93
```
The default settings return a single password made up of 3 words each having its first letter capitalized with two random digits afterwards.

It can also be called with a mixture of multiple arguments for example:

```
$ xkpassgen -d _ -c 5 --min 5 --max 7 --padding-digits-num 4
$ xkcd_pass -d _ -c 5 --min 5 --max 7 --padding-digits-num 4
> Mundane_Music_Spleen1837
> Reuse_Acclaim_Clarify2492
> Wildly_Contest_Anchor1798
Expand All @@ -62,14 +62,14 @@ This will return:
A full overview of the available options can be accessed by running following command:

```
xkpassgen --help
xkcd_pass --help
```

## Word Lists

Several word lists are provided with the package. The default, eff-long, was specifically designed by the EFF for [passphrase generation](https://www.eff.org/deeplinks/2016/07/new-wordlists-random-passphrases) and is licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/us/). As it was originally intended for use with Diceware ensure that the number of words in your passphrase is at least six when using it. Two shorter variants of that list, eff-short and eff-special, are also included. Please refer to the EFF documentation linked above for more information.

Note that `xkpassgen` can be used with any word file of the correct format: a file containing one word per line.
Note that `xkcd_pass` can be used with any word file of the correct format: a file containing one word per line.

## Changelog

Expand All @@ -87,4 +87,4 @@ Note that `xkpassgen` can be used with any word file of the correct format: a fi

## License

This project is released under the [GNU GENERAL PUBLIC LICENSE v3](https://github.com/adambirds/xkcd-password-gen/blob/master/LICENSE). However the original code from [redacted/XKCD-password-generator](https://github.com/redacted/XKCD-password-generator) is licensed under the [BSD 3-Clause license](https://github.com/adambirds/xkcd-password-gen/blob/master/LICENSE.BSD).
This project is released under the [GNU GENERAL PUBLIC LICENSE v3](https://github.com/adambirds/xkcd_password-gen/blob/master/LICENSE). However the original code from [redacted/xkcd_password-generator](https://github.com/redacted/xkcd_password-generator) is licensed under the [BSD 3-Clause license](https://github.com/adambirds/xkcd_password-gen/blob/master/LICENSE.BSD).
8 changes: 4 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,24 @@
long_description = fh.read()

setuptools.setup(
name="xkpassgen", # Replace with your own username
name="xkcd_pass", # Replace with your own username
version="1.0.5",
author="Adam Birds",
author_email="[email protected]",
description="Generate secure multiword passwords/passphrases, inspired by XKCD",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/adambirds/xkcd-password-gen",
url="https://github.com/adambirds/xkcd_password-gen",
project_urls={
"Bug Tracker": "https://github.com/adambirds/xkcd-password-gen/issues",
"Bug Tracker": "https://github.com/adambirds/xkcd_password-gen/issues",
},
license="LGPLv3",
classifiers=[
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
"Programming Language :: Python :: 3",
"Operating System :: OS Independent",
],
entry_points={"console_scripts": ["xkpassgen=xkpassgen.xkpassgen:main"]},
entry_points={"console_scripts": ["xkcd_pass=xkcd_pass.xkcd_pass:main"]},
package_dir={"": "src"},
packages=setuptools.find_packages(where="src"),
include_package_data=True,
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
8 changes: 4 additions & 4 deletions src/xkpassgen/xkpassgen.py → src/xkcd_pass/xkcd_pass.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import sys
from io import open

from xkpassgen.lib.case import (case_alternating, case_capitalize,
from xkcd_pass.lib.case import (case_alternating, case_capitalize,
case_first_upper, case_lower, case_random,
case_upper)

Expand Down Expand Up @@ -311,11 +311,11 @@ def emit_passwords(wordlist, options):
count -= 1


class XkPassGenArgumentParser(argparse.ArgumentParser):
class xkcd_passArgumentParser(argparse.ArgumentParser):
""" Command-line argument parser for this program. """

def __init__(self, *args, **kwargs):
super(XkPassGenArgumentParser, self).__init__(*args, **kwargs)
super(xkcd_passArgumentParser, self).__init__(*args, **kwargs)

self._add_arguments()

Expand Down Expand Up @@ -454,7 +454,7 @@ def main():
exit_status = 0

try:
parser = XkPassGenArgumentParser()
parser = xkcd_passArgumentParser()

options = parser.parse_args()
options.testing = False
Expand Down
Loading

0 comments on commit e9070d7

Please sign in to comment.