harp2hugo 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/harp2hugo.iml DELETED
@@ -1,29 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <module type="RUBY_MODULE" version="4">
3
- <component name="FacetManager">
4
- <facet type="gem" name="Ruby Gem">
5
- <configuration>
6
- <option name="GEM_APP_ROOT_PATH" value="$MODULE_DIR$" />
7
- <option name="GEM_APP_TEST_PATH" value="$MODULE_DIR$/test" />
8
- <option name="GEM_APP_LIB_PATH" value="$MODULE_DIR$/lib" />
9
- </configuration>
10
- </facet>
11
- </component>
12
- <component name="NewModuleRootManager" inherit-compiler-output="true">
13
- <exclude-output />
14
- <content url="file://$MODULE_DIR$">
15
- <sourceFolder url="file://$MODULE_DIR$/spec" isTestSource="true" />
16
- <sourceFolder url="file://$MODULE_DIR$/lib" isTestSource="false" />
17
- </content>
18
- <orderEntry type="jdk" jdkName="rbenv: 2.2.2" jdkType="RUBY_SDK" />
19
- <orderEntry type="sourceFolder" forTests="false" />
20
- <orderEntry type="library" scope="PROVIDED" name="bundler (v1.10.5, rbenv: 2.2.2) [gem]" level="application" />
21
- <orderEntry type="library" scope="PROVIDED" name="diff-lcs (v1.2.5, rbenv: 2.2.2) [gem]" level="application" />
22
- <orderEntry type="library" scope="PROVIDED" name="rake (v10.4.2, rbenv: 2.2.2) [gem]" level="application" />
23
- <orderEntry type="library" scope="PROVIDED" name="rspec (v3.3.0, rbenv: 2.2.2) [gem]" level="application" />
24
- <orderEntry type="library" scope="PROVIDED" name="rspec-core (v3.3.1, rbenv: 2.2.2) [gem]" level="application" />
25
- <orderEntry type="library" scope="PROVIDED" name="rspec-expectations (v3.3.0, rbenv: 2.2.2) [gem]" level="application" />
26
- <orderEntry type="library" scope="PROVIDED" name="rspec-mocks (v3.3.1, rbenv: 2.2.2) [gem]" level="application" />
27
- <orderEntry type="library" scope="PROVIDED" name="rspec-support (v3.3.0, rbenv: 2.2.2) [gem]" level="application" />
28
- </component>
29
- </module>
@@ -1,24 +0,0 @@
1
- require "json"
2
-
3
- class Harp2hugo
4
-
5
- def initialize input_file
6
- @data_json = JSON.parse(File.read input_file)
7
- end
8
-
9
- def convert output_dir
10
-
11
- @data_json.delete("feed")
12
-
13
- Dir.mkdir(output_dir) unless Dir.exist?output_dir
14
- @data_json.each {|key, value|
15
- post_content = File.read("#{key}.md")
16
- File.open("#{output_dir}/#{key}.md", 'w') { |output_file|
17
- output_file.write MetaData.new(value).to_yaml
18
- output_file.write post_content
19
- }
20
- }
21
-
22
- end
23
-
24
- end