Archived
1
0
Fork 0
This repository has been archived on 2024-04-26. You can view files and clone it, but cannot push or open issues or pull requests.
akari-bot/modules/interwikilist/__init__.py
2020-08-18 21:12:38 +08:00

17 lines
401 B
Python

import sys
from configparser import ConfigParser
from os.path import abspath
def iwlist():
cp = ConfigParser()
cp.read(abspath("./modules/interwikilist/list.cfg"))
section = cp.sections()[0]
return (cp.options(section))
def iwlink(iw):
cp = ConfigParser()
cp.read(abspath("./modules/interwikilist/list.cfg"))
section = cp.sections()[0]
return (cp.get(section, iw))