carderne / signal-export

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

Question of a newbie about environment variables #47

Closed hoeks029 closed 2 years ago

hoeks029 commented 2 years ago

I am very new at this and wonder how/where to "Then set your input and output locations as environment variables."? I have installed Docker and the Dockerfile and can run Docker in the command prompt. Help appreciated!

carderne commented 2 years ago

It means run the lines under that text in a command line.

Assuming you’re on Windows, run the following in command prompt, hitting enter between each line.

SIGNAL_INPUT="~/AppData/Roaming/Signal"

SIGNAL_OUTPUT="~/Documents/output"

And then run the docker run … command from the main README.

hoeks029 commented 2 years ago

Thanks for your reply! In my command prompt this leads to this error message: 'SIGNAL_INPUT' is not recognized as an internal or external command, operable program or batch file. Obviously I am making some (silly) mistake.

carderne commented 2 years ago

Sorry, I don’t use Windows…

Forget about the environment variables and try running this (should output to your Downloads folder):

docker run --rm -it --name signal-export -v %USERPROFILE%/AppData/Roaming/Signal:/Signal -v %USERPROFILE%/Downloads/SignalExport:/output carderne/signal-export:latest
hoeks029 commented 2 years ago

Thank you so much, it worked! (In replies the original message is not shown, but everything else is really perfect, including pictures, audio and emoji!) You really helped me out here.

carderne commented 2 years ago

@hoeks029 add —quote to the end of the long command I provided above to get quoted messages.

hoeks029 commented 2 years ago

Thanks for the reply! Unfortunately this leads to an unexpected ending (see below), but this is probably not something you can fix?

Traceback (most recent call last): File "/usr/local/bin/sigexport", line 8, in sys.exit(cli()) File "/usr/local/lib/python3.9/site-packages/sigexport/main.py", line 647, in cli run(main) File "/usr/local/lib/python3.9/site-packages/typer/main.py", line 864, in run app() File "/usr/local/lib/python3.9/site-packages/typer/main.py", line 214, in call return get_command(self)(*args, kwargs) File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1128, in call return self.main(args, kwargs) File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1053, in main rv = self.invoke(ctx) File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1395, in invoke return ctx.invoke(self.callback, ctx.params) File "/usr/local/lib/python3.9/site-packages/click/core.py", line 754, in invoke return __callback(args, kwargs) File "/usr/local/lib/python3.9/site-packages/typer/main.py", line 500, in wrapper return callback(**use_params) # type: ignore File "/usr/local/lib/python3.9/site-packages/sigexport/main.py", line 634, in main make_simple(dest, convos, contacts, quote) File "/usr/local/lib/python3.9/site-packages/sigexport/main.py", line 201, in make_simple quote += msg["quote"]["text"] TypeError: can only concatenate str (not "NoneType") to str

carderne commented 2 years ago

Hi @hoeks029, sorry for the delay, work/travel. This should be fixed now. I haven't worked with the quote code much so it's probably still a bit shaky...

carderne commented 2 years ago

Please open a new issue if you have more problems with this!