Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unclear how to install #21

Closed
aspiers opened this issue Apr 1, 2015 · 17 comments
Closed

Unclear how to install #21

aspiers opened this issue Apr 1, 2015 · 17 comments
Labels
📚 documentation Update to non-code (readme, docstrings, typos, …)
Milestone

Comments

@aspiers
Copy link
Contributor

aspiers commented Apr 1, 2015

Since transitioning from a simple script to a package, it's not at all clear how to use this any more. README.rst is missing any installation instructions, and the usage text begins:

Usage: __init__.py [OPTIONS] [MAILDIR [MAILDIR ...]]

which is obviously wrong.

@aspiers
Copy link
Contributor Author

aspiers commented Jun 3, 2015

@kdeldycke Please can you clarify? I can't use the new version until I understand this.

@micressor
Copy link

Me too. I'd like to use this script, but how?

@jult
Copy link

jult commented Sep 18, 2015

Same here. +1. How to even run this? I tried to do # ./__init__.py but it yields

import: unable to open X server `' @ error/import.c/ImportImageCommand/368.
import: unable to open X server `' @ error/import.c/ImportImageCommand/368.
import: unable to open X server `' @ error/import.c/ImportImageCommand/368.
import: unable to open X server `' @ error/import.c/ImportImageCommand/368.
import: unable to open X server `' @ error/import.c/ImportImageCommand/368.
import: unable to open X server `' @ error/import.c/ImportImageCommand/368.
./__init__.py: line 26: from: command not found
./__init__.py: line 27: from: command not found
./__init__.py: line 28: from: command not found
./__init__.py: line 29: from: command not found
./__init__.py: line 31: __version__: command not found
./__init__.py: line 33: syntax error near unexpected token `('
./__init__.py: line 33: `class InsufficientHeadersError(Exception):'

so yeah. Way to go on the documentation here. ;-)

@kdeldycke
Copy link
Owner

OK guys, I get the message ! I agree with all of you: the whole package is quite broken and the associated documentation is heavily user-unfriendly.

I'm going to refactor the package in the next few weeks. Stay tuned.

@jult
Copy link

jult commented Sep 18, 2015

Sad to hear that. Wanted to use it today ;-) Do you have an older script doing the same somewhere I can use on some dovecot Maildir mess with dupes?

@aspiers
Copy link
Contributor Author

aspiers commented Sep 18, 2015

@jult just do what I'm doing and use the version from before the big change. It's easy to find in the git history.

@jult
Copy link

jult commented Sep 18, 2015

OK, I will. Just found another good option to look at: http://wiki2.dovecot.org/Tools/Doveadm/Deduplicate

@kdeldycke
Copy link
Owner

As @aspiers said: you'd better use an old version from the git history.

Here is the latest version before the packaging attempt: https://github.com/kdeldycke/maildir-deduplicate/tree/851b2e9f166b22ada55538bd58d3fc81f51dbaaf

@aspiers
Copy link
Contributor Author

aspiers commented Sep 18, 2015

@kdeldycke maybe you could tag that commit for convenience, or even create a stablebranch off it.

The doveadm command seems to do extremely naive deduplication based on the help text for the -m switch.

@kdeldycke kdeldycke self-assigned this Sep 18, 2015
@kdeldycke kdeldycke added this to the 1.0.0 milestone Sep 18, 2015
@jult
Copy link

jult commented Sep 18, 2015

So, how does one run the old one? I found that it works from the current dir given as a first param and looks for /cur /new etc. but would be good to know if it fucks up or runs dry etc. I'm on a linux machine, with python.

@kdeldycke kdeldycke changed the title unclear how to install Unclear how to install Sep 18, 2015
@kdeldycke
Copy link
Owner

@aspiers : Just did that. Branch is now called legacy and the home page of the project now points to that branch: https://github.com/kdeldycke/maildir-deduplicate/tree/legacy

@jult
Copy link

jult commented Sep 18, 2015

Old script runs, but is not very clear on what it's doing. It did give me something wrong after a run on some Maildir:

 Traceback (most recent call last):
   File "./maildir-deduplicate.py", line 204, in <module>
     main()
   File "./maildir-deduplicate.py", line 200, in main
    duplicates = findDuplicates(mails_by_hash, delete)
   File "./maildir-deduplicate.py", line 107, in findDuplicates
    subject, count = re.subn('\s+', ' ', subject)
   File "/usr/lib64/python2.6/re.py", line 162, in subn
    return _compile(pattern, 0).subn(repl, string, count)
  TypeError: expected string or buffer

@kdeldycke
Copy link
Owner

@jult Now that's another issue. I created a dedicated ticket at: #25 . Please continue the discussion over there.

@kdeldycke
Copy link
Owner

Installation instructions added in commit 324d447. The remaining work required to make the script useable again is now ported by #26.

@jult
Copy link

jult commented Sep 20, 2015

You closed this, but, even though the -h works, it doesn't say a thing about stacking options.
What happens if you stack, say -dOns, does that work?

@kdeldycke
Copy link
Owner

@jult don't worry, the CLI is supposed to stop and return an error message if a set of options is not allowed.

@github-actions
Copy link

github-actions bot commented Oct 5, 2020

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 5, 2020
@kdeldycke kdeldycke removed their assignment Oct 28, 2020
@kdeldycke kdeldycke added 📚 documentation Update to non-code (readme, docstrings, typos, …) and removed documentation labels Nov 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
📚 documentation Update to non-code (readme, docstrings, typos, …)
Projects
None yet
Development

No branches or pull requests

4 participants