Skip to content

danmichaelo/croptool

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CropTool

CropTool is a tool for cropping image files at Wikimedia Commons and other Wikimedia sites using the MediaWiki API with OAuth.

Features:

Setting up a development environment

  1. Request an OAuth 1.0 consumer at https://meta.wikimedia.org/wiki/Special:OAuthConsumerRegistration/propose with
  1. Copy config.dev.ini to config.ini and add the consumer token and secret token to config.ini and check the default paths for the dependencies.

  2. Install dependencies using Composer and NPM:

docker compose run phpfpm composer install
npm install
  1. Build the frontend:
npx gulp build
  1. Generate secret for encrypted cookies:
docker compose run phpfpm php generate-key.php
  1. Start the development server on https://localhost:7878/
docker-compose up

Note that you should be able to login and preview cropping without waiting for the OAuth consumer to be accepted.

Deployment notes

  • ssh tools-login.wmflabs.org
  • become croptool
  • git pull
  • toolforge build start https://github.com/danmichaelo/croptool.git
  • toolforge webservice --backend=kubernetes --mount=all buildservice restart

First-time setup:

  • Copy config.prod.ini into the home directory, and add OAuth information
  • Creates a public_files directory in the home directory and set it to be readable and writable by others

About

Tool for cropping images at Wikimedia Commons and other Wikimedia wikis

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published