Skip to content

Instantly share code, notes, and snippets.

@thuydao
thuydao / import_from_gist.py
Created February 18, 2024 08:19 — forked from koji-kojiro/import_from_gist.py
[Python] import from Gist
#!/usr/bin/env python
# -*- coding: utf-8 -*-
def load_gist(gist_id):
"""translate Gist ID to URL"""
from json import load
from urllib import urlopen
gist_api = urlopen("https://api.github.com/gists/" + gist_id)
@thuydao
thuydao / mergegenstrings.py
Created March 1, 2021 16:09 — forked from yoichitgy/mergegenstrings.py
A script to generate .strings file for .swift, .m, .storyboard and .xib files by genstrings and ibtool commands, and merge them with existing translations.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Localize.py - Incremental localization on XCode projects
# João Moreno 2009
# http://joaomoreno.com/
# Modified by Steve Streeting 2010 http://www.stevestreeting.com
# Changes
# - Use .strings files encoded as UTF-8