parse configuration.rst to build gallery-dl.conf.5 (#150)
… a man-page containing all of gallery-dl's configuration file options. This implementation relies on Python dicts preserving their insertion order. Python 3.4 and 3.5 need to use OrderedDict or they produce randomly ordered man-page sections. The man-page formatting is a bit rough around the edges, but it works for the most part. The only real "problem" are inline-links, but it's better if they are left in there.
This commit is contained in:
15
Makefile
15
Makefile
@@ -8,20 +8,16 @@ PYTHON ?= /usr/bin/env python3
|
||||
# set SYSCONFDIR to /etc if PREFIX=/usr or PREFIX=/usr/local
|
||||
SYSCONFDIR = $(shell if [ $(PREFIX) = /usr -o $(PREFIX) = /usr/local ]; then echo /etc; else echo $(PREFIX)/etc; fi)
|
||||
|
||||
all: gallery-dl.1 gallery-dl.bash_completion docs/supportedsites.rst
|
||||
all: gallery-dl.1 gallery-dl.conf.5 gallery-dl.bash_completion docs/supportedsites.rst
|
||||
|
||||
clean:
|
||||
$(RM) gallery-dl.1 gallery-dl.bash_completion
|
||||
$(RM) gallery-dl.1 gallery-dl.conf.5 gallery-dl.bash_completion
|
||||
$(RM) -r build/
|
||||
|
||||
install: gallery-dl.1 gallery-dl.bash_completion
|
||||
install: gallery-dl.1 gallery-dl.conf.5 gallery-dl.bash_completion
|
||||
$(PYTHON) setup.py install
|
||||
install -d $(DESTDIR)$(MANDIR)/man1
|
||||
install -m 644 youtube-dl.1 $(DESTDIR)$(MANDIR)/man1
|
||||
install -d $(DESTDIR)$(SYSCONFDIR)/bash_completion.d
|
||||
install -m 644 youtube-dl.bash_completion $(DESTDIR)$(SYSCONFDIR)/bash_completion.d/youtube-dl
|
||||
|
||||
release: docs/supportedsites.rst
|
||||
release: gallery-dl.1 gallery-dl.conf.5 gallery-dl.bash_completion docs/supportedsites.rst
|
||||
scripts/release.sh
|
||||
|
||||
test:
|
||||
@@ -35,5 +31,8 @@ docs/supportedsites.rst: gallery_dl/*/*.py scripts/supportedsites.py
|
||||
gallery-dl.1: gallery_dl/option.py scripts/man.py
|
||||
$(PYTHON) scripts/man.py
|
||||
|
||||
gallery-dl.conf.5: docs/configuration.rst scripts/man.py
|
||||
$(PYTHON) scripts/man.py
|
||||
|
||||
gallery-dl.bash_completion: gallery_dl/option.py scripts/bash_completion.py
|
||||
$(PYTHON) scripts/bash_completion.py
|
||||
|
||||
Reference in New Issue
Block a user