Skip to content

Commit 36b5a64

Browse files
committed
Release 2.0.3: command name change used to be undocumented
1 parent cb9b36e commit 36b5a64

5 files changed

Lines changed: 30 additions & 18 deletions

File tree

CHANGELOG.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1313
* Modify names of output files
1414
* Standalone GUI client
1515

16+
## [2.0.3] - 2021-03-27
17+
18+
### Added
19+
20+
* Command can now be invoked with either ``d2f2`` or ``D2F2``
21+
22+
### Fixed
23+
24+
* Command name change was undocumented
25+
1626
## [2.0.2] - 2021-03-26
1727

1828
### Removed
@@ -84,7 +94,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
8494
* Core functionality: convert image folders into PDF files over CLI
8595
* "Multiple" mode for converting batches of folders more easily
8696

87-
[Unreleased]: https://github.com/DomCie/D2F2/compare/v2.0.2...HEAD
97+
[Unreleased]: https://github.com/DomCie/D2F2/compare/v2.0.3...HEAD
98+
[2.0.3]: https://github.com/DomCie/D2F2/compare/v2.0.2...v2.0.3
8899
[2.0.2]: https://github.com/DomCie/D2F2/compare/v2.0.1...v2.0.2
89100
[2.0.1]: https://github.com/DomCie/D2F2/compare/v2.0.0...v2.0.1
90101
[2.0.0]: https://github.com/DomCie/D2F2/compare/v1.2.1...v2.0.0

D2F2/CONFIGURATIONS.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
MODULE_NAME = "D2F2"
2-
VERSION = "2.0.2"
2+
VERSION = "2.0.3"
33
AUTHOR = "DomCie"

D2F2/__main__.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
from D2F2.CONFIGURATIONS import *
21
from D2F2.convert import *
32

43
import D2F2.shell as shell
@@ -7,11 +6,10 @@
76
import sys
87

98

10-
def main(argv=None) -> int:
11-
if argv is None:
12-
argv = sys.argv[1:]
9+
def main() -> int:
10+
argv = sys.argv
1311

14-
help_msg = f"{MODULE_NAME} [OPTIONS] PATH [PATH...]\nConvert image folders into files\n\nOPTIONS:\n-H, " \
12+
help_msg = f"{argv[0]} [OPTIONS] PATH [PATH...]\nConvert image folders into files\n\nOPTIONS:\n-H, " \
1513
f"--help\t\t\t\tShow this help\n-B, --batch\t\t\t\tConvert each subfolder of PATH to a " \
1614
f"file\n-F, --format FORMAT\t\t\tSpecify an output format\n\t\t\t\t\tAVAILABLE FORMATS:\t[PDF] " \
1715
f"Portable Document Format (default)\n\t\t\t\t\t\t\t\t[CBZ] Comic Book Format, " \
@@ -22,7 +20,7 @@ def main(argv=None) -> int:
2220
f"oldest first\n\t\t\t\t\t\t\t\t[-3] Time of creation / metadata change, newest first\n-O, --output " \
2321
f"OUTPUT_PATH\t\tSave files to OUTPUT_PATH (default: current directory)"
2422
try:
25-
opts, args = getopt.getopt(argv, 'BF:HO:S:', ['batch', 'format=', 'help', 'output=', 'shell', 'sort='])
23+
opts, args = getopt.getopt(argv[1:], 'BF:HO:S:', ['batch', 'format=', 'help', 'output=', 'shell', 'sort='])
2624
except getopt.GetoptError:
2725
print(help_msg)
2826
return 2
@@ -89,4 +87,4 @@ def main(argv=None) -> int:
8987

9088

9189
if __name__ == "__main__":
92-
sys.exit(main(sys.argv[1:]))
90+
sys.exit(main())

README.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# D2F2 2.0.2
1+
# D2F2 2.0.3
22

33
D2F2 (formerly _DIRtoPDF_) is a tool written in Python to convert image folders into files.
44

@@ -14,6 +14,8 @@ or use one of the standalone versions (see below).
1414

1515
## Usage
1616

17+
Please note: ``d2f2`` and ``D2F2`` are interchangeable.
18+
1719
### Operation modes
1820

1921
D2F2 offers two modes of operation: "single" and "batch".
@@ -23,23 +25,23 @@ D2F2 offers two modes of operation: "single" and "batch".
2325
The standard mode, converts each given directory into a file.
2426

2527
```commandline
26-
D2F2 /a/path /another/path ...
28+
d2f2 /a/path /another/path ...
2729
```
2830

2931
#### Batch mode
3032

3133
Useful for converting big batches of folders, this mode converts each subdirectory within the given directories into a file. To use it, add the ``-B``/``--batch`` option to the command:
3234

3335
```commandline
34-
D2F2 -B /a/path /another/path ...
36+
d2f2 -B /a/path /another/path ...
3537
```
3638

3739
### Output format
3840

3941
By default, D2F2 saves files in the PDF format. If you want to use another supported format, use the ``-F``/``--format`` option:
4042

4143
```commandline
42-
D2F2 /a/path ... -F FORMAT
44+
d2f2 /a/path ... -F FORMAT
4345
```
4446

4547
Currently, there are 2 supported formats (with more to be added in the future). Use the appropriate format as the FORMAT parameter:
@@ -52,15 +54,15 @@ Currently, there are 2 supported formats (with more to be added in the future).
5254
By standard, D2F2 saves files to the current directory. If you want another output path, use the ``-O``/``--output`` option:
5355

5456
```commandline
55-
D2F2 /a/path ... -O /an/output/path
57+
d2f2 /a/path ... -O /an/output/path
5658
```
5759

5860
### Sorting mode
5961

6062
By default, D2F2 sorts the images in alphanumeric, ascending order (A-Z). If you want to use another sorting mode you can specify one by using the ``-S``/``--sort`` option:
6163

6264
```commandline
63-
D2F2 /a/path ... -S MODE
65+
d2f2 /a/path ... -S MODE
6466
```
6567

6668
Currently, there are 6 sorting modes available. Use the corresponding number from the following list as the MODE parameter:
@@ -81,7 +83,7 @@ Standalone versions for the shell are available for Windows and Linux (see [Rele
8183
You can also start the shell from the command line:
8284

8385
```commandline
84-
D2F2 --shell
86+
d2f2 --shell
8587
```
8688

8789
## TODO

setup.cfg

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[metadata]
22
name = D2F2
3-
version = 2.0.2
3+
version = 2.0.3
44
author = DomCie
55
author_email = dev@domcie.net
66
description = Tool to convert image folders into files
@@ -20,4 +20,5 @@ install_requires =
2020

2121
[options.entry_points]
2222
console_scripts =
23-
d2f2 = D2F2:main
23+
d2f2 = D2F2:main
24+
D2F2 = D2F2:main

0 commit comments

Comments
 (0)