This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Импортируем модули fs и path для работы с файлами | |
| const fs = require('fs'); | |
| const path = require('path'); | |
| // Функция для извлечения JPEG из файла | |
| function extractJpeg(inputFilePath) { | |
| // Читаем файл в буфер | |
| const fileBuffer = fs.readFileSync(inputFilePath); | |
| // Найдём начало JPEG-сегмента (FF D8) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Конфигурация приложения | |
| const CONFIG = { | |
| VK_TOKEN: "", //TODO: Add your VK token | |
| CHAT_ID: 0, //TODO: Add your chat id | |
| API_VERSION: '5.100', | |
| BATCH_SIZE: 200, | |
| SUPPORTED_MEDIA_TYPES: ['photo', 'video', 'doc'], | |
| VIDEO_QUALITIES: ['mp4_1080', 'mp4_720', 'mp4_480', 'mp4_360', 'mp4_240', 'mp4_144'] | |
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Импорт необходимых библиотек | |
| const axios = require("axios"); | |
| const fs = require("fs"); | |
| const log4js = require("log4js"); | |
| // Конфигурационные параметры | |
| const CONFIG = { | |
| // TODO: OAuth токен для доступа к Яндекс.Диску | |
| OAUTH_TOKEN: "", | |
| // Базовый URL API Яндекс.Диска |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Импорты необходимых библиотек | |
| const fs = require('fs'); | |
| const Jimp = require("jimp"); | |
| // Функция для извлечения изображения из слоя | |
| function extractLayerImage(layer, outputPath) { | |
| // Парсим историю слоя | |
| let history = JSON.parse(layer._historyJson); | |
| // Проверяем тип исходных данных |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const fs = require("fs"); | |
| const Axios = require("axios"); | |
| // ID страницы пользователя ВКонтакте | |
| const ownerId = 10000000; // TODO: ID страницы | |
| // Количество фотографий, скачиваемых за один запрос | |
| const limit = 200; | |
| // Смещение для запроса фотографий |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const axios = require('axios'); | |
| const cheerio = require('cheerio'); | |
| const fs = require('fs'); | |
| const path = require('path'); | |
| const crypto = require('crypto'); | |
| // HTTP прокси для запросов | |
| const client = axios.create({ | |
| proxy: { | |
| host: '127.0.0.1', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| cd /usr/bin/ && wget https://github.com/Nukesor/pueue/releases/download/v3.0.0/pueue-linux-x86_64 && mv pueue-linux-x86_64 pueue | |
| cd /usr/bin/ && wget https://github.com/Nukesor/pueue/releases/download/v3.0.0/pueued-linux-x86_64 && mv pueued-linux-x86_64 pueued | |
| cd /usr/bin/ && chmod +x pueue && chmod +x pueued |