1
0
mirror of https://github.com/mikf/gallery-dl.git synced 2024-11-25 04:02:32 +01:00
gallery-dl/scripts/util.py
Mike Fährmann 96c7ccd380
update/cleanup Python dev scripts
- put common code in its own util.py file
- same Python3 shebang for all scripts
- add file docstrings
- fix format string replacement fields in man page template
2019-04-16 21:21:34 +02:00

12 lines
246 B
Python

# -*- coding: utf-8 -*-
import sys
import os.path
ROOTDIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
sys.path.insert(0, os.path.realpath(ROOTDIR))
def path(*segments, join=os.path.join):
return join(ROOTDIR, *segments)