renamed file to match the functionality better
[kuro5hin_to_wordpress] / README
1 This program will parse raw HTML pages of Kuro5hin diaries and post
2 them to a Wordpress blog using in the Wordpress XMLRPC API.
3
4 Requirements
5 =============
6
7 To use the program you will need the following software:
8
9 * Python 3
10 * The python-wordpress-xmlrpc package:
11   https://pypi.python.org/pypi/python-wordpress-xmlrpc
12
13 Of course, you will also need the Kuro5hin diary entries you want to
14 import. I grabbed mine from "What's Left of K5, AKA Mumble's Archive"
15 described here:
16
17 https://kr5ddit.com/post/754
18
19 Using the Program
20 ===================
21
22 This is how I used the data:
23
24 1.
25
26 I downloaded and unzipped this file:
27
28 http://k5.semantic-db.org/diary-slurp/161942--archive-diaries--html-diaries--nested-format.zip
29
30 2.
31
32 My username is "makohill" so searched through and copied diary entries from the location of the unzipped entries with a command like this one:
33
34 grep -l -r 'HREF="/user/makohill">makohill</A>' LOCATION_OF_ENTRIES|xargs -i cp {} .
35
36 3.
37
38 Once I did that, I modified and imported the data with a command like:
39
40 ./diary_parser.py 2002-12-26-9150-8083.html
41
42 By default, the entries are posted with "pending" status so I could check then first. If you have many entries, you might want to tweak this. Details on the Wordpress XMLRPC API and the Python module I use is here:
43
44 https://codex.wordpress.org/XML-RPC_WordPress_API/Posts
45 https://python-wordpress-xmlrpc.readthedocs.io/en/latest/index.html
46
47 Copyright and License
48 ======================
49 © Benjamin Mako Hill, 2018
50
51 This program is free software: you can redistribute it and/or modify
52 it under the terms of the GNU General Public License as published by
53 the Free Software Foundation, either version 3 of the License, or (at
54 your option) any later version.

Benjamin Mako Hill || Want to submit a patch?