=== Milyutin Code Article Reposter for VK ===
Contributors: milyutinkv
Tags: vkontakte, auto-poster, ai, yandex-gpt, social-media
Requires at least: 5.0
Tested up to: 7.1
Requires PHP: 7.2
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Automatically repost your WordPress articles to VKontakte with a short summary generated by Yandex GPT or using the first paragraph.

== Description ==

**Milyutin Code Article Reposter for VK** is a powerful WordPress plugin that automatically publishes your articles to a VKontakte group.

*   **Automatic publishing** – triggers when you publish a post.
*   **Two sources for the short summary:**
    *   **Yandex GPT** – generates a concise preview using a neural network (requires API key and Folder ID).
    *   **First paragraph (excerpt)** – uses the first paragraph of the article. Free and simple.
*   **Image upload** – automatically finds and uploads the featured image, Gutenberg block image, or the first image from the content.
*   **Manual publishing** – each post editor has a "Publish now" button for manual sending.
*   **Smart logging** – all actions are logged to a separate log file, viewable in the admin area.

== Installation ==

1. Upload the plugin folder to `/wp-content/plugins/` or install via "Add New" in the WordPress admin.
2. Activate the plugin through the 'Plugins' menu in WordPress.
3. Go to **"Milyutin Code Article Reposter for VK"** in the left admin menu.
4. Fill in the fields:
    *   **Group ID:** numeric ID of your VK group (e.g., `123456789`).
    *   **Access token:** get a token via [vkhost.github.io](https://vkhost.github.io/) (choose Kate Mobile, permissions `wall, photos, groups, offline`).
5. Choose the summary source (Yandex GPT or first paragraph).
6. Click **"Save Settings"**.

== Frequently Asked Questions ==

= Do I have to pay for Yandex GPT? =

Yes, Yandex GPT is a paid service, but they offer a free trial grant. If you prefer not to pay, select the "First paragraph" mode.

= Can I publish to multiple groups? =

Not yet, but we plan to add this feature in the future.

= What if the image does not upload? =

Check that the post has a featured image or an image in the content. Also ensure your VK token has `photos` permission.

= Where can I see the plugin logs? =

There is a "Logs" submenu under the plugin menu, where all events are displayed.

== Screenshots ==

1. Plugin settings page.
2. "Publish to VK" meta box in the post editor.
3. Example of a published post in VKontakte.

== Changelog ==

= 1.0.0 =
* Initial stable release.

== Upgrade Notice ==

= 1.0.0 =
* Initial stable release. Recommended for installation.

== External services ==

This plugin uses the following external services:

1. **VKontakte API** – used for publishing posts, uploading photos, and retrieving group information.
   - Data sent: post title, content, excerpt, featured image, access token.
   - When: during automatic or manual post publication.
   - Terms of Service: https://vk.com/terms
   - Privacy Policy: https://vk.com/privacy

2. **Yandex GPT API** – used for generating article summaries (optional, only when enabled in settings).
   - Data sent: article content (first 3000 characters), API key, Folder ID.
   - When: during publication if Yandex GPT is selected as the summary source.
   - Terms of Service: https://yandex.ru/legal/cloud_termsofuse
   - Privacy Policy: https://yandex.ru/legal/confidential