carderne / signal-export

Export your Signal chats to markdown files with attachments
Other
481 stars 50 forks source link

Installing on Windows #89

Closed dmct10 closed 1 year ago

dmct10 commented 1 year ago

Non-dev here. I have installed Python, Anaconda. Not sure what I'm doing wrong here.

when I pull and run carderne/sigexport:latest

I get the error

2022-11-21 09:59:36 Error: /Signal/config.json not found in directory /Signal

I do not know how to do this:

Then run the script! It will do some Docker stuff under the hood to get your data out of the encrypted database.

sigexport ~/signal-chats

output will be saved to the supplied directory

Run the script in what? How? Sorry, I'm just a normal Signal user trying to back some stuff up.

carderne commented 1 year ago

Can you clarify what exactly you did? Did you run sigexport output-folder-name in Powershell, or run the image in Docker Desktop, or something else?

The error you got means that the docker image couldn't find any data, so probably the script didn't provide it correctly, or you didn't. It's also possible that there isn't any data there, so check for a file called config.json under AppData/Roaming/Signal in your home directory.

dmct10 commented 1 year ago

I installed Docker, then pulled the 200MB file. When I ran the image, I received the error, but it looks like there is indeed a config.json in AppData\Roaming\Signal.

When I run sigexport output-folder-name in PowerShell, I receive:

sigexport : The term 'sigexport' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At line:1 char:1

carderne commented 1 year ago

The direct Docker method

In Docker, you're trying to run it without Python. See the instructions here. The way you actually run this in Docker Desktop might be different. (But not that you must provide the two volume mounts -v $BLABLA:/Signal etc, and you must add the --overwrite /output argument.)

With Python

It sounds like you haven't installed the package. Did you run pip install signal-export?

dmct10 commented 1 year ago

I'm sorry I am not following much of this.

I have Python installed. I have Docker installed.

When I run "pip install signal-export" in Powershell, I receive a list of "Requirement already satisfied."

Then I run sigexport ~/signal-chats and receive this:

sigexport : The term 'sigexport' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At line:1 char:1

  • sigexport ~/signal-chats
  • 
    + CategoryInfo          : ObjectNotFound: (sigexport:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException
dmct10 commented 1 year ago

And how do I provide the volume mounts?

carderne commented 1 year ago

Docker method

I don't know how to add volume mounts in Docker Desktop. I can only point you to these command line instructions and leave it to you to figure out that translates to the GUI system (that I've never used).

Python

Try the following:

python -m sigexport.main --help
carderne commented 1 year ago

Confirmation fmro #90 that the python command above will solve this. Also advice added to README in https://github.com/carderne/signal-export/commit/a4b250b8627fdebff8931e3748b9b366448e0c7c

cloudgreen commented 1 year ago

@dmct10 Did you manage to get this installed and working on Windows?

If I understand correctly, you should be able to do the export with just the following 3 steps on native Windows:

1) Install Docker Desktop and the sigexport image 2) Install Python and the signal-export script/package 3) Run the python script for export and the Python script will utilize the Docker image to do its magic

Did I get that correct? And no WSL needed?

carderne commented 1 year ago

Yes that should be possible! Please report back :)

cloudgreen commented 1 year ago

Yes that should be possible! Please report back :)

Woho, it worked! :D Thanks for your great work! Images, videos and audio all work, very impressive.

I will try to summarize Windows installation instructions, if it would be of help.

dmct10 commented 1 year ago

@cloudgreen

Sorry, this was five months ago and I'm not sure how to get back to where you need me to go. The instructions were too unclear and I abandoned my attempt.

dmct10 commented 1 year ago

PS C:\Users\ABC> python -m sigexport.main ~/signal-chats Using Docker to extract data, this may take a while the first time! Exception in thread Thread-2 (_readerthread): Traceback (most recent call last): File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.2800.0_x64qbz5n2kfra8p0\lib\threading.py", line 1016, in _bootstrap_inner self.run() File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.2800.0_x64qbz5n2kfra8p0\lib\threading.py", line 953, in run self._target(*self._args, **self._kwargs) File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.2800.0_x64__qbz5n2kfra8p0\lib\subprocess.py", line 1499, in _readerthread buffer.append(fh.read()) File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.2800.0_x64__qbz5n2kfra8p0\lib\encodings\cp1252.py", line 23, in decode return codecs.charmap_decode(input,self.errors,decoding_table)[0] UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d in position 1739: character maps to Docker process failed, see logs below: Command '['docker', 'run', '--rm', '--volume=C:\Users\ABC\AppData\Roaming\Signal:/Signal', 'carderne/sigexport:v1.5.3']' returned non-zero exit status 1.

cloudgreen commented 1 year ago

@cloudgreen

Sorry, this was five months ago and I'm not sure how to get back to where you need me to go. The instructions were too unclear and I abandoned my attempt.

