Skip to content

Commit

Permalink
Fixed cli.py, fixed some package name casing, pardeep now always …
Browse files Browse the repository at this point in the history
…starts Qt GUI, removed `gui_tk.py`.
  • Loading branch information
brenthuisman committed Feb 3, 2022
1 parent 0ff96bb commit 549a5f9
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 522 deletions.
15 changes: 10 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,22 @@ If you have Python installed, you can use pip! Make sure to update pip before in
$ pip3 install -U pip
$ pip3 install par2deep --user

If you use Windows, and do not have Python installed, you can grab an installer [here](https://github.com/brenthuisman/par2deep/releases). These msi packages are generated created with the `cx_Freeze` package using the `setup_cx.py` script:

$ python3 setup_cx.py bdist_msi

Alternatively, clone/download this repo and install:

$ python3 setup.py install --user
$ pip3 installl ./par2deep

Or run directly:

$ python3 par2deep

### Windows

If you use Windows, and do not have Python installed, you can grab an installer [here](https://github.com/brenthuisman/par2deep/releases). These msi packages are generated created with the `cx_Freeze` package using the `setup_cx.py` script:

$ python3 setup_cx.py bdist_msi

Configuration used to produce the release `.msi`: Python 3.8.10 64bit (for Windows 7 compatibility), cx_Freeze 6.4.

## Usage

After installation, run with `par2deep` for the GUI or `par2deep-cli` if you live in the terminal. Command line options may be enumerated by using the --help option. Note that `-q` will update, fix or recreate parity files as it sees fit. If unrepairable damage is found, it will recreate parity data. (The old tkinter GUI is unmaintained but available at `par2deep-tk`.)
Expand All @@ -53,6 +57,7 @@ Example `par2deep.ini`:

### Changelog

* 2022-02-03: v1.9.4.2: Fixed `cli.py`, fixed some package name casing, `pardeep` now always starts Qt GUI, removed `gui_tk.py`.
* 2022-01-31: v1.9.4.1: Moved kinda-broken (no UTF8 filename support) `gopar` changes to gopar branch, release last commit as new version as it fixes some things.
* 2020-04-26: v1.9.4: Include libpar2 for win64 and lin64 platforms, no external `par2` needed anymore.
* 2020-04-20: recreate verified_repairable creates backup. backups are shows upon init. orphans are shown upon init.
Expand Down
5 changes: 1 addition & 4 deletions par2deep/__main__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
import os,gui_qt,cli

if __name__ == '__main__':
if 'DISPLAY' in os.environ:
gui_qt.main()
else:
cli.main()
gui_qt.main()
11 changes: 3 additions & 8 deletions par2deep/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,12 @@ def disp10(lst,q=False):
def main():
p2d = par2deep()

try:
print("Using",p2d.par_cmd,"...")
except:
pass
print("Looking for files in",p2d.directory,"...")

if p2d.check_state() == 200:
print("The par2 command you specified is invalid.")
return 1
else:
print("Using",p2d.par_cmd,"...")
print("Looking for files in",p2d.directory,"...")

print("==========================================================")
print('Will create',len(p2d.create),'new par2 files.')
Expand All @@ -52,8 +49,6 @@ def main():
disp10(p2d.orphans_delete,p2d.quiet)
print('Will remove',len(p2d.backups_delete),'backup files.')
disp10(p2d.backups_delete,p2d.quiet)
print('Will remove',len(p2d.par2errcopies),'old repair files.')
disp10(p2d.par2errcopies,p2d.quiet)

if not p2d.quiet and p2d.len_all_actions>0 and not ask_yn("Perform actions?", default=None):
print('Exiting...')
Expand Down
Loading

0 comments on commit 549a5f9

Please sign in to comment.