1 Download and decrypt encrypted files uploaded by the Conversations XMPP client
 
   2 using the mechanism from XEP-0363: HTTP Upload:
 
   3 (http://xmpp.org/extensions/xep-0363.html)
 
   5 This is basically a translation in python of ImageDownlaoder:
 
   6 https://github.com/iNPUTmice/ImageDownloader
 
   8 However there are some differences:
 
   9   - The file is saved on local storage instead of being written on the
 
  10     standard output, this way xdg-open can be used to open it.
 
  11   - The wrapper script uses xdg-open, this is a more generic approach which
 
  12     works with different file types.
 
  13   - The wrapper script downloads the file to a temporary directory, this way
 
  14     it can be invoked multiple times without the risk of overwriting existing
 
  17 Some snippets were taken from python-omemo:
 
  18 https://github.com/omemo/python-omemo/blob/HEAD/src/omemo/aes_gcm_native.py
 
  22   ./conversations_http_downloader.py http://host.tld/path/to/file.jpg#theivandkey
 
  24 The open_wrapper.sh script can be used in gajim as a browser command to
 
  25 download, decrypt, and open the files automatically.
 
  27 Here are some directions to set it up:
 
  30   git clone https://git.ao2.it/conversations_http_downloader.git/
 
  31   cd conversations_http_downloader
 
  33   realpath open_wrapper.sh
 
  35 and save the printed path in the clipboard.
 
  39   - go to the menu item "Edit -> Preferences",
 
  40   - In the "Preferences" dialog choose the "Advanced" tab,
 
  41   - in the "Applications" section choose "Custom",
 
  42   - paste the path from the clipboard in the "Browser" field.
 
  44 Now encrypted files can be opened seamlessly by just clicking on them.