summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'README.md')
-rw-r--r--README.md70
1 files changed, 70 insertions, 0 deletions
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..5a3c57c
--- /dev/null
+++ b/README.md
@@ -0,0 +1,70 @@
+Org-Quotes
+==========
+
+This was a quick weekend (well, two Fridays and a Sunday) project to
+do some org-mode file parsing to get some useful work done.
+
+make-post.php
+-------------
+
+This was the original Friday hack.
+
+The idea is that we have an org-mode file with a specific structure:
+
+ * Root Element
+ ** Reporter One Name
+ *** First Source-Person Name
+ Quote body text
+ *** Second Source-Person Name
+ Quote body text
+ ** Reporter Two Name
+
+We parse that, offer an HTML form to select one quote from each
+reporter, then dump all the selected quotes to a (partial) HTML file
+that we can use as a Wordpress post.
+
+word2org.sh
+-----------
+
+This happened later that Friday, when I had to deal with some quotes
+that had already been typed by an assistant.
+
+The assistant had typed up a bunch of quotes into Microsoft Word.
+Blech. Fortunately for me she(? I haven't actually met said person)
+did it in a fairly disciplined structure, so that after copy/pasting
+into a text-file, I could parse it into an org-mode file with the
+above structure. I wrote a quickie bash script to do this.
+
+For reference, the format of this text is:
+
+ “Quote body”
+ - Quote Source
+
+ “Quote body”
+ - Quote Source
+
+ Reporter: Reporter Name
+
+upload-org.php/upload-ms-word.php
+---------------------------------
+
+The next week I discovered that the proxy I had to work behind had
+been reconfigured, and I couldn't figure out tunnel SSH through it.
+So I couldn't SSH in, paste the MS Word data into an Emacs buffer,
+then run it through `word2org.sh`, then `mv` it to the location looked
+for by [what is now named] `make-post.php`. So, when I got home I
+make `upload-msword.php` and `upload-org.php` so that I could paste in
+either org-mode or MS Word formatted quotes from a browser behind the
+proxy, and still get work done /at work/.
+
+So yeah, `upload-msword.php` uses the system() PHP call to run
+word2org. Go ahead, shoot me, but this was never meant to be a
+polished project.
+
+Other Notes
+-----------
+
+All of the PHP files have a directory hardcoded into them to either
+look for the org-mode files in, or upload them to. I've got it set to
+`/home/luke/j1-uploads`. Perhaps one day I'll move that to a single
+config file.