shady2k / logseq-inbox-telegram-plugin

MIT License
78 stars 5 forks source link

feature request: placeholders #15

Open L0cutus opened 2 years ago

L0cutus commented 2 years ago

Hello,

what about to add some placeholders into telegram text for eg:

"%Today% @ %timestamp% something happens" -> "[[2022/02/09]] @ 17:10 something happens" "%Tomorrow% i had to make something" -> "[[2022/02/10]] i had to make something" "%Every Monday for 3 weeks% pay 12$ to #Nicola" Etc...

Thanks!

shady2k commented 2 years ago

I'm not sure that this feauture need to be in this plugin. Maybe it may be done with logseq date nlp plugin https://github.com/hkgnp/logseq-datenlp-plugin? @hkgnp, what do you think?

benjypng commented 2 years ago

Hi,

I think what @L0cutus means is to have them programatically inserted into Logseq, e.g. after sending the message from Telegram, and before going into Logseq, without further action from the user.

With the datenlp plugin, the user is required to "leave" the block, e.g. enter in order to trigger the callback to change the block.

shady2k commented 2 years ago

@L0cutus, could you describe your use case of this feature?

L0cutus commented 2 years ago

Hi,

I think what @L0cutus means is to have them programatically inserted into Logseq, e.g. after sending the message from Telegram, and before going into Logseq, without further action from the user.

With the datenlp plugin, the user is required to "leave" the block, e.g. enter in order to trigger the callback to change the block.

Exactly what i mean thanks! It is the Telegram plugin that have to 'convert' the placeholders to real date/hour etc...

L0cutus commented 2 years ago

@L0cutus, could you describe your use case of this feature?

Since i use telegram heavly and synking logseq pc-home pc-work isn't so easy at least for now, i'm using telegram plugin to capture most of my ideas and send them via telegram to ALL my logseq devices, easy and symple :-) ) And i think that placeholders are simple to use instead to remember date, day, time etc...

shady2k commented 2 years ago

@L0cutus, sorry but I'm can't get this. For example, I write in my Telegram text: "%Today% @ %timestamp% something happens" It goes to Logseq as: "[[2022/02/09]] @ 17:10 something happens" Why don't you directly write to Telegram something as: "[[Feb 14th, 2022]] @ 16:30 something happens"?

L0cutus commented 2 years ago

@L0cutus, sorry but I'm can't get this. For example, I write in my Telegram text: "%Today% @ %timestamp% something happens" It goes to Logseq as: "[[2022/02/09]] @ 17:10 something happens" Why don't you directly write to Telegram something as: "[[Feb 14th, 2022]] @ 16:30 something happens"?

Why on logseq there are 'macro' like /today, /tomorrow etc ? :)

shady2k commented 2 years ago

Ok, thanks.

acsr commented 1 year ago

I understand and share the usecase and would like to share my workaround workflow for this challenge on an iPhone or iPad.

We use the PyKeys keyboard of the Pythonista3 app (commercial, 10 Euros worth) for such purposes, since the default timestamp of the Telegram Inbox Plugin does not fit our needs.

In Telegram you just switch to PyKeys as additional keyboard like changing the language. The you can choose from modules that work with with your input and selection using Python code in very powerful ways Pythonista even works in conjunction with the Apple shortcuts app and sharing options.

You can customize the Placeholders.py scripts working with the input directly in Python code on the device and use even Jinja2 templating in your preset processor. Use Examples/Keyboard/Placeholders.py and InsertDate.py as starting points. The tool is a great piece of software if you are willing to use Python. I would agree that it will be also cool and cleaner to have it in Logseq itself and / or the Telegram Inbox Plugin.

With that said a Logseq specific keyboard helper on the sender device is more cumbersome to configure if you feed from multiple devices but if you have one sender to work with multiple bots on different targets (groups other apps) this way is smarter, but not working in Logseq directly.