Skip to content

Conversation

@axnow
Copy link

@axnow axnow commented Dec 4, 2015

This fix resolves problem with exporting files that were located on GDrive, as they may not have url_download defined.
It also stores dms (json and content) so the export is full.
Exported JSons are now pretty-printed, which helps debugging.

axnow added 4 commits December 4, 2015 15:06
Fixed bug causing not to store files.json if google drive file (without proper download link) appeared on file list.
…d human readable form.

Requires work on other message types and file handling.
Fixed problem with wrong css location, now css is copied to the directory created.
Fixed problem with messages having no 'text' key, now they are skipped.
@axnow
Copy link
Author

axnow commented Dec 20, 2015

Hi, back on track so about previous comments.

As for code to skip in case where no url_download is present: I have encountered following case (PDF on GDrive):

{'channels': [],
 'comments_count': 0,
 'created': 1440752344,
 'display_as_bot': False,
 'editable': False,
 'external_type': 'unknown',
 'filetype': 'pdf',
 'groups': ['XXXXXXXXX'],
 'id': 'XXXXXXXXX',
 'ims': [],
 'is_external': True,
 'is_public': False,
 'mimetype': 'application/pdf',
 'mode': 'external',
 'name': 'Getting Started on Slack.pdf',
 'permalink': 'https://XXXXX.slack.com/files/XXXXXX/XXXXXXXX/XXXXXXX.pdf',
 'pretty_type': 'PDF',
 'public_url_shared': False,
 'size': 904843,
 'timestamp': 1440752344,
 'title': 'Getting Started on Slack.pdf',
 'url': 'https://drive.google.com/file/XXXXXX?usp=drivesdk',
 'url_private': 'https://drive.google.com/file/d/XXXXX/view?usp=drivesdk',
 'user': 'XXXXXXX',
 'username': u''}

Aparrently any gdrive file will cause this kind of issue, so I decided to go for this check.

I have fixed (by ignoring ;-) ) the problem with no 'text' key. A code to handle different message types should be created (cooperation would be welcome).

I have changed location of default CSS file (now it's in main directory) and it is copied into html directory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants