telegram-export
telegram-export copied to clipboard
config.ini location on mac
Python Version : Python 3.6.9 OS: macOS Sierra 10.12.6 16G2016 x86_64 Shell: bash 5.0.7
I could not run telegram-export directly
$telegram-export --list-dialogs
# or
$telegram-export --list-dialogs --config-file ~/.config/telegram-export/config.ini
import: unable to open X server `localhost:0.0' @ error/import.c/ImportImageCommand/360.
/Users/damo_ma/.local/bin/telegram-export: line 2: syntax error near unexpected token `"telegram_export",'
/Users/damo_ma/.local/bin/telegram-export: line 2: `runpy.run_module("telegram_export", run_name="__main__", alter_sys=True)'
If I start an Xserver it just hang without any output generated. I set DEBUG level in config.ini.
Running it as python module I found out:
python -m telegram_export --list-dialogs
No config file! Make one in /Users/$USER/Library/Application Support/telegram-export/config.ini and find an example config at https://github.com/expectocode/telegram-export/blob/master/config.ini.example.Alternatively, use --config-file FILE
/Users/$USER/Library/Application Support/
is where Apple/Mac app store stuff, but I follow XDG Base Directory and have it at ~/.config/telegram-export/config.ini
.
telegram-export is not aware of this location on mac, passing
python -m telegram_export --list-dialogs --config-file ~/.config/telegram-export/config.ini
does work.