Skip to content

Commit

Permalink
Adds scripts to convert old posts to Markdown.
Browse files Browse the repository at this point in the history
  • Loading branch information
ecampidoglio committed Feb 25, 2014
1 parent 94ca66e commit e76673c
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 0 deletions.
18 changes: 18 additions & 0 deletions tools/migration/htmltomd.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/bash

# Downloads the HTML source from a list of URLs and converts it to Markdown.
# The source file must contain each URL to download from on a separate line.
# The actual conversion is done by the awesome API available at
# http://heckyesmarkdown.com

urlsFile=$1
outputDir=${2:-.}

while read line
do
url=$line
mdFileName=$(echo ${url#*/*.*/} | sed "s/\//\-/g")
echo "${url} => ${outputDir}/${mdFileName}.md"
curl --progress-bar --data-urlencode "u=${url}" --data "read=1&md=1" http://heckyesmarkdown.com/go/ -o $outputDir/${mdFileName}.md
done < $urlsFile

34 changes: 34 additions & 0 deletions tools/migration/postUrls.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
http://megakemp.com/2008/08/27/hello-world
http://megakemp.com/2008/08/28/the-hd-jungle-part-1
http://megakemp.com/2008/09/03/google-enters-the-browser-arena
http://megakemp.com/2008/09/05/first-impressions-on-google-chrome
http://megakemp.com/2008/09/12/internet-explorer-fights-back
http://megakemp.com/2008/09/12/a-quick-tour-of-internet-explorer-8-beta-2
http://megakemp.com/2008/09/25/microsoft-pdc-2008
http://megakemp.com/2008/10/07/mcconnells-primary-technical-imperative
http://megakemp.com/2008/10/09/visual-studio-code-coverage-reports-with-msbuild
http://megakemp.com/2008/10/21/stack-overflow
http://megakemp.com/2008/10/22/microsoft-oslo-and-the-evolution-of-programming
http://megakemp.com/2008/10/28/microsoft-launches-windows-azure
http://megakemp.com/2008/11/02/first-preview-of-windows-7
http://megakemp.com/2008/11/12/sql-injections
http://megakemp.com/2008/11/21/rest-web-services
http://megakemp.com/2008/11/27/migrating-aspnet-web-services-to-wcf
http://megakemp.com/2009/01/27/the-rise-and-fall-of-3dfx
http://megakemp.com/2009/02/06/managing-shared-cookies-in-wcf
http://megakemp.com/2009/02/25/gdi-memory-leak-in-windows-forms
http://megakemp.com/2009/03/04/enforcing-coding-standards-with-microsoft-stylecop
http://megakemp.com/2009/04/06/another-visual-studio-color-theme
http://megakemp.com/2009/06/25/isolating-wcf-through-dependency-injection-part-i
http://megakemp.com/2009/07/02/isolating-wcf-through-dependency-injection-part-ii
http://megakemp.com/2009/08/19/building-an-htpc
http://megakemp.com/2009/09/04/improving-performance-with-generic-delegates-in-net
http://megakemp.com/2009/11/10/speed-up-your-queries-in-sql-server-by-being-declarative
http://megakemp.com/2010/01/04/fixing-a-bug-in-asp-net-ajax-and-the-pain-of-leaky-abstractions
http://megakemp.com/2011/08/01/anonymous-delegates-in-autofixture
http://megakemp.com/2011/09/06/behavior-changes-in-autofixture-2-2-anonymous-numbers
http://megakemp.com/2011/12/15/keep-your-unit-tests-dry-with-autofixture-customizations
http://megakemp.com/2012/08/30/make-your-system-administrator-friendly-with-powershell
http://megakemp.com/2013/01/22/grokking-git-by-seeing-it
http://megakemp.com/2013/02/26/adventures-in-overclocking-a-raspberry-pi
http://megakemp.com/2013/04/16/general-purpose-customizations-with-autofixture

0 comments on commit e76673c

Please sign in to comment.