Skip to content

Instantly share code, notes, and snippets.

View ilimugur's full-sized avatar

Ilim Ugur ilimugur

  • Taleworlds Entertainment
  • Ankara, Turkey
View GitHub Profile
@ilimugur
ilimugur / migrateFacebookNotesDataToCSV.py
Created December 5, 2020 10:13
Short&crude script to help migrate Facebook Notes (sunsetting) to Wordpress. Download the data for your page/profile from Facebook, find the notes.json included, update the parameters in the script (hint: search for TODO) and run it. Then, just import the CSV output to your Wordpress website/blog. (Disclaimer: Does NOT handle styling or cover ph…
import csv
from datetime import datetime
import json
def processInput(filePath):
with open(filePath, 'r') as f:
deserializedJSON = json.load(f)
notesData = deserializedJSON['notes']
return notesData
@ilimugur
ilimugur / getContent.py
Last active May 10, 2016 22:52
A script to help grab text-based content from any site where content is given as a list. It can be used to grab a list of links as well as a list of text-based content. Created originally to grab the paginated and list-based text content in URL http://www.zaytung.com/sondakika.asp, which is a Turkish parody news site similar to Onion News Network.
import urllib2
from BeautifulSoup import BeautifulSoup, NavigableString
import re
def getDomainURL(url):
slashToLookFor = 1
if url.find("http://") > -1 or url.find("https://") > -1:
slashToLookFor = 3
endIndex = 0
for i in range(0, slashToLookFor):
@ilimugur
ilimugur / testFutoshiki.py
Created May 6, 2015 06:05
Futoshiki Solver Tester
import sys
import urllib2
import xml.etree.ElementTree as etree
import subprocess
def parseBoard(boardData, size):
board = []
rowLength = 2 * size - 1