M
M
mt. NATS2020-06-23 01:14:42
Windows
mt. NATS, 2020-06-23 01:14:42

How to make a context menu for a site from under windows for reposts?

Can you please tell me if it is possible to implement a context menu (right click)?
I would like to organize a selection (for myself)?

The thought is, I saw an interesting article on the net, right there I’m waiting for the right click,
And by analogy with “share”, I repost content from any resources to my site,
The site is spinning on wordpress ... How to add to the menu, I have an idea ,
I still do not understand what and how to transfer !?

Here are my thoughts on this so far:

1. Прикручиваю бота телеграм, там делаю ф-цию, и посылаю ссылки боту, через него
2. Делаю под винду парсер файла избранного в браузере, и добавляю в избранное, а бот раз в N минут заходит, и проверяет файл на наличие изменений.

Что не нравится в этих вариантах:
1. чет как-то костыль или нет?
2. я могу же и удалить что-то из избранного, получается надо морочить проверки, неохота ))

Вообще очень интересна тема ИИ, хотелось бы на данном примере попрактиковаться и сделать что-то типа авто назначение: тегов, категорий, создания превьюшек и другое... Тогда получается все равно теже проверки и иже с ними...

Кто что думает по этому поводу, как бы вы реализовали?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
Orkhan Hasanli, 2020-06-23
@Dimastik86

The task, of course, is not trivial, perhaps ...
By the way, an ordinary pocket is enough for me to save articles in an online service (without cross-posting to my site)
I provide solutions (it is possible that there are some other more elegant solutions to this issue):
1 ) The implementation of this all in the browser. JS - javascript
Write a browser extension that saves the text you select and then uploads the article to your site via the Wordpress REST API after saving. Accordingly, the line "Save article" will need to be added to the context menu of the browser, or simply display the extension icon on click, on which to save the entry.
You can even make your life a little easier - take the Pocket extension. Install it in your browser. Next, another browser extension (written by you) periodically checks for new articles in Pocket using the Pocket Developer API and, if available, takes the article. and through the same REST API WP uploads the article to the site.
https://getpocket.com/developer/
I have not been involved in the development of browser extensions, so I will not tell you the details.
2) PL - Java or any other that you own (for example, python).
I'll use java as an example. Create a system process (service) (a la systemd service for Linux), add an article save function to the context menu.
Then, by pressing this button, save the article in some local file database (for example, sqlite). Further, the system service periodically checks this database and, if there are updates in the table since the last check (timestamp check), picks up articles and uploads articles to the site through the WP REST API.
There is a good library for working with the WP REST API in Java:
https://github.com/Afrozaar/wp-api-v2-client-java
As for adding tags, categories, etc., it can be implemented using the same Java. I can’t tell you exactly ... for example, take an article and divide it into shingles (I’m not sure about the terminology) and, if it matches, assign this or that category to the article.
And here. I didn’t see the point of connecting a telegram bot, to be honest. But also a solution.
As for the neural network, using the same java || python is well implemented this whole thing. I won’t tell you the details either, I didn’t do it

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question