Thanks for getting back! I actually managed to get it working myself, and will try to write some clear Windows installation instructions soon!

Yolakalemowa commented 5 months ago

@cloudgreen Sorry, this was five months ago and I'm not sure how to get back to where you need me to go. The instructions were too unclear and I abandoned my attempt.

Thanks for getting back! I actually managed to get it working myself, and will try to write some clear Windows installation instructions soon!

Hi... I thought I'd check if you wrote this windows installation instructions? Would be really appreciated.

cloudgreen commented 5 months ago

@cloudgreen Sorry, this was five months ago and I'm not sure how to get back to where you need me to go. The instructions were too unclear and I abandoned my attempt.

Thanks for getting back! I actually managed to get it working myself, and will try to write some clear Windows installation instructions soon!

Hi... I thought I'd check if you wrote this windows installation instructions? Would be really appreciated.

These are the high-level steps I took on Windows 10, these notes should be correct but I can't guarantee it! 😛

Instructions

  1. Enable Windows WSL2 feature (required for Docker)
  2. Install Docker Desktop (I used WSL2 backend)
  3. Download Docker image
  4. Install Python 3.x via Windows Store
  5. Install Python package with: "pip install signal-export"
  6. Start python script (manually change to path below - directory will be automatically created) with: .\sigexport.exe c:\Temp\MySignalExport

If you test the above sequence and it works, let's try to get them published on the front page/in the "official" documentation.

carderne commented 5 months ago

I have added these instructions here: https://github.com/carderne/signal-export/?tab=readme-ov-file#-installation-windows

PRs improving these and adding links etc will be welcome.

cloudgreen commented 5 months ago

Great! 😊

But, what about the step "Download docker image"? Did you miss that or is that now also automatically done by "pip install signal-export"? As far as I remember, I had to download it manually...? 🤔

carderne commented 5 months ago

What do you mean by "Download docker image"? Download the sigexport Docker image? That should happen automatically when you run sigexport ...

Yolakalemowa commented 5 months ago

Hello and thanks for including windows instructions.

I think it could be simplified more tbh esp. for noob users like myself. I had to get help from the awesome community at PrivacyGuides.

For example: "1- Enable Windows WSL2 feature" (how exactly to enable it, step by step. and apply to the rest of the instructions)

thanks again for a life-saver tool friend.

cloudgreen commented 5 months ago

Hello and thanks for including windows instructions.

I think it could be simplified more tbh esp. for noob users like myself. I had to get help from the awesome community at PrivacyGuides.

For example: "1- Enable Windows WSL2 feature" (how exactly to enable it, step by step. and apply to the rest of the instructions)

thanks again for a life-saver tool friend.

I'm glad it helped! 😄

I totally agree, I am in the process of writing even better instructions! :) Unfortunately, I ran into a very annoying, unrelated Docker bug in v4.29 which slowed me down. But soon!

carderne commented 5 months ago

@cloudgreen if you want to contribute full, beginner-friendly instructions, please add them to the new stub file INSTALLATION.md.

and you can the link to that file from the main README.

dmct10 commented 5 months ago

I've spent about 10 hours trying to get this to work on Windows. No dice. If anyone has detailed, verified instructions, please send me a DM. ᐧ

On Fri, Apr 26, 2024 at 7:57 AM Chris Arderne @.***> wrote:

@cloudgreen https://github.com/cloudgreen if you want to contribute full, beginner-friendly instructions, please add them to the new stub file INSTALLATION.md https://github.com/carderne/signal-export/blob/main/INSTALLATION.md.

and you can the link to that file https://github.com/carderne/signal-export/blob/1df798588f0230bfc9a162eb61a77fd24b8c7f08/README.md?plain=1#L24 from the main README.

— Reply to this email directly, view it on GitHub https://github.com/carderne/signal-export/issues/89#issuecomment-2079558931, or unsubscribe https://github.com/notifications/unsubscribe-auth/A4KC45JH6GVVBEAIFMBTMDLY7JTMDAVCNFSM6AAAAAASG5NUPCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANZZGU2TQOJTGE . You are receiving this because you were mentioned.Message ID: @.***>

cloudgreen commented 5 months ago

What do you mean by "Download docker image"? Download the sigexport Docker image? That should happen automatically when you run sigexport ...

You're right, I forgot about that. 😛 It's obviously very convenient, but a bit counter-intuitive for my head. :)

This will be explained clearly in the upcoming Windows instructions. 👍

cloudgreen commented 5 months ago

@cloudgreen if you want to contribute full, beginner-friendly instructions, please add them to the new stub file INSTALLATION.md.

and you can the link to that file from the main README.

I have now updated the file. This is my first contribution, so I'm unsure if I've done everything correctly. Can you see my commit?