fabianonline / telegram_backup

Java app to download all your telegram data.
GNU General Public License v3.0
448 stars 91 forks source link

Improve HTML output #15

Open fabianonline opened 7 years ago

fabianonline commented 7 years ago

The HTML output can surely be made a lot more beautiful. But I'm not that creative when it comes to design - so I'm all open for ideas. ;-)

luckydonald commented 7 years ago

The index.html maybe could include profile pictures?

luckydonald commented 7 years ago

Also regarding the chat messages, there could be some styling based on the messages entities. Here is a table I made for use with the Bot api, but I believe the messages entities exists here too.

entity html open
 html close
tg md  github notes
italic <i> </i>  _ _{italic}_ italic text
bold <b> </b>  * **{bold}** bold text
code <code> </code>  ` | `{code}` monowidth string
pre <pre> </pre>  ``` ```{pre}``` monowidth block, see code block escaping
mention <a href="http://telegram.me/{mention}"> </a>  * [@{mention}](http://telegram.me/{mention}) @username
text_mention - -  - [{text_mention}](http://telegram.me/#no_username) Only the user ID is given. Just hide the id somewhere.
hashtag - -  [#{hashtag}](#)  Not used, but avoid triggering of issue numbers.
bot_command - -  escape as code? 
url <a href="{url}">{url}</a>  [{url}]({url})  [{url}]({url})  Or just keep the text?
email <a href="mailto://{email}">{email}</a> [{email}](mailto://{email})  Or just keep the text?
text_link <a href="{link}">{text}</a>  [{text}]({link}) [{text}]({link}) for clickable text URLs

Maybe there can be some hyperlinks linking to other generated pages.

SebiderSushi commented 6 years ago

More files could be embedded. For example Video files - these could also auto-play "GIF" animations.