sifttter-redux 1.0.0 → 1.0.1
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.
- checksums.yaml +4 -4
- data/HISTORY.md +4 -0
- data/README.md +3 -2
- data/lib/sifttter-redux/constants.rb +1 -1
- data/lib/sifttter-redux/sifttter.rb +6 -6
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 819d31f2990283e552596f7759ba300609edfd82
|
4
|
+
data.tar.gz: 177871630ec8e24ea9dea1036f7b17170f448951
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dfc1d3007b24c30ab23f6713ed2e7187d2480c19fadff70c3193ceb35e4175d3ad71b798adbb80bdb6365d6f5bed09cf86694021f3d59c64f6a1f09c4d390f88
|
7
|
+
data.tar.gz: 8e258aed37dfd0dab9e66a58d8a6b64b6f24958be3fb7043ec43a62fec22e4b21bdd773752e0b99ace590e88de0e36fb8c3dab64a00d80df1e7884da013d1bca
|
data/HISTORY.md
CHANGED
data/README.md
CHANGED
@@ -65,7 +65,7 @@ SYNOPSIS
|
|
65
65
|
srd [global options] command [command options] [arguments...]
|
66
66
|
|
67
67
|
VERSION
|
68
|
-
0.
|
68
|
+
1.0.1
|
69
69
|
|
70
70
|
GLOBAL OPTIONS
|
71
71
|
--help - Show this message
|
@@ -473,7 +473,8 @@ value in `~/.sifttter_redux` to your desired level.
|
|
473
473
|
|
474
474
|
# Bugs and Feature Requests
|
475
475
|
|
476
|
-
My current roadmap can be found on my
|
476
|
+
My current roadmap can be found on my
|
477
|
+
[Trello board](https://trello.com/b/z4vl3YxC/sifttter-redux "Sifttter Redux Trello Board").
|
477
478
|
|
478
479
|
To report bugs with or suggest features/changes for Sifttter Redux, please use
|
479
480
|
the [Issues Page](http://github.com/bachya/sifttter-redux/issues).
|
@@ -50,7 +50,7 @@ module SifttterRedux
|
|
50
50
|
date_regex = "(?:#{ date.strftime("%B") } 0?#{ date.strftime("%-d") }, #{ date.strftime("%Y") })"
|
51
51
|
time_regex = "(?:\d{1,2}:\d{1,2}\s?[AaPpMm]{2})"
|
52
52
|
entry_regex = /@begin\n@date\s#{ date_regex }(?: at (.*?)\n)?(.*?)@end/m
|
53
|
-
|
53
|
+
|
54
54
|
contents = File.read(filepath)
|
55
55
|
cur_entries = contents.scan(entry_regex)
|
56
56
|
unless cur_entries.empty?
|
@@ -70,10 +70,10 @@ module SifttterRedux
|
|
70
70
|
datestamp = date.to_time.utc.iso8601
|
71
71
|
starred = false
|
72
72
|
|
73
|
-
|
73
|
+
|
74
74
|
output_dir = configuration.sifttter_redux[:dayone_local_filepath]
|
75
75
|
Dir.mkdir(output_dir) unless Dir.exists?(output_dir)
|
76
|
-
|
76
|
+
|
77
77
|
files = `find #{ configuration.sifttter_redux[:sifttter_local_filepath] } -type f -name "*.txt" | grep -v -i daily | sort`
|
78
78
|
if files.empty?
|
79
79
|
messenger.error('No Sifttter files to parse...')
|
@@ -81,18 +81,18 @@ module SifttterRedux
|
|
81
81
|
messenger.error("Is #{ configuration.sifttter_redux[:sifttter_remote_filepath] } the correct remote filepath?")
|
82
82
|
exit!(1)
|
83
83
|
end
|
84
|
-
|
84
|
+
|
85
85
|
files.split("\n").each do |file|
|
86
86
|
file.strip!
|
87
87
|
if File.exists?(file)
|
88
88
|
parse_sifttter_file(file, date)
|
89
89
|
end
|
90
90
|
end
|
91
|
-
|
91
|
+
|
92
92
|
if @entries.length > 0
|
93
93
|
entrytext = "# Things done on #{ date_for_title }\n"
|
94
94
|
@entries.each do |key, value|
|
95
|
-
entrytext += '### ' + key.gsub(/.txt/, '') + "\n\n"
|
95
|
+
entrytext += '### ' + key.gsub(/.txt/, '').gsub(/_/, ' ').upcase + "\n\n"
|
96
96
|
value.each { |v| entrytext += "#{ v[1] }\n" }
|
97
97
|
entrytext += "\n"
|
98
98
|
end
|