init commit
This commit is contained in:
commit
1b111b1922
6
README.md
Normal file
6
README.md
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
# YourTime delivery Bot for Telegram
|
||||||
|
|
||||||
|
|
||||||
|
## Documentations available here
|
||||||
|
* [How to create a menu (en)](createmenu.en.md)
|
||||||
|
* [How to create a menu (ru)](createmenu.ru.md)
|
53
createmenu.en.md
Normal file
53
createmenu.en.md
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
# Creating an XML Menu:
|
||||||
|
|
||||||
|
1. Choose a text editor or IDE: You can use any text editor, such as Notepad++ (for Windows), Sublime Text, Visual Studio Code, or any other code editing tool.
|
||||||
|
|
||||||
|
2. Create a file with the .xml extension: Create a new file and save it with the .xml extension, for example, menu.xml.
|
||||||
|
|
||||||
|
3. Define the menu structure: Use the following structure for each <Item> element:
|
||||||
|
|
||||||
|
``` xml
|
||||||
|
|
||||||
|
<Menu Currency="Euro">
|
||||||
|
<Item>
|
||||||
|
<Category>...</Category>
|
||||||
|
<Name>...</Name>
|
||||||
|
<Description>...</Description>
|
||||||
|
<ImageSource>...</ImageSource> <!-- This is an optional field -->
|
||||||
|
<Price>...</Price>
|
||||||
|
<Translations>
|
||||||
|
<Language code="..."> <!-- For example, ru for Russian -->
|
||||||
|
<Name>...</Name>
|
||||||
|
<Description>...</Description>
|
||||||
|
<Category>...</Category>
|
||||||
|
</Language>
|
||||||
|
<!-- Other language translations -->
|
||||||
|
</Translations>
|
||||||
|
</Item>
|
||||||
|
<!-- Add other <Item> elements for other products -->
|
||||||
|
</Menu>
|
||||||
|
```
|
||||||
|
4. Fill in product information: Fill in the <Category>, <Name>, <Description>, <Price> tags for each product. <ImageSource> is optional, but you can add a link to the product's image.
|
||||||
|
|
||||||
|
## Creating a Link to an Image Hosted on Google Drive:
|
||||||
|
|
||||||
|
1. Upload the image to Google Drive: Sign in to your Google account, go to Google Drive, and upload the image.
|
||||||
|
2. Set access to the image: Set the image file on Google Drive to be accessible via a link.
|
||||||
|
3. Get the direct link to the image: Right-click on the image file on Google Drive, select "Get link." Ensure the link is set to be accessible via a link and copy this link.
|
||||||
|
4. Use the copied link: Paste the copied link into the <ImageSource> tag for the corresponding product in your XML menu.
|
||||||
|
|
||||||
|
## Description of Fields in the <Item> Element:
|
||||||
|
|
||||||
|
* <Category>: Product category. For example, "Drinks," "Food," etc. This helps organize products into groups or categories.
|
||||||
|
* <Name>: Product name. For example, "Drink 1," "Burger," "Burger 2." Used for product identification.
|
||||||
|
<Description>: Product description. Brief description or details about the product. For example, "Just example drink," "Just example food," "Just example food 2."
|
||||||
|
* <ImageSource>: Link to the product's image. This is an optional field containing a link to the product's image, which will be displayed in your application or website. You can upload images to hosting services and use links to them, such as Google Drive or other image hosting services.
|
||||||
|
* <Price>: Product price. This is a numerical value representing the product's price. For example, "1.29," "4.99," "5.99." In this case, prices are specified in euros, as indicated by the Currency="Euro" attribute in the <Menu> element.
|
||||||
|
* <Translations>: This element contains translations of product names, descriptions, and categories into different languages. Each translation to a specific language is represented by a <Language> element with a code attribute indicating the language code (e.g., "ru" for Russian). Inside each <Language>, there are tags <Name>, <Description>, <Category> representing the respective translations for that language.
|
||||||
|
|
||||||
|
## Creating a Link to an Image on Google Drive:
|
||||||
|
|
||||||
|
1. Upload the image: Upload the image to Google Drive through the web application interface or the Google Drive app on your device.
|
||||||
|
2. Access to the file: After uploading the image to Google Drive, ensure the file is available for viewing via a link. This can be configured through the file access settings.
|
||||||
|
3. Get the direct link: Right-click on the image file in Google Drive and select "Get link." Make sure you obtain a direct link to the image (it should end with .jpg, .png, or another image file extension).
|
||||||
|
4. Use the link in the XML: Insert the copied direct link into the <ImageSource> tag for the corresponding product in your XML menu to display the product's image from Google Drive.
|
51
createmenu.ru.md
Normal file
51
createmenu.ru.md
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
# Создание XML-меню:
|
||||||
|
|
||||||
|
1. Выберите текстовый редактор или IDE: Можно использовать любой текстовый редактор, такой как Notepad++ (для Windows), Sublime Text, Visual Studio Code или любой другой инструмент для редактирования кода.
|
||||||
|
2. Создайте файл с расширением .xml: Создайте новый файл и сохраните его с расширением .xml, например, menu.xml.
|
||||||
|
3. Определите структуру меню: Используйте следующую структуру для каждого элемента <Item>:
|
||||||
|
|
||||||
|
``` xml
|
||||||
|
<Menu Currency="Euro">
|
||||||
|
<Item>
|
||||||
|
<Category>...</Category>
|
||||||
|
<Name>...</Name>
|
||||||
|
<Description>...</Description>
|
||||||
|
<ImageSource>...</ImageSource> <!-- Это необязательное поле -->
|
||||||
|
<Price>...</Price>
|
||||||
|
<Translations>
|
||||||
|
<Language code="..."> <!-- Например, ru для русского -->
|
||||||
|
<Name>...</Name>
|
||||||
|
<Description>...</Description>
|
||||||
|
<Category>...</Category>
|
||||||
|
</Language>
|
||||||
|
<!-- Другие языковые переводы -->
|
||||||
|
</Translations>
|
||||||
|
</Item>
|
||||||
|
<!-- Добавьте другие элементы <Item> для других продуктов -->
|
||||||
|
</Menu>
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
4. Заполните информацию о продуктах: Заполните теги <Category>, <Name>, <Description>, <Price> для каждого продукта. <ImageSource> необязателен, но вы можете добавить ссылку на изображение продукта.
|
||||||
|
|
||||||
|
## Создание ссылки на изображение, размещенное на Google Диске:
|
||||||
|
|
||||||
|
1. Загрузите изображение на Google Диск: Войдите в свой аккаунт Google, перейдите на Google Диск и загрузите изображение.
|
||||||
|
2. Настройте доступ к изображению: Установите файлу изображения на Google Диске доступ для просмотра по ссылке.
|
||||||
|
3. Получите прямую ссылку на изображение: Правой кнопкой мыши кликните на файле изображения на Google Диске, выберите "Получить ссылку". Убедитесь, что ссылка открыта для доступа по ссылке и скопируйте эту ссылку.
|
||||||
|
4. Используйте скопированную ссылку: Вставьте скопированную ссылку в тег <ImageSource> для соответствующего продукта в вашем XML-меню.
|
||||||
|
|
||||||
|
## Описание полей в элементе <Item>:
|
||||||
|
|
||||||
|
* <Category>: Категория продукта. Например, "Drinks", "Food" и т. д. Это помогает организовать продукты по группам или категориям.
|
||||||
|
* <Name>: Название продукта. Например, "Drink 1", "Burger", "Burger 2". Используется для идентификации продукта.
|
||||||
|
* <Description>: Описание продукта. Краткое описание или детали о продукте. Например, "Just example drink", "Just example food", "Just example food 2".
|
||||||
|
* <ImageSource>: Ссылка на изображение продукта. Это необязательное поле. Оно содержит ссылку на изображение продукта, которое будет отображаться в вашем приложении или веб-сайте. Вы можете загружать изображения на хостинг и использовать ссылки на них, например, Google Диск или другие сервисы хостинга изображений.
|
||||||
|
* <Price>: Цена продукта. Это числовое значение, представляющее цену продукта. Например, "1.29", "4.99", "5.99". В данном случае, цены указаны в евро, так как установлен атрибут Currency="Euro" у элемента <Menu>.
|
||||||
|
* <Translations>: Этот элемент содержит переводы названий, описаний и категорий продуктов на различные языки. Каждый перевод на определенный язык представлен элементом <Language> с атрибутом code, указывающим код языка (например, "ru" для русского). Внутри каждого <Language> есть теги <Name>, <Description>, <Category>, представляющие соответствующие переводы для данного языка.
|
||||||
|
|
||||||
|
## Создание ссылки на изображение на Google Диске:
|
||||||
|
1. Загрузка изображения: Загрузите изображение на Google Диск через интерфейс веб-приложения или приложения Google Диска на вашем устройстве.
|
||||||
|
2. Доступ к файлу: После загрузки изображения на Google Диск, убедитесь, что файл доступен для просмотра по ссылке. Это можно настроить через параметры доступа к файлу.
|
||||||
|
3. Получение прямой ссылки: Правой кнопкой мыши кликните на файле изображения в Google Диске и выберите "Получить ссылку". Убедитесь, что вы получили прямую ссылку на изображение (она должна заканчиваться на .jpg, .png, или другое расширение файла изображения).
|
||||||
|
4. Использование ссылки в XML: Вставьте скопированную прямую ссылку в тег <ImageSource> соответствующего продукта в вашем XML-меню, чтобы отображать изображение продукта из Google Диска.
|
Loading…
x
Reference in New Issue
Block a user