runeblog 0.3.26 → 0.3.27

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 646006af4da125dc3a6d968d76078b017e3b88d109a566e9e6b58cf90b24f91e
4
- data.tar.gz: 2c6de1ce325f0183ad07c72fd13f73464079c2939a0980d35aedaa339117b866
3
+ metadata.gz: a5338170556c8520e1d03e284f43a1f0b33833dbedf3d6e33991b06086dc655b
4
+ data.tar.gz: a0e4c476dd214cd0ca3460597e6b1a07415b2223101c2eb1a1eed1966380c41f
5
5
  SHA512:
6
- metadata.gz: 3bf8be383a0b54359dfc55da15f33008348039de26d6ce79806c49db682c4015e6239a6cc0614dd50cc630de4e2df8d403e75c6b6640cd750fdf6f91d6d96ebd
7
- data.tar.gz: 551c4be7d6f9d3b89c4e9a681083fbb63598a8e885b2bf1fc86816cc469ae39319a08e68590a1740d30e234698f54e8ea4e8e54d03b477fccddbca4b45acbe26
6
+ metadata.gz: 3cd616193a36e21dc6a9ffe56cf2a16c7abc1e3b50bfe339ba0b2b3446c4fd3d7fdcb63c3f569d2a2044d59c0cdbf05a38bc15aa5a1bb70d6482e276a1eb9b91
7
+ data.tar.gz: aef8ad80e260ecc9805a13ea24b8ca22d9bb9fb8fbf719dd6d7f5fbb9e28032f9313335df8b96ab6993db68a60b16bbab6ccc6cba9261add841aba002dcc1930
data/README.lt3 CHANGED
@@ -10,14 +10,16 @@
10
10
  <li>It's based on Livetext (highly extensible Ruby-based markup)</li>
11
11
  <li>It has the concept of multiple "views" for a blog</li>
12
12
  <li>The multiple views are in effect multiple blogs managed with the same backend.</li>
13
+ <li>Each view may have its own "look and feel" (and even be hosted on differing domains)</li>
13
14
  </ul>
14
15
 
15
16
 
16
17
 
17
18
  .h2 What is Livetext?
18
19
 
19
- Livetext is a markup format that is a throwback to the old, old days of text
20
- formatters such as ``nroff. It's very flexible, and it is extensible _[in Ruby].
20
+ Livetext is a markup format (media generator?) that is a throwback to the old,
21
+ old days of text formatters such as ``nroff. It's very flexible, and it is
22
+ extensible _[in Ruby].
21
23
 
22
24
  It is far from mature or full-featured, but it is usable. Runeblog uses Livetext,
23
25
  along with some custom definitions, to try to ease the formatting of a blog entry.
@@ -45,8 +47,8 @@ Any post can be in more than one view
45
47
  .h2 The <tt>blog</tt> environment
46
48
 
47
49
  There is a command-line tool called `blog which is a REPL (read-eval-print loop).
48
- Note that this tool is a curses-based environment (mainly so it can display menus
49
- and such to the user).
50
+ Note that this tool is a curses-based environment (mainly so that it can display
51
+ menus and such to the user).
50
52
 
51
53
  The help message looks like this:
52
54
 
@@ -57,7 +59,7 @@ The help message looks like this:
57
59
  <b>q, quit</b> Exit the program <b>cv VIEW</b> Change current view
58
60
  <b>v, version</b> Print version information <b>new view</b> Create a new view
59
61
  <b>clear</b> Clear screen <b>list views</b> List all views available
60
- <b>lsv</b> Same as: list views
62
+ <b>lsv</b> Same as: list views
61
63
  <br>
62
64
  <b>Posts:</b> <b>Advanced:</b>
63
65
  ------------------------------------------- -------------------------------------------
@@ -82,6 +84,7 @@ You'll then enter the editor (vim for now) to add configuration info to the `glo
82
84
 
83
85
  <!-- <pre><b>FIXME add menu screenshot here</b></pre> -->
84
86
  <!-- <pre><b>FIXME add vim screenshot here</b></pre> -->
87
+
85
88
  <img src="readme/vim-global.png" width="494" height="696" align="center"></img>
