Skip to content

Instantly share code, notes, and snippets.

View rickerbh's full-sized avatar

Hamish Rickerby rickerbh

View GitHub Profile
@rickerbh
rickerbh / octopress-to-cryogen.clj
Created July 26, 2020 06:40
Babashka script to port posts from jekyll/octopress format to cryogen
(require '[clojure.java.io :as io]
'[clojure.string :as string]
'[clojure.tools.cli :refer [parse-opts]])
(def cli-options
[["-o" "--out DIR" "Output directory"
:default "out"]
["-s" "--source SOURCE" "Source directory"
:default "source/_posts"]
["-h" "--help"]])
module CheckoutsHelper
def checkout_progress
steps = Checkout.state_names.reject { |n| n == "complete" }.map do |state|
next if state == "confirm" and not (Gateway.current && Gateway.current.payment_profiles_supported?)
text = t("checkout_steps.#{state}")
css_classes = []
current_index = Checkout.state_names.index(@checkout.state)
state_index = Checkout.state_names.index(state)