Skip to content

Commit

Permalink
Merge pull request #133 from soberhacker/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
soberhacker authored Jun 26, 2023
2 parents 5bd1ec0 + fbce229 commit 1e126ac
Show file tree
Hide file tree
Showing 23 changed files with 1,769 additions and 722 deletions.
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,24 @@
# Changelog


## [1.7.0](https://github.com/soberhacker/obsidian-telegram-sync/compare/1.6.1...1.7.0) (2023-06-26)


### Features

* add chat and topic template variables ([60437c9](https://github.com/soberhacker/obsidian-telegram-sync/commit/60437c94817c47b6569580c145bacbec3f8d4fa5))
* add support of downloading files > 20 MB ([57ec22f](https://github.com/soberhacker/obsidian-telegram-sync/commit/57ec22fd1690c52684fc5ff279057f1b8fea4768))
* add transcribing voice messages to text ([8405f6d](https://github.com/soberhacker/obsidian-telegram-sync/commit/8405f6d3f478aeb1be0cd2f9b8f38d2719958039))


### Bug Fixes

* caption handling after handling files error ([d0ed63b](https://github.com/soberhacker/obsidian-telegram-sync/commit/d0ed63bef37650763f09fefe23d2a3d2f187492f))
* false attempt to create a directory structure ([f2a23ad](https://github.com/soberhacker/obsidian-telegram-sync/commit/f2a23adf613d6c37fa31949104c68738be3fcc37))
* ignoring Obsidian File & Link settings ([531c70f](https://github.com/soberhacker/obsidian-telegram-sync/commit/531c70fcd52621d8104c7f2b8f367bbd825bb932))
* inconsistent file names and extensions ([190f560](https://github.com/soberhacker/obsidian-telegram-sync/commit/190f560e434546df45741a83486ecf85c33706ea))
* two bots instances conflict ([19f6bed](https://github.com/soberhacker/obsidian-telegram-sync/commit/19f6bedb5f1d966bc2f190d49fbd88ebeff193e4))

## [1.6.1](https://github.com/soberhacker/obsidian-telegram-sync/compare/1.6.0...1.6.1) (2023-06-09)


Expand Down
96 changes: 60 additions & 36 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,59 +1,83 @@
# Obsidian Telegram Sync Plugin
# Telegram Sync for Obsidian
<a href="https://github.com/soberhacker/obsidian-telegram-sync/releases/latest">
<img src="https://img.shields.io/github/v/release/soberhacker/obsidian-telegram-sync?display_name=tag">
</a> <a href="https://github.com/soberhacker/obsidian-telegram-sync/releases/latest">
<img src="https://img.shields.io/github/release-date/soberhacker/obsidian-telegram-sync">
</a> <a href="https://github.com/soberhacker/obsidian-telegram-sync">
<img src="https://img.shields.io/github/downloads/soberhacker/obsidian-telegram-sync/total">
</a> <a href="https://github.com/soberhacker/obsidian-telegram-sync">
<img src="https://img.shields.io/tokei/lines/github/soberhacker/obsidian-telegram-sync">
</a><br><br>

This Obsidian plugin allows you to transfer messages and files from a Telegram bot to your Obsidian vault. You can easily save text, images, and other files from your Telegram conversations to Obsidian for further processing and organization.
Transfer messages and files from Telegram to your Obsidian vault. You can easily save text, voice transcripts, images and other files from your Telegram chats to Obsidian for further processing and organization.

![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/soberhacker/obsidian-telegram-sync/release.yml?style=shield) ![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/soberhacker/obsidian-telegram-sync?display_name=tag)
⁉️ [Ask a question in Telegram](https://t.me/ObsidianTelegramSync)<br>
🐛 [Report issue](https://github.com/soberhacker/obsidian-telegram-sync/issues)

---

## Features

- Synchronize text messages and files from a Telegram bot to Obsidian
- Synchronize text messages and files
- Save messages as individual notes or append to an existing note
- Transcipt voices and video notes (for Telegram Premium subscibers only)
- Use customizable templates for new notes
- Set folders for new notes and files
- Automatically format text messages with markdown
- Delete processed messages from Telegram (optional)
- Delete processed messages from Telegram

## ~~Installation~~ (on test by Obsidian team)
## Installation

~~1. Open Obsidian and navigate to the Settings.~~
~~2. Click on the Third-party plugins tab.~~
~~3. Click the Browse button to open the Community Plugins window.~~
~~4. Search for Telegram Sync* in the search bar.~~
~~5. Click the Install button, then enable the plugin by toggling the switch.~~
1. Open Obsidian and navigate to Settings > Third-party plugin
2. Make sure Safe mode is off
3. Click the Browse button to open the Community plugins window
4. Search for **Telegram Sync** in the search bar
5. Click the Install button, then enable the plugin by toggling the switch

## Manuall Installation

1. This plugin is only for Desktop (Linux, MacOS, Windows).
2. Download main.js, styles.css, manifest.json from the [release page](https://github.com/soberhacker/obsidian-telegram-sync/releases).
3. Copy the downloaded files to YourVaultFolder?/.obsidian/plugins/telegram-sync/.
4. Restart Obsidian and enable Telegram Sync in **Community plugins**.
1. Download main.js, styles.css, manifest.json from the [latest release](https://github.com/soberhacker/obsidian-telegram-sync/releases//latest)
2. Copy the downloaded files to <pathToYourVault>/.obsidian/plugins/telegram-sync/
3. Restart Obsidian and enable **Telegram Sync** in the Community plugins tab

## Usage

1. Create a new bot on Telegram by talking to the [@botFather](https://t.me/botfather).
2. Copy the bot token provided by the [@botFather](https://t.me/botfather).
3. Open the Obsidian settings and navigate to the Telegram Sync settings tab.
4. Paste your bot token in the **Bot Token** field.
5. Configure the remaining settings according to your preferences.
6. Start sending messages and files to your Telegram bot.
7. When the Obsidian app is running on your lapton or PC, it syncs all your messages.
1. Create a new bot on Telegram by talking to the [@botFather](https://t.me/botfather)
2. Copy the bot token provided by the @botFather
3. Open the Obsidian settings and navigate to the **Telegram Sync** settings tab
4. Paste your bot token to **Bot > Connect > Bot Token** field
5. Configure the remaining settings according to your preferences
6. Start sending messages and files to your Telegram bot
7. When the Obsidian app is running on your lapton or PC, it syncs all your messages
8. You can optionally add your bot to any chats that you want to sync (the bot needs admin rights)

## Tips

1. For syncing your notes between different devices should use Obsidian Sync, Syncthing, ICloud, Google Drive etc.
2. If you use Obsidian only on your cellphone, use "share" to transfer data between mobile applications.

## Support

If you have any issues or feature requests, please open an issue on the [GitHub](https://github.com/soberhacker/obsidian-telegram-sync).

If you like this plugin and are considering donating to support continued development, use the buttons below!

[![Crypto Ð⟠na₮i⟠n](https://img.buymeacoffee.com/button-api/?text=Crypto%20Donation&emoji=🚀&slug=soberhacker&button_colour=5b5757&font_colour=ffffff&font_family=Lato&outline_colour=ffffff&coffee_colour=FFDD00)](https://oxapay.com/donate/5855474)

[![Buy me a book](https://img.buymeacoffee.com/button-api/?text=Buy%20me%20a%20book&emoji=📖&slug=soberhacker&button_colour=FFDD00&font_colour=000000&font_family=Cookie&outline_colour=000000&coffee_colour=ffffff)](https://www.buymeacoffee.com/soberhacker)

[![Ko-fi Donation](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/soberhacker)

[![PayPal](https://www.paypalobjects.com/webstatic/en_US/i/buttons/PP_logo_h_100x26.png)](https://www.paypal.com/donate/?hosted_button_id=VYSCUZX8MYGCU)

## Patrons & Supporters

I want to say thank you to the people who support me, I really appreciate it!

- maauso
- ekalinin
- knopki
- Fabio Scarsi
- anonymous patrons and contributors

---

<div align="center">
If you like this plugin and are considering donating to support continued development, use the buttons below!<br>
<a href="https://oxapay.com/donate/5855474">
<img src="https://img.buymeacoffee.com/button-api/?text=Crypto%20Donation&emoji=🚀&slug=soberhacker&button_colour=5b5757&font_colour=ffffff&font_family=Lato&outline_colour=ffffff&coffee_colour=FFDD00" width=210 height=71>
</a>&nbsp;<a href="https://www.buymeacoffee.com/soberhacker">
<img src="https://img.buymeacoffee.com/button-api/?text=Buy%20me%20a%20book&emoji=📖&slug=soberhacker&button_colour=FFDD00&font_colour=000000&font_family=Cookie&outline_colour=000000&coffee_colour=ffffff" width=190 height=71>
</a><br>
<a href="https://ko-fi.com/soberhacker">
<img src="https://storage.ko-fi.com/cdn/brandasset/logo_white_stroke.png?" width=140 height=40>
</a>&nbsp;<a href="https://www.paypal.com/donate/?hosted_button_id=VYSCUZX8MYGCU">
<img src="https://www.paypalobjects.com/digitalassets/c/website/logo/full-text/pp_fc_hl.svg" width=140 height=40>
</a>
</div>
8 changes: 8 additions & 0 deletions docs/Authorized User Features.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#### Authorized User Features

✅ voice and video notes transcription using template variable {{voiceTranscript}} (only for Telegram Premium subscribers)
❌ reacting with "👍" instead of replying for marking messages as processed (not implemented)
❌ getting messages older then 24 hours if obsidian wasn't running (not implemented)
❌ deleting messages older then 48 hours (not implemented)
❌ delete messages that were forwarded to the same place where they were and marking original messages as processed (not implemented)
❌ automatically identifying renamed topic without using command /topicName (not implemented)
137 changes: 137 additions & 0 deletions docs/Message Objects Examples.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,137 @@
###### example 1
```json
{
"message_id": 802,
"from": {
"id": 1110636370,
"is_bot": false,
"first_name": "soberHacker",
"username": "soberhacker",
"language_code": "en"
},
"chat": {
"id": 1110636370,
"first_name": "soberHacker",
"username": "soberhacker",
"type": "private"
},
"date": 1686431489,
"reply_to_message": {
"message_id": 676,
"from": {
"id": 1110636370,
"is_bot": false,
"first_name": "soberHacker",
"username": "soberhacker",
"language_code": "en"
},
"chat": {
"id": 1110636370,
"first_name": "soberHacker",
"username": "soberhacker",
"type": "private"
},
"date": 1686087817,
"forward_from": {
"id": 1189295682,
"is_bot": false,
"first_name": "Sober",
"last_name": "Hacker",
"username": "soberHacker"
},
"forward_date": 1684404891,
"text": "All is good?"
},
"text": "Yes, I'm ok!"
}
```
###### example 2 (topic message)
```json
{
"message_id": 9,
"from": {
"id": 1110636370,
"is_bot": false,
"first_name": "soberHacker",
"username": "soberhacker",
"language_code": "en"
},
"chat": {
"id": -1001110672472,
"title": "My Notes",
"is_forum": true,
"type": "supergroup"
},
"date": 1686514218,
"message_thread_id": 3,
"reply_to_message": {
"message_id": 3,
"from": {
"id": 1110636370,
"is_bot": false,
"first_name": "soberHacker",
"username": "soberhacker",
"language_code": "en"
},
"chat": {
"id": -1001110672472,
"title": "My Notes",
"is_forum": true,
"type": "supergroup"
},
"date": 1684966126,
"message_thread_id": 3,
"forum_topic_created": {
"name": "Topic name",
"icon_color": 13338331,
"icon_custom_emoji_id": "5312241539987020022"
},
"is_topic_message": true
},
"text": "Text texttt txet",
"is_topic_message": true
}
```
###### example 3 (topic message without topic name)
```json
{
"message_id": 12,
"from": {
"id": 1110636370,
"is_bot": false,
"first_name": "soberHacker",
"username": "soberhacker",
"language_code": "en"
},
"chat": {
"id": -1001110672472,
"title": "My Notes",
"is_forum": true,
"type": "supergroup"
},
"date": 1686514910,
"message_thread_id": 3,
"reply_to_message": {
"message_id": 6,
"from": {
"id": 1110636370,
"is_bot": false,
"first_name": "soberHacker",
"username": "soberhacker",
"language_code": "en"
},
"chat": {
"id": -1001110672472,
"title": "My Notes",
"is_forum": true,
"type": "supergroup"
},
"date": 1686514023,
"message_thread_id": 3,
"text": "This is message",
"is_topic_message": true
},
"text": "No, I'm message",
"is_topic_message": true
}
```
Loading

0 comments on commit 1e126ac

Please sign in to comment.