86
89
 
87
90
  The next thing you should do is to create at least one view of your own. Use the `[new view]
data/README.md CHANGED
@@ -44,6 +44,7 @@ But the important points are these:
44
44
  * Each view can have its own look and feel, and it can be linked/published separately from the others.
45
45
  * Each view can be hosted in a different location and/or a different server and domain
46
46
  * Any post can be in more than one view
47
+
47
48
  ## The <tt>blog</tt> environment
48
49
  There is a command-line tool called <font size=+1><tt>blog</tt></font> which is a REPL (read-eval-print loop).
49
50
  Note that this tool is a curses-based environment (mainly so it can display menus
@@ -60,7 +61,7 @@ The help message looks like this:
60
61
  <b>q, quit</b> Exit the program <b>cv VIEW</b> Change current view
61
62
  <b>v, version</b> Print version information <b>new view</b> Create a new view
62
63
  <b>clear</b> Clear screen <b>list views</b> List all views available
63
- <b>lsv</b> Same as: list views
64
+ <b>lsv</b> Same as: list views
64
65
  <br>
65
66
  <b>Posts:</b> <b>Advanced:</b>
66
67
  ------------------------------------------- -------------------------------------------
@@ -73,6 +74,7 @@ The help message looks like this:
73
74
  <b>edit ID</b> Edit a post <b>ssh</b> Login to remote server
74
75
  <b>import ASSETS</b> Import assets (images, etc.) <b>manage WIDGET</b> Manage content/layout of a widget
75
76
  </pre>
77
+
76
78
  ## Getting started
77
79
  But when you first run the REPL, it checks for an existing blog repository under
78
80
  the <font size=+1><tt>.blogs</tt></font> directory. If it doesn't find one, it asks whether you want to create
@@ -2,15 +2,12 @@ app_name = "raido1"
2
2
  app_client = "rAyZILgqGB7uHQ"
3
3
  secret = "0CqLXyFu6ABb1MrErWRsB7Bo-i8"
4
4
 
5
- https://www.reddit.com/api/v1/authorize?client_id=rAyZILgqGB7uHQ&response_type=code&state=abc237def&redirect_uri=http%3A%2F%2Frubyhacker.com&duration=permanent&scope=identity%20edit%20flair%20history%20modconfig%20modflair%20modlog%20modposts%20modwiki%20mysubreddits%20privatemessages%20read%20report%20save%20submit%20subscribe%20vote%20wikiedit%20wikiread
6
-
7
-
5
+ # https://www.reddit.com/api/v1/authorize?client_id=rAyZILgqGB7uHQ&response_type=code&state=abc237def&redirect_uri=http%3A%2F%2Frubyhacker.com&duration=permanent&scope=identity%20edit%20flair%20history%20modconfig%20modflair%20modlog%20modposts%20modwiki%20mysubreddits%20privatemessages%20read%20report%20save%20submit%20subscribe%20vote%20wikiedit%20wikiread
8
6
 
9
7
  require 'net/http'
10
8
  require 'uri'
11
9
  require 'json'
12
10
 
13
-
14
11
  =begin
15
12
  get_token = URI.parse("https://www.reddit.com/api/v1/access_token")
16
13
  data = {
@@ -20,8 +17,6 @@ data = {
20
17
  }
21
18
  =end
22
19
 
23
-
24
-
25
20
  uri = URI.parse("http://reddit.com/api/submit")
26
21
 
27
22
  header = {'Content-Type': 'text/json'}
data/lib/menus.rb CHANGED
@@ -14,33 +14,107 @@ notimp = proc { RubyText.splash("Not implemented yet") }
14
14
  top_about = proc { RubyText.splash("RuneBlog v #{RuneBlog::VERSION}") }
15
15
  top_help = proc { RubyText.splash(RuneBlog::REPL::Help.gsub(/[{}]/, " ")) }
16
16
 
17
+ def edit_blog_generate
18
+ edit_file("#@std/blog/generate.lt3")
19
+ end
20
+
21
+ def edit_blog_head
22
+ edit_file("#@std/blog/head.lt3")
23
+ end
24
+
25
+ def edit_blog_index
26
+ edit_file("#@std/blog/index.lt3")
27
+ end
28
+
29
+ def edit_post_entry
30
+ edit_file("#@std/blog/post_entry.lt3")
31
+ end
32
+
33
+ def edit_blog_banner
34
+ edit_file("#@std/banner/banner.lt3")
35
+ end
36
+
37
+ def edit_blog_navbar
38
+ edit_file("#@std/navbar/navbar.lt3")
39
+ end
40
+
41
+ def edit_post_generate
42
+ edit_file("#@std/post/generate.lt3")
43
+ end
44
+
45
+ def edit_post_head
46
+ edit_file("#@std/post/head.lt3")
47
+ end
48
+
49
+ def edit_post_index
50
+ edit_file("#@std/post/index.lt3")
51
+ end
52
+
53
+ def edit_view_global
54
+ edit_file("#@data/global.lt3")
55
+ end
56
+
57
+ def edit_settings_view
58
+ edit_file("settings/view.txt")
59
+ end
60
+
61
+ def edit_settings_recent
62
+ edit_file("settings/recent.txt")
63
+ end
64
+
65
+ def edit_settings_publish
66
+ edit_file("settings/publish.txt")
67
+ end
68
+
69
+ def edit_settings_features
70
+ edit_file("settings/features.txt")
71
+ end
72
+
73
+ def edit_config_reddit
74
+ edit_file("config/reddit/credentials.txt")
75
+ end
76
+
77
+ def edit_config_facebook
78
+ edit_file("config/facebook/credentials.txt")
79
+ end
80
+
81
+ def edit_config_twitter
82
+ edit_file("config/twitter/credentials.txt")
83
+ end
84
+
85
+ def edit_etc_blog_css
86
+ edit_file("#@std/etc/blog.css.lt3")
87
+ end
88
+
89
+ def edit_etc_externals
90
+ edit_file("#@std/etc/externals.lt3")
91
+ end
17
92
 
18
93
  # dir = @blog.view.dir/"themes/standard/"
19
94
 
20
- std = "themes/standard"
21
- data = "." # CHANGED
95
+ @std = "themes/standard"
96
+ @data = "." # CHANGED
22
97
 
23
98
  Menu.top_config = {
24
- "View: generator" => edit("#{std}/blog/generate.lt3"),
25
- " HEAD info" => edit("#{std}/blog/head.lt3"),
26
- " Layout " => edit("#{std}/blog/index.lt3"),
27
- " Recent-posts entry" => edit("#{std}/blog/post_entry.lt3"),
28
- " Banner: Description" => edit("#{std}/banner/banner.lt3"),
29
- " Navbar" => edit("#{std}/navbar/navbar.lt3"),
30
- # " Text portion" => edit("#{std}/banner/top.lt3"),
31
- "Generator for a post" => edit("#{std}/post/generate.lt3"),
32
- " HEAD info for post" => edit("#{std}/post/head.lt3"),
33
- " Content for post" => edit("#{std}/post/index.lt3"),
34
- "Variables (general)" => edit("#{data}/global.lt3"),
35
- " View-specific" => edit("settings/view.txt"),
36
- " Recent posts" => edit("settings/recent.txt"),
37
- " Publishing" => edit("settings/publish.txt"),
38
- "Configuration: enable/disable" => edit("settings/features.txt"),
39
- " Reddit" => edit("config/reddit/credentials.txt"),
40
- " Facebook" => edit("config/facebook/credentials.txt"),
41
- " Twitter" => edit("config/twitter/credentials.txt"),
42
- "Global CSS" => edit("#{std}/etc/blog.css.lt3"),
43
- "External JS/CSS (Bootstrap, etc.)" => edit("/etc/externals.lt3")
99
+ "View: generator" => proc { edit_blog_generate },
100
+ " HEAD info" => proc { edit_blog_head },
101
+ " Layout " => proc { edit_blog/index },
102
+ " Recent-posts entry" => proc { edit_post_entry },
103
+ " Banner: Description" => proc { edit_banner },
104
+ " Navbar" => proc { edit_navbar },
105
+ "Generator for a post" => proc { edit_post_generate },
106
+ " HEAD info for post" => proc { edit_post_head },
107
+ " Content for post" => proc { edit_post_index },
108
+ "Variables (general)" => proc { edit_view_global },
109
+ " View-specific" => proc { edit_settings_view },
110
+ " Recent posts" => proc { edit_settings_recent },
111
+ " Publishing" => proc { edit_settings_publish },
112
+ "Configuration: enable/disable" => proc { edit_settings_features },
113
+ " Reddit" => proc { edit_config_reddit },
114
+ " Facebook" => proc { edit_config_facebook },
115
+ " Twitter" => proc { edit_config_twitter },
116
+ "Global CSS" => proc { edit_etc_blog_css },
117
+ "External JS/CSS (Bootstrap, etc.)" => proc { edit_etc_externals }
44
118
  }
45
119
 
46
120
  Menu.top_build = {
@@ -1,7 +1,7 @@
1
1
  if !defined?(RuneBlog::Path)
2
2
 
3
3
  class RuneBlog
4
- VERSION = "0.3.26"
4
+ VERSION = "0.3.27"
5
5
 
6
6
  path = Gem.find_files("runeblog").grep(/runeblog-/).first
7
7
  Path = File.dirname(path)
data/lib/view.rb CHANGED
@@ -39,8 +39,8 @@ class RuneBlog::View
39
39
 
40
40
  live = Livetext.customize(call: ".nopara")
41
41
  live.xform_file(gfile)
42
- live._setvar("ViewDir", @blog.root/:views/@name)
43
- live._setvar("View", @name)
42
+ live.setvar("ViewDir", @blog.root/:views/@name)
43
+ live.setvar("View", @name)
44
44
  @globals = live.vars
45
45
  # dump_globals_stderr
46
46
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: runeblog
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.26
4
+ version: 0.3.27
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hal Fulton
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-12-09 00:00:00.000000000 Z
11
+ date: 2022-08-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: livetext
@@ -54,42 +54,42 @@ dependencies:
54
54
  name: rouge
55
55
  requirement: !ruby/object:Gem::Requirement
56
56
  requirements:
57
- - - ">="
58
- - !ruby/object:Gem::Version
59
- version: 3.25.0
60
57
  - - "~>"
61
58
  - !ruby/object:Gem::Version
62
59
  version: '3.25'
60
+ - - ">="
61
+ - !ruby/object:Gem::Version
62
+ version: 3.25.0
63
63
  type: :runtime
64
64
  prerelease: false
65
65
  version_requirements: !ruby/object:Gem::Requirement
66
66
  requirements:
67
- - - ">="
68
- - !ruby/object:Gem::Version
69
- version: 3.25.0
70
67
  - - "~>"
71
68
  - !ruby/object:Gem::Version
72
69
  version: '3.25'
70
+ - - ">="
71
+ - !ruby/object:Gem::Version
72
+ version: 3.25.0
73
73
  - !ruby/object:Gem::Dependency
74
74
  name: minitest
75
75
  requirement: !ruby/object:Gem::Requirement
76
76
  requirements:
77
- - - ">="
78
- - !ruby/object:Gem::Version
79
- version: 5.10.0
80
77
  - - "~>"
81
78
  - !ruby/object:Gem::Version
82
79
  version: '5.10'
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: 5.10.0
83
83
  type: :development
84
84
  prerelease: false
85
85
  version_requirements: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - ">="
88
- - !ruby/object:Gem::Version
89
- version: 5.10.0
90
87
  - - "~>"
91
88
  - !ruby/object:Gem::Version
92
89
  version: '5.10'
90
+ - - ">="
91
+ - !ruby/object:Gem::Version
92
+ version: 5.10.0
93
93
  description: A blog system based on Ruby and Livetext
94
94
  email: rubyhacker@gmail.com
95
95
  executables:
@@ -256,7 +256,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
256
256
  - !ruby/object:Gem::Version
257
257
  version: '0'
258
258
  requirements: []
259
- rubygems_version: 3.0.8
259
+ rubygems_version: 3.1.2
260
260
  signing_key:
261
261
  specification_version: 4
262
262
  summary: A command-line blogging system