Skip to content

Instantly share code, notes, and snippets.

View Facenapalm's full-sized avatar

Anton Facenapalm

  • MSU
  • Moscow, Russia
View GitHub Profile
# Copyright (c) 2023 Facenapalm
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
@Facenapalm
Facenapalm / liquipedia_grabber.py
Last active April 6, 2023 03:41
Working prototype of Liquipedia grabber for Wikidata, sample created item: https://www.wikidata.org/wiki/Q117440245
import re
import time
import requests
import os.path
from datetime import datetime
class LiquipediaLink:
available_projects = {
'ageofempires', 'apexlegends', 'arenafps', 'arenaofvalor', 'artifact',
@Facenapalm
Facenapalm / nfcc_checker.py
Created March 13, 2023 21:47
Russian Wikipedia's Non-free content criteria (Критерии добросовестного использования, КДИ) violations finder
import re
import json
import requests
def normalize(name):
name = name.replace('_', ' ').strip()
name = re.sub(r"\s+", " ", name)
name = name[0].upper() + name[1:]
return name
@Facenapalm
Facenapalm / outside_context_save_scanner.py
Last active August 1, 2022 03:14
Stellaris save scanner that seeks for conditions for "Outside Context" achievement. Written for Cepheus v3.4.5
# Copyright (c) 2022 Facenapalm
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
@Facenapalm
Facenapalm / riotpixels_seek_id.py
Created July 29, 2022 21:21
Wikidata bot that connects Wikidata items with RiotPixels database based on matching link to Steam store
# Copyright (c) 2022 Facenapalm
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
@Facenapalm
Facenapalm / hltb_seek_id.py
Last active July 21, 2022 21:15
Wikidata bot that connects Wikidata items with HowLongToBeat database based on matching link to Steam store
# Copyright (c) 2022 Facenapalm
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
@Facenapalm
Facenapalm / mailru_seek_id.py
Last active July 10, 2022 20:25
Wikidata bot that connects Wikidata items with [email protected] database based on matching link to Steam store
# Copyright (c) 2022 Facenapalm
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
@Facenapalm
Facenapalm / mss_extract_platform.py
Created July 8, 2022 20:01
Wikidata bot that adds platform (P400) qualifier to Microsoft Store ID (P5885) claims
# Copyright (c) 2022 Facenapalm
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
@Facenapalm
Facenapalm / lutris_seek_id.py
Last active July 10, 2022 21:07
Wikidata bot that connects Wikidata items with Lutris database and fills external IDs based on Lutris
# Copyright (c) 2022 Facenapalm
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
@Facenapalm
Facenapalm / rawg_seek_id.py
Last active July 10, 2022 21:06
Wikidata bot that connects Wikidata items with RAWG database and fills external IDs based on RAWG
# Copyright (c) 2022 Facenapalm
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all