Compare commits

..

2 Commits

Author SHA1 Message Date
ff8a3c1b56
Package dicekey for PyPI 2023-07-18 04:40:30 -04:00
dcb9e8ce77
The bare minimum to upgrade to Python 3 2023-07-18 04:03:49 -04:00
6 changed files with 55 additions and 58 deletions

22
.gitignore vendored
View File

@ -1,15 +1,7 @@
######### dist/
# Python *.egg-info/
######### .env
*.pyc env
*/__pycache__/*
build .venv
venv
#########
# Debian
#########
*.deb
backup-*.tgz
description-pak
doc-pak

View File

@ -1,6 +0,0 @@
install:
python setup.py build
sudo checkinstall -Dy --fstrans=no python setup.py install
clean:
sudo rm -r build *-pak dicekey_*.deb

View File

@ -1,32 +1,19 @@
# Dicekey # Dicekey
Dicekey is a [Diceware](http://diceware.com) passphrase generator that aims Dicekey is a [Diceware](http://diceware.com) simple Python passphrase generator.
to be user friendly and encourage the adoption of strong random passphrases.
## Quick Start ## Quick Start
Instructions on how to install from the git repository for developers. 1. Clone the repository: `git clone https://git.krislamo.org/kris/dicekey`
2. Install dependencies: `sudo apt-get install python-tk`
* Clone the repository: `git clone https://github.com/Kris619/Dicekey.git` 3. Create a virtual environment: `python3 -m venv .venv`
* Install dependencies: `sudo apt-get install python-tk checkinstall` 4. Activate the virtual environment `source .venv/bin/activate`
* Install Dicekey with GNU make: `make install` 5. Install package: `pip install -e .`
* Clean up files: `make clean` 6. Run `dicekey` and optionally specify a length, i.e., `dicekey 7`
To uninstall Dicekey: `sudo dpkg -r dicekey`
## Development
Dicekey is developed on Trisquel GNU/Linux 7 x86_64 with Python 2.7.6
and checkinstall 1.6.2. There *are* plans to support other platforms.
Development follows the the [Semantic
Versioning](http://semver.org/spec/v2.0.0.html) 2.0.0 specification and the
[PEP 8](https://www.python.org/dev/peps/pep-0008/) styling guide. Mistakes may
occur but we shall try to follow these guidelines to the best of our ability.
## Copyrights and Licenses ## Copyrights and Licenses
Copyright (C) 2016 Kris Lamoureux Copyright (C) 2016, 2023 Kris Lamoureux
All Dicekey All Dicekey
code is [Free Software](https://www.gnu.org/philosophy/free-sw.en.html) code is [Free Software](https://www.gnu.org/philosophy/free-sw.en.html)

12
dicekey/dicekey → dicekey/main.py Normal file → Executable file
View File

@ -1,7 +1,7 @@
#!/usr/bin/env python #!/usr/bin/env python3
# Dicekey. A Diceware passphrase generator. # Dicekey. A Diceware passphrase generator.
# Copyright (C) 2016 Kris Lamoureux # Copyright (C) 2016, 2023 Kris Lamoureux
# #
# This program is free software: you can redistribute it and/or modify # This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
@ -17,7 +17,7 @@
# Built-in # Built-in
import sys import sys
import Tkinter as tk import tkinter as tk
# Local # Local
from dicekey import diceware from dicekey import diceware
@ -47,12 +47,12 @@ def main():
if len(sys.argv) > 1: if len(sys.argv) > 1:
if wordlist: if wordlist:
if sys.argv[1].isdigit(): if sys.argv[1].isdigit():
print ' '.join(pwgen.wordgen(int(sys.argv[1]))) print(' '.join(pwgen.wordgen(int(sys.argv[1]))))
else: else:
error = "Error: Argument '%s' is not an integer." error = "Error: Argument '%s' is not an integer."
print error % (sys.argv[1]) print(error % (sys.argv[1]))
else: else:
print "Error: Incomplete or missing word list." print("Error: Incomplete or missing word list.")
else: else:
root = tk.Tk() root = tk.Tk()

21
pyproject.toml Normal file
View File

@ -0,0 +1,21 @@
[build-system]
requires = ["setuptools>=61.0"]
build-backend = "setuptools.build_meta"
[project]
name = "dicekey"
version = "0.0.1"
authors = [
{ name="Kris Lamoureux", email="kris@lamoureux.io" },
]
description = "A simple Python passphrase generator"
readme = "README.md"
requires-python = ">=3.7"
classifiers = [
"Programming Language :: Python :: 3",
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
"Operating System :: OS Independent",
]
[project.urls]
"Homepage" = "https://git.krislamo.org/kris/dicekey"

View File

@ -1,5 +1,5 @@
# Dicekey. A Diceware passphrase generator. # Dicekey. A Diceware passphrase generator.
# Copyright (C) 2016 Kris Lamoureux # Copyright (C) 2016, 2023 Kris Lamoureux
# #
# This program is free software: you can redistribute it and/or modify # This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
@ -13,14 +13,13 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
# Built-in from setuptools import setup
from distutils.core import setup
NAME = "Dicekey" NAME = "dicekey"
VERSION = "3.1.0-prealpha" VERSION = "0.0.1"
AUTHOR = "Kris Lamoureux" AUTHOR = "Kris Lamoureux"
AUTHOR_EMAIL = "KrisPublicEmail@gmail.com" AUTHOR_EMAIL = "kris@lamoureux.io"
URL = "https://github.com/Kris619/Dicekey/" URL = "https://git.krislamo.org/kris/dicekey"
DESCRIPTION = "A Diceware passphrase generator" DESCRIPTION = "A Diceware passphrase generator"
setup( setup(
@ -31,7 +30,11 @@ setup(
author_email=AUTHOR_EMAIL, author_email=AUTHOR_EMAIL,
license="GNU GPLv3", license="GNU GPLv3",
url=URL, url=URL,
scripts = ["dicekey/dicekey"],
py_modules = ["dicekey.diceware"], py_modules = ["dicekey.diceware"],
data_files = [("dicekey/wordlist.asc", '')] data_files = [("dicekey/wordlist.asc", '')],
) entry_points={
'console_scripts': [
'dicekey = dicekey.main:main',
],
},
)