Skip to content

Instantly share code, notes, and snippets.

View Hydriz's full-sized avatar
🎯
Focusing

Hydriz Scholz Hydriz

🎯
Focusing
View GitHub Profile
@Hydriz
Hydriz / README.md
Created April 22, 2017 03:22
Bot for removing interlanguage links on Wiktionaries

Removeiw bot

This bot is for removing interlanguage links on pages and was created due to the deployment of the Cognate extension to Wiktionaries (see T150182 on Wikimedia's Phabricator).

To install, download the "setup.sh" and "removeiw.py" files to your local directory and edit the PYWIKIPEDIA variable to point to your pywikibot installation.

To run, use the following command in your pywikibot installation:

python pwb.py removeiw -always -family:wiktionary -lang:xxx -start:!

@Hydriz
Hydriz / docs.py
Last active December 16, 2015 18:09
Script to build Sphinx documentation and push to relevant gh-pages branch.
#!/usr/bin/python
import os
repourl = "git@github.com:dumps/docs.git"
def worker():
# Step 1: Clone the repository
# os.chdir("/mnt") # Use a temporary working directory
os.system("git clone %s dumps-docs" % (repourl))
# Step 2: Build the documentation
@Hydriz
Hydriz / worker.py
Created February 11, 2013 15:16
A script to archive the static HTML dumps that Wikimedia generated years back. Run using python worker.py and at own risk.
#!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright (C) 2012 Hydriz
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
@Hydriz
Hydriz / host_stats.php
Last active March 6, 2017 06:50
A script to output some server statistics to visitors
<?php
/**
*
* host_stats.php
*
* Based on the Internet Archive's host_stats.php
* Outputs information about the server hosting
* this file.
*
* Requires Apache web server with PHP.
@Hydriz
Hydriz / new.dblist
Last active December 12, 2015 07:58
New wikis created recently
-- none --
@Hydriz
Hydriz / multipart.py
Last active April 27, 2020 09:38
Multipart uploading using Python boto.
#!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright (C) 2012-2015 Hydriz Scholz
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,