be371bc36fb173447865324003bc550f630cbbc2
Makefile
... | ... | @@ -26,8 +26,9 @@ help: |
26 | 26 | echo grep -vl "$(DIRECTIVES)" $(NON_NETWORK_PAGES) |
27 | 27 | |
28 | 28 | %.md: %.raw FORCE |
29 | - sed -e "s%$(@D)\.%%g" $< \ |
|
29 | + cat $< \ |
|
30 | 30 | | sed -f convert.sed \ |
31 | + | sed -e "s%/$(@D)/%%g" \ |
|
31 | 32 | > $@ |
32 | 33 | |
33 | 34 | %.raw: |
... | ... | @@ -35,10 +36,3 @@ help: |
35 | 36 | curl "$(WIKI)?n=$(subst /,.,$(basename $@))&action=markdown" -o $@ |
36 | 37 | |
37 | 38 | all: $(MD_GROUPED_PAGES) |
38 | - |
|
39 | -fix-group-links: |
|
40 | - for g in $(GROUPS); \ |
|
41 | - do \ |
|
42 | - sed -i -e "s%$$g\.%%g" $$g/*.md ;\ |
|
43 | - done |
|
44 | - |
convert.sed
... | ... | @@ -16,4 +16,7 @@ |
16 | 16 | / #toc/d |
17 | 17 | s/^\(#\+\)\s\+[0-9.]\+\s\+/\1 / |
18 | 18 | /?action=edit/d |
19 | -s%http://markferry.net/pmwiki/pmwiki.php?n=%% |
|
19 | +# group . to slash in links |
|
20 | +/markferry.net\/pmwiki\/pmwiki/ s%n=\(.*\)\.\(.*\)%n=\1/\2%g |
|
21 | +# strip pmwiki part |
|
22 | +/markferry.net\/pmwiki\/pmwiki/ s%http://markferry.net/pmwiki/pmwiki.php?n=%/% |