aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElena ``of Valhalla'' Grandi <valhalla@trueelena.org>2017-07-14 22:27:40 +0200
committerElena ``of Valhalla'' Grandi <valhalla@trueelena.org>2017-07-14 22:27:40 +0200
commite258f08abd2455cc6b58841664d92d75d93c0933 (patch)
tree097851ff01dc02e05745dc18af4a227608d991ce
parent128d9429fab830dad69243cbf9e6b6af5c3ed258 (diff)
README, setup.py and manpage
-rw-r--r--README.rst30
-rwxr-xr-xdebdate2
-rw-r--r--debdate.1.rst61
-rw-r--r--setup.py26
4 files changed, 118 insertions, 1 deletions
diff --git a/README.rst b/README.rst
new file mode 100644
index 0000000..4d2f2ca
--- /dev/null
+++ b/README.rst
@@ -0,0 +1,30 @@
+=========
+ debdate
+=========
+
+------------------------------------------------
+ Convert Gregorian dates to Debian Regnal dates
+------------------------------------------------
+
+``debdate`` is a fundamental tool for anybody who follows the debian
+calendar where the years are named after the current stable release.
+
+Installation
+------------
+
+``debdate`` depends on python3 and dateutil; no installation is
+required, as the script can be run directly from the repository.
+
+Under Debian and possibly some derivatives, ``debdate`` can read
+up-to-date release dates from the package distro-info-data.
+
+License
+-------
+
+Copyright (C) 2017 Elena Grandi <valhalla@trueelena.org>
+
+This program is free software. It comes without any warranty, to the
+extent permitted by applicable law. You can redistribute it and/or
+modify it under the terms of the Do What The Fuck You Want To Public
+License, Version 2, as published by Sam Hocevar. See
+http://www.wtfpl.net/ for more details.
diff --git a/debdate b/debdate
index a564939..6fd6f27 100755
--- a/debdate
+++ b/debdate
@@ -1,6 +1,6 @@
#!/usr/bin/env python3
-# Copyright (C) Elena Grandi <valhalla@trueelena.org>
+# Copyright (C) 2017 Elena Grandi <valhalla@trueelena.org>
# This program is free software. It comes without any warranty, to the
# extent permitted by applicable law. You can redistribute it and/or
# modify it under the terms of the Do What The Fuck You Want To Public
diff --git a/debdate.1.rst b/debdate.1.rst
new file mode 100644
index 0000000..50317dd
--- /dev/null
+++ b/debdate.1.rst
@@ -0,0 +1,61 @@
+=========
+ debdate
+=========
+
+------------------------------------------------
+ Convert Gregorian dates to Debian Regnal dates
+------------------------------------------------
+
+:Author: valhalla@trueelena.org
+:Date: 2017-07-14
+:Copyright: 2017 Elena Grandi
+
+ Released under the terms of the Do What The Fuck You
+ Want To Public License, Version 2, as published by Sam
+ Hocevar. http://www.wtfpl.net/
+:Manual section: 1
+
+SYNOPSIS
+========
+
+debdate [-h] [-d DATE | -s SECONDS] {test} ...
+
+DESCRIPTION
+===========
+
+``debdate`` is a fundamental tool for anybody who follows the debian
+calendar where the years are named after the current stable release.
+
+OPTIONS
+=======
+
+ -h, --help show this help message and exit
+ -d DATE, --date DATE A gregorian date
+ -s SECONDS, --seconds SECONDS A date as seconds from the Unix Epoch
+
+EXAMPLES
+========
+
+``debdate``
+
+Print the debian regnal date for today.
+
+``debdate -d 2017-06-18``
+
+Print the debian regnal date for the day of the release of Stretch.
+
+``debdate -s 1497736800``
+
+Print the same date as above.
+
+``debdate -d 'Jul 18 2017'``
+
+Print again the same date as above, passed in an illogical format.
+Any string that is recognised as a valid date by dateutil can be used.
+
+SEE ALSO
+========
+
+* date(1)
+* ddate(1)
+* https://dateutil.readthedocs.io/en/stable/
diff --git a/setup.py b/setup.py
new file mode 100644
index 0000000..14d73cc
--- /dev/null
+++ b/setup.py
@@ -0,0 +1,26 @@
+#!/usr/bin/env python3
+
+from setuptools import setup
+
+setup(
+ name='debdate',
+ version='0.20170714',
+ scripts=['debdate'],
+ install_requires=[
+ 'python-dateutil',
+ ],
+ author="Elena ``of Valhalla'' Grandi",
+ author_email="valhalla@trueelena.org",
+ description='Convert Gregorian dates to Debian Regnal dates',
+ url='http://git.trueelena.org/cgit.cgi/software/debdate/about/',
+ license='WTFPLv2',
+ classifiers=[
+ 'Development Status :: 4 - Beta',
+ 'Environment :: Console',
+ 'Intended Audience :: End Users/Desktop',
+ 'License :: DFSG approved',
+ 'Programming Language :: Python :: 3 :: Only',
+ 'Topic :: Religion',
+ 'Topic :: Utilities',
+ ]
+)