change paths

This commit is contained in:
qwertyforce 2020-09-23 11:35:30 +03:00
parent 8f38225ef2
commit 8f5244769c
2 changed files with 5 additions and 5 deletions

View File

@ -7,11 +7,11 @@ const { COPYFILE_EXCL } = fs.constants;
const imghash: any = require('imghash');
import config from "../../config/config"
const PATH_TO_IMAGES = path.join("..", "..", "..", 'import_from_derpi', 'images')
const PATH_TO_JSONS = path.join("..", "..", "..", 'import_from_derpi', 'jsons')
const PATH_TO_IMPORTED_IMAGES = path.join("..", "..", "..", 'public', 'images')
const PATH_TO_IMAGES = path.join(config.root_path, 'import_from_derpi', 'images')
const PATH_TO_JSONS = path.join(config.root_path, 'import_from_derpi', 'jsons')
const PATH_TO_IMPORTED_IMAGES = path.join(config.root_path, 'public', 'images')
const IMAGES = fs.readdirSync(PATH_TO_IMAGES)
const JSONS = fs.readdirSync(PATH_TO_JSONS).map(json_file_name => path.parse(json_file_name).name)

View File

@ -9,7 +9,7 @@ import sharp from 'sharp'
import image_ops from './../helpers/image_ops'
const imghash: any = require('imghash');
const PATH_TO_IMAGES = path.join(process.cwd(), 'public', 'images')
const PATH_TO_WEBP = path.join(process.cwd(),'webp_images')
const PATH_TO_WEBP = path.join(process.cwd(),'public','webp_images')
async function parse_author(tags: any) {
for (const tag of tags) {
const idx = tag.indexOf("artist:")