rijks-uploader

Upload Public Domain files from Rijksmuseum.nl to Wikimedia Commons
git clone http://git.hanabi.in/repos/rijks-uploader.git
Log | Files | Refs | README | LICENSE

utils.js (848B)


      1 const dotenv = require("dotenv");
      2 dotenv.config();
      3 const { API_KEY, USERNAME, PASSWORD } = process.env;
      4 
      5 const path = require("path");
      6 
      7 const dataFile = path.join(__dirname, "data.csv");
      8 const errFile = path.join(__dirname, "err.txt");
      9 const statusFile = path.join(__dirname, "status.txt");
     10 
     11 const API = "https://www.rijksmuseum.nl/api/en/collection/";
     12 const params = `?format=json&key=${API_KEY}&culture=en`;
     13 
     14 const WIKI_API = "https://commons.wikimedia.org/w/api.php";
     15 
     16 const author = "[[w:Rijksmuseum|Rijksmuseum]]";
     17 const license = `{{cc-zero|Rijksmuseum}}`;
     18 const LR = `{{LicenseReview}}`;
     19 const cats = "[[Category:Media from Rijksmuseum]]\n[[Category:Uncategorized images of the Rijksmuseum]]";
     20 
     21 module.exports = {
     22   API,
     23   dataFile,
     24   errFile,
     25   params,
     26   PASSWORD,
     27   USERNAME,
     28   WIKI_API,
     29   author,
     30   license,
     31   LR,
     32   cats,
     33   statusFile
     34 };