roebe 0.5.191 → 0.6.3
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of roebe might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/README.md +23 -26
- data/bin/create_my_directories +2 -2
- data/bin/{ruby_dhcpcd → dhcpcd_wrapper} +1 -1
- data/doc/README.gen +12 -0
- data/doc/core/array.md +24 -23
- data/doc/core/gem_and_gemspec.md +12 -11
- data/doc/core/misc.md +23 -20
- data/doc/statistics/statistics.md +1 -0
- data/lib/roebe/actions/actions.rb +68 -0
- data/lib/roebe/base/misc.rb +14 -1
- data/lib/roebe/browser/output_url_then_open_in_browser.rb +8 -6
- data/lib/roebe/classes/alltagsgeschichte.rb +1 -1
- data/lib/roebe/classes/at.rb +2 -2
- data/lib/roebe/classes/auto_rename_file_based_on_its_creation_date.rb +24 -12
- data/lib/roebe/classes/books/books.rb +159 -117
- data/lib/roebe/classes/books/menu.rb +8 -7
- data/lib/roebe/classes/books/sanitize_this_book_path/sanitize_this_book_path.rb +0 -1
- data/lib/roebe/classes/check_yaml.rb +15 -11
- data/lib/roebe/classes/compile_kernel.rb +3 -1
- data/lib/roebe/classes/copy_kernel_config.rb +5 -3
- data/lib/roebe/classes/create_desktop_file.rb +1 -1
- data/lib/roebe/classes/create_my_directories.rb +12 -10
- data/lib/roebe/classes/dhcpcd/{dhcpcd.rb → dhcpcd_wrapper.rb} +137 -95
- data/lib/roebe/classes/dhcpcd/kill_dhcpcd.rb +2 -2
- data/lib/roebe/classes/do_install.rb +7 -6
- data/lib/roebe/classes/done.rb +1 -1
- data/lib/roebe/classes/downcase_extension.rb +4 -4
- data/lib/roebe/classes/email.rb +44 -40
- data/lib/roebe/classes/enable.rb +1 -1
- data/lib/roebe/classes/github.rb +1 -1
- data/lib/roebe/classes/kde/install_this_konsole_theme.rb +1 -1
- data/lib/roebe/classes/make_gem.rb +29 -27
- data/lib/roebe/classes/readme_generator/readme_generator.rb +597 -1
- data/lib/roebe/classes/report_how_many_files_are_in_this_directory.rb +83 -0
- data/lib/roebe/classes/set_background.rb +14 -0
- data/lib/roebe/classes/show_ten_aliases.rb +15 -3
- data/lib/roebe/classes/tales_from_the_crypt.rb +1 -1
- data/lib/roebe/classes/update.rb +2 -1
- data/lib/roebe/constants/array_install_these_gem_projects.rb +1 -1
- data/lib/roebe/constants/roebe.rb +2 -0
- data/lib/roebe/custom_methods/module.rb +16 -0
- data/lib/roebe/fonts/fonts.rb +39 -0
- data/lib/roebe/hello_world/hello_world.rb +0 -0
- data/lib/roebe/math/log10.rb +3 -3
- data/lib/roebe/math/the_collatz_problem.rb +104 -0
- data/lib/roebe/shell/shell/shell.rb +6 -6
- data/lib/roebe/shell_scripts/lfs/002_gcc_1.sh +13 -1
- data/lib/roebe/shell_scripts/lfs/003_linux_1.sh +1 -0
- data/lib/roebe/shell_scripts/lfs/007_ncurses_2.sh +4 -1
- data/lib/roebe/shell_scripts/lfs/020_xz_2.sh +5 -5
- data/lib/roebe/shell_scripts/lfs/021_binutils_2.sh +1 -0
- data/lib/roebe/shell_scripts/lfs/022_gcc_2.sh +12 -1
- data/lib/roebe/shell_scripts/lfs/025_ruby_2.sh +13 -0
- data/lib/roebe/shell_scripts/lfs/lfs_build_variables.sh +48 -8
- data/lib/roebe/toplevel_methods/to_mp3.rb +1 -1
- data/lib/roebe/version/version.rb +2 -2
- data/lib/roebe/wasm/README.md +7 -0
- data/lib/roebe/wasm/enable_simple_puts_output.rb +9 -0
- data/lib/roebe/wasm/wasm_examples.html +43 -0
- data/lib/roebe/www/RNA/RNA.cgi +42 -1
- data/lib/roebe/www/algorithms/algorithms.rb +22 -0
- data/lib/roebe/www/analytical_chemistry/content.md +3 -0
- data/lib/roebe/www/animals/animals.cgi +25 -0
- data/lib/roebe/www/bioanalytik/bioanalytik.cgi +90 -0
- data/lib/roebe/www/cellbiology/cellbiology.rb +16 -2
- data/lib/roebe/www/chemistry/S/303/244uren_Basen_und_der_pH_Wert/S/303/244uren_Basen_und_der_pH_Wert.cgi +242 -0
- data/lib/roebe/www/chemistry/chemistry.rb +10 -258
- data/lib/roebe/www/chemistry/css_rules.css +67 -0
- data/lib/roebe/www/chemistry/die_quantenzahlen/die_quantenzahlen.cgi +123 -0
- data/lib/roebe/www/chemistry/funktionelle_gruppen_in_der_chemie/funktionelle_gruppen_in_der_chemie.cgi +52 -0
- data/lib/roebe/www/erste_hilfe/erste_hilfe.cgi +212 -62
- data/lib/roebe/www/fonts/fonts.cgi +245 -0
- data/lib/roebe/www/hardware/computersysteme/computersysteme.rb +117 -102
- data/lib/roebe/www/hardware/netzteile/netzteile.cgi +94 -0
- data/lib/roebe/www/immunology/immunology.rb +101 -7
- data/lib/roebe/www/linux/antiX/antiX.rb +7 -4
- data/lib/roebe/www/linux/linux.rb +9 -11
- data/lib/roebe/www/linux/linuxmint/linuxmint.rb +33 -0
- data/lib/roebe/www/linux/slackware/slackware.rb +136 -27
- data/lib/roebe/www/lyrics/lyrics.rb +1 -1
- data/lib/roebe/www/microbiology/microbiology.rb +17 -2
- data/lib/roebe/www/mikrobielle_physiologie/mikrobielle_physiologie.cgi +1086 -2
- data/lib/roebe/www/mitochondria/mitochondria.cgi +16 -2
- data/lib/roebe/www/module_www.rb +2 -3
- data/lib/roebe/www/neurobiology/neurobiology.rb +20 -3
- data/lib/roebe/www/pdf/pdf.rb +13 -0
- data/lib/roebe/www/physics/physics.rb +20 -4
- data/lib/roebe/www/physiology/physiology.rb +5 -1
- data/lib/roebe/www/play_this_video_file/play_this_video_file.cgi +1 -1
- data/lib/roebe/www/programming_advice/programming_advice.cgi +36 -0
- data/lib/roebe/www/programming_advice/programming_advice.md +349 -0
- data/lib/roebe/www/psychologie/psychologie.rb +7 -1
- data/lib/roebe/www/science/science.rb +6 -0
- data/lib/roebe/www/sex_and_reproduction/sex_and_reproduction.cgi +18 -2
- data/lib/roebe/www/structural_biology/structural_biology.cgi +16 -0
- data/lib/roebe/www/the_cell_cycle/the_cell_cycle.cgi +27 -0
- data/lib/roebe/www/video/video.rb +1 -1
- data/lib/roebe/www/virology/virology.rb +12 -1
- data/lib/roebe/www/war_in_Ukraine_2022/war_in_Ukraine_2022.rb +26 -8
- data/lib/roebe/www/xorg/xorg.rb +3 -202
- data/lib/roebe/yaml/books/favourite_books.yml +6 -8
- data/lib/roebe/yaml/directory_structure.yml +1 -0
- metadata +26 -15
- data/lib/roebe/classes/readme_generator/constants.rb +0 -21
- data/lib/roebe/classes/readme_generator/initialize.rb +0 -38
- data/lib/roebe/classes/readme_generator/misc.rb +0 -548
- data/lib/roebe/classes/readme_generator/reset.rb +0 -28
- data/lib/roebe/classes/readme_generator/run.rb +0 -20
- data/lib/roebe/shell_scripts/lfs/lfs_variables.sh +0 -31
- data/lib/roebe/www/mikrobielle_physiologie/mikrobielle_physiologie.rb +0 -1055
- data/lib/roebe/www/programming_advice/programming_advice.yml +0 -31
@@ -1,548 +0,0 @@
|
|
1
|
-
#!/usr/bin/ruby -w
|
2
|
-
# Encoding: UTF-8
|
3
|
-
# frozen_string_literal: true
|
4
|
-
# =========================================================================== #
|
5
|
-
# === Roebe::ReadmeGenerator
|
6
|
-
#
|
7
|
-
# This class can be used to generate a README.md file. Input-templates
|
8
|
-
# can also be used, such as README.gen. From such a template file, we
|
9
|
-
# can autogenerate a README file.
|
10
|
-
#
|
11
|
-
# Usage example:
|
12
|
-
#
|
13
|
-
# Roebe::ReadmeGenerator.new(ARGV)
|
14
|
-
#
|
15
|
-
# =========================================================================== #
|
16
|
-
# require 'roebe/classes/readme_generator/misc.rb'
|
17
|
-
# =========================================================================== #
|
18
|
-
require 'roebe/base/base.rb'
|
19
|
-
|
20
|
-
module Roebe
|
21
|
-
|
22
|
-
class ReadmeGenerator < Base # === Roebe::ReadmeGenerator
|
23
|
-
|
24
|
-
require 'roebe/classes/readme_generator/constants.rb'
|
25
|
-
require 'roebe/classes/readme_generator/initialize.rb'
|
26
|
-
require 'roebe/classes/readme_generator/reset.rb'
|
27
|
-
require 'roebe/classes/readme_generator/run.rb'
|
28
|
-
|
29
|
-
# ========================================================================= #
|
30
|
-
# === main_file?
|
31
|
-
# ========================================================================= #
|
32
|
-
def main_file?
|
33
|
-
NAME_OF_THE_FILE_THAT_IS_AUTOGENERATED
|
34
|
-
end
|
35
|
-
|
36
|
-
# ========================================================================= #
|
37
|
-
# === set_input_gen_file
|
38
|
-
# ========================================================================= #
|
39
|
-
def set_input_gen_file(
|
40
|
-
i = FILE_DOC_README_GEN
|
41
|
-
)
|
42
|
-
i = i.first if i.is_a? Array
|
43
|
-
i = i.to_s.dup
|
44
|
-
if i.empty?
|
45
|
-
i = FILE_DOC_README_GEN
|
46
|
-
end
|
47
|
-
# ======================================================================= #
|
48
|
-
# Next, quickly see whether a file called "README.gen" exists in
|
49
|
-
# the current directory but not at e. g. doc/README.gen. In this
|
50
|
-
# case we will use that file instead.
|
51
|
-
# ======================================================================= #
|
52
|
-
if File.exist?('README.gen') and !File.exist?(i)
|
53
|
-
i = 'README.gen'
|
54
|
-
end
|
55
|
-
@input_gen_file = i
|
56
|
-
end
|
57
|
-
|
58
|
-
# ========================================================================= #
|
59
|
-
# === input_gen_file?
|
60
|
-
# ========================================================================= #
|
61
|
-
def input_gen_file?
|
62
|
-
@input_gen_file
|
63
|
-
end; alias gen_file? input_gen_file? # === gen_file?
|
64
|
-
|
65
|
-
# ========================================================================= #
|
66
|
-
# === try_to_embed_this_file
|
67
|
-
# ========================================================================= #
|
68
|
-
def try_to_embed_this_file(this_file)
|
69
|
-
# ======================================================================= #
|
70
|
-
# Turn it into an absolute path for now.
|
71
|
-
# ======================================================================= #
|
72
|
-
this_file = File.absolute_path(this_file)
|
73
|
-
if File.exist? this_file
|
74
|
-
# ===================================================================== #
|
75
|
-
# Read in the file then.
|
76
|
-
# ===================================================================== #
|
77
|
-
opne "Reading in the content of the file `#{sfile(this_file)}`."
|
78
|
-
add(
|
79
|
-
N+'<pre>'+N+File.read(this_file)+N+'</pre>'+N
|
80
|
-
)
|
81
|
-
else
|
82
|
-
opne "No file called #{sfile(this_file)} exists."
|
83
|
-
end
|
84
|
-
end
|
85
|
-
|
86
|
-
# ========================================================================= #
|
87
|
-
# === add_text_for_the_donate_macro
|
88
|
-
#
|
89
|
-
# This is the text that will be added for the donation-macro in a
|
90
|
-
# README.gen file.
|
91
|
-
# ========================================================================= #
|
92
|
-
def add_text_for_the_donate_macro
|
93
|
-
add('Currently this project does not accept donations, but')
|
94
|
-
add('in the future this may be subject to change, including')
|
95
|
-
add('more information in how folks could support the project,')
|
96
|
-
add('if they would like to.')
|
97
|
-
add
|
98
|
-
add('Of course **documentation**, **patches**, **bug fixes** and so')
|
99
|
-
add('forth are **always** appreciated.')
|
100
|
-
end
|
101
|
-
|
102
|
-
# ========================================================================= #
|
103
|
-
# === open_in_browser
|
104
|
-
# ========================================================================= #
|
105
|
-
def open_in_browser(i)
|
106
|
-
if File.exist?(i) and !(File.size(i) == 0)
|
107
|
-
Open.in_browser(i) if Object.const_defined? :Open
|
108
|
-
else
|
109
|
-
opne "No file exists at `#{sfile(i)}` - or "\
|
110
|
-
"has a file size larger than 0."
|
111
|
-
end
|
112
|
-
end
|
113
|
-
|
114
|
-
# ========================================================================= #
|
115
|
-
# === store_the_string
|
116
|
-
# ========================================================================= #
|
117
|
-
def store_the_string
|
118
|
-
what = @_
|
119
|
-
into = main_file?
|
120
|
-
opne 'Storing the dataset into the file `'+sfile(into)+'`.'
|
121
|
-
write_what_into(what, into)
|
122
|
-
end
|
123
|
-
|
124
|
-
# ========================================================================= #
|
125
|
-
# === return_name_of_the_project
|
126
|
-
#
|
127
|
-
# This method will return the name of the project at hand. Note that
|
128
|
-
# this functionality depends on guessing the directory name, so
|
129
|
-
# we need to have cd-ed to the correct directory prior to making
|
130
|
-
# use of this method here.
|
131
|
-
# ========================================================================= #
|
132
|
-
def return_name_of_the_project
|
133
|
-
File.basename(Dir.pwd)
|
134
|
-
end
|
135
|
-
|
136
|
-
# ========================================================================= #
|
137
|
-
# === try_to_add_the_content_of_this_file
|
138
|
-
#
|
139
|
-
# This method will try to add the file-content of an existing file,
|
140
|
-
# into the newly generated README.md file.
|
141
|
-
# ========================================================================= #
|
142
|
-
def try_to_add_the_content_of_this_file(this_file)
|
143
|
-
if File.exist? this_file
|
144
|
-
# ===================================================================== #
|
145
|
-
# Read in the file then.
|
146
|
-
# ===================================================================== #
|
147
|
-
opne "Reading in the content of the file `#{sfile(this_file)}`."
|
148
|
-
add(File.read(this_file))
|
149
|
-
else
|
150
|
-
e
|
151
|
-
opne crimson("No file called #{sfile(this_file)} exists.")
|
152
|
-
e
|
153
|
-
if is_on_roebe?
|
154
|
-
e 'Please fix the above error first.'
|
155
|
-
# =================================================================== #
|
156
|
-
# And using zenity to fix that, too.
|
157
|
-
# =================================================================== #
|
158
|
-
esystem "zenity --list --column='#{this_file}'"
|
159
|
-
end
|
160
|
-
end
|
161
|
-
end
|
162
|
-
|
163
|
-
# ========================================================================= #
|
164
|
-
# === generate_html_file_via_kramdown
|
165
|
-
# ========================================================================= #
|
166
|
-
def generate_html_file_via_kramdown
|
167
|
-
store_here = '/Depot/Information/foobar.html'
|
168
|
-
if File.exist? main_file?
|
169
|
-
_ = "kramdown #{main_file?} > #{store_here}"
|
170
|
-
esystem _
|
171
|
-
if File.exist? store_here
|
172
|
-
open_in_browser(store_here) if @open_in_browser
|
173
|
-
end
|
174
|
-
else
|
175
|
-
opne "No file exists at #{main_file?} - "\
|
176
|
-
"thus, kramdown can not be used."
|
177
|
-
end
|
178
|
-
end
|
179
|
-
|
180
|
-
# ========================================================================= #
|
181
|
-
# === add_string_showing_the_last_updated_programs
|
182
|
-
#
|
183
|
-
# Note that we will modify this String by replacing all
|
184
|
-
# newlines via HTML <br> tags.
|
185
|
-
# ========================================================================= #
|
186
|
-
def add_string_showing_the_last_updated_programs
|
187
|
-
require 'rbt/toplevel_methods/misc.rb'
|
188
|
-
begin
|
189
|
-
add(
|
190
|
-
RBT.return_string_showing_the_last_updated_programs.
|
191
|
-
gsub("\n","<br>\n")
|
192
|
-
)
|
193
|
-
rescue Exception => error
|
194
|
-
pp error
|
195
|
-
end
|
196
|
-
if is_on_roebe?
|
197
|
-
# ===================================================================== #
|
198
|
-
# Also remove the file if it exists.
|
199
|
-
# ===================================================================== #
|
200
|
-
require 'rbt/toplevel_methods/log_directory.rb'
|
201
|
-
this_file = "#{RBT.log_dir?}these_programs_were_updated_copy.yml"
|
202
|
-
if File.exist? this_file
|
203
|
-
remove_file(this_file)
|
204
|
-
this_file = "/home/x/programming/ruby/src/rbt/lib/rbt/yaml/these_programs_were_updated_copy.yml"
|
205
|
-
if File.exist?(this_file)
|
206
|
-
remove_file(this_file)
|
207
|
-
end
|
208
|
-
else
|
209
|
-
e rev+'Can not remove file '+sfile(this_file)+
|
210
|
-
rev+' because it does not exist.'
|
211
|
-
end
|
212
|
-
end
|
213
|
-
end
|
214
|
-
|
215
|
-
# ========================================================================= #
|
216
|
-
# === add (add tag)
|
217
|
-
# ========================================================================= #
|
218
|
-
def add(i = '')
|
219
|
-
i = i.join(N) if i.is_a? Array
|
220
|
-
@_ << "#{i}#{N}"
|
221
|
-
end
|
222
|
-
|
223
|
-
# ========================================================================= #
|
224
|
-
# === add_badge (badge tag)
|
225
|
-
#
|
226
|
-
# This will add the two main badges that I usually use in ruby projects.
|
227
|
-
#
|
228
|
-
# The first badge, to the left, is a link to the distribution called
|
229
|
-
# GoboLinux; the second badge, to the right of it, is a link to the
|
230
|
-
# official ruby-lang site.
|
231
|
-
#
|
232
|
-
# Note that since as of August 2019, a third badge will be shown -
|
233
|
-
# the badge that tags the gem-version onto the markdown file. This
|
234
|
-
# badge is special in that we need to attach the name of the project
|
235
|
-
# at hand.
|
236
|
-
# ========================================================================= #
|
237
|
-
def add_badge
|
238
|
-
homepage2 = 'https://www.ruby-lang.org/en/'.dup
|
239
|
-
name_of_the_project = return_name_of_the_project
|
240
|
-
add_gobolinux_badge
|
241
|
-
@_ << "[![forthebadge](https://forthebadge.com/images/badges/made-with-ruby.svg)](#{homepage2})#{N}"
|
242
|
-
# ======================================================================= #
|
243
|
-
# Next add the gem-version to the ruby-project at hand:
|
244
|
-
# ======================================================================= #
|
245
|
-
@_ << '[![Gem Version](https://badge.fury.io/rb/'+name_of_the_project+'.svg)](https://badge.fury.io/rb/'+name_of_the_project+')'+N
|
246
|
-
end; alias add_ruby_badge add_badge # === add_ruby_badge
|
247
|
-
|
248
|
-
# ========================================================================= #
|
249
|
-
# === add_gobolinux_badge
|
250
|
-
# ========================================================================= #
|
251
|
-
def add_gobolinux_badge(
|
252
|
-
homepage = 'https://www.gobolinux.org/'
|
253
|
-
)
|
254
|
-
@_ << "[![forthebadge](https://forthebadge.com/images/badges/built-with-love.svg)](#{homepage})#{N}"
|
255
|
-
end; alias add_gobolinux_logo add_gobolinux_badge # === add_gobolinux_logo
|
256
|
-
|
257
|
-
# ========================================================================= #
|
258
|
-
# === add_environment_information_properly_formatted_array
|
259
|
-
# ========================================================================= #
|
260
|
-
def add_environment_information_properly_formatted_array
|
261
|
-
require 'environment_information/constants/array_tracked_components.rb'
|
262
|
-
EnvironmentInformation::ARRAY_TRACKED_PROGRAMS.each {|entry|
|
263
|
-
@_ << " #{entry}\n"
|
264
|
-
}
|
265
|
-
@_ << "\n"
|
266
|
-
end
|
267
|
-
|
268
|
-
# ========================================================================= #
|
269
|
-
# === add_time_stamp
|
270
|
-
#
|
271
|
-
# Add information to the README when this gem was last updated.
|
272
|
-
# ========================================================================= #
|
273
|
-
def add_time_stamp
|
274
|
-
add(
|
275
|
-
"\nThis gem was <b>last updated</b> on the "\
|
276
|
-
"<span style=\"color: darkblue; font-weight: bold\">#{dd_mm_yyyy}</span> "\
|
277
|
-
"(dd.mm.yyyy notation), at "\
|
278
|
-
"<span style=\"color: steelblue; font-weight: bold\">#{hh_mm_ss}</span> o'clock."
|
279
|
-
)
|
280
|
-
end
|
281
|
-
|
282
|
-
# ========================================================================= #
|
283
|
-
# === read_dataset_from_gen_file
|
284
|
-
# ========================================================================= #
|
285
|
-
def read_dataset_from_gen_file
|
286
|
-
_ = gen_file?
|
287
|
-
if File.exist? _
|
288
|
-
readlines_with_proper_encoding(_).each {|line|
|
289
|
-
line.chomp!
|
290
|
-
# =================================================================== #
|
291
|
-
# Process each line next.
|
292
|
-
# =================================================================== #
|
293
|
-
case line # case tag
|
294
|
-
# =================================================================== #
|
295
|
-
# === Handle files that begin with MACRO
|
296
|
-
#
|
297
|
-
# Several "aliases" exist to this entry point, such as
|
298
|
-
# INCLUDE_THIS_FILE or EMBED_THIS_FILE.
|
299
|
-
#
|
300
|
-
# Keep in mind that the file at hand should, ideally, exist. :)
|
301
|
-
# =================================================================== #
|
302
|
-
when /^MACRO read_file_as_pre_tag (.+)$/,
|
303
|
-
/^INCLUDE_THIS_FILE (.+)$/,
|
304
|
-
/^EMBED_THIS_FILE (.+)$/,
|
305
|
-
/^READ_AND_DISPLAY_THIS_FILE (.+)$/,
|
306
|
-
/^DISPLAY_THIS_FILE (.+)$/
|
307
|
-
this_file = $1.to_s.dup
|
308
|
-
try_to_embed_this_file(this_file)
|
309
|
-
# =================================================================== #
|
310
|
-
# === Add the default ruby header
|
311
|
-
# =================================================================== #
|
312
|
-
when /^RUBY_BADGE_AND_TIME_STAMP$/i,
|
313
|
-
/^DEFAULT_HEADER$/i
|
314
|
-
add_ruby_badge # <- This method will also invoke the method add_gobolinux_badge().
|
315
|
-
add_time_stamp
|
316
|
-
# =================================================================== #
|
317
|
-
# === ADD_CONTEXTFREE_ART_DISCLAIMER
|
318
|
-
#
|
319
|
-
# This entry point was specifically added in order to be used
|
320
|
-
# for linking to the fine contextfreedesign project (cfdg).
|
321
|
-
# =================================================================== #
|
322
|
-
when /ADD(_|-)?CONTEXTFREE(_|-)?ART(_|-)?DISCLAIMER$/
|
323
|
-
add_contextfree_art_disclaimer
|
324
|
-
# =================================================================== #
|
325
|
-
# === ADD_TIME_STAMP
|
326
|
-
#
|
327
|
-
# Add a time stamp, aka the current time, in combination with a
|
328
|
-
# "This gem was last updated on xyz." notification.
|
329
|
-
# =================================================================== #
|
330
|
-
when /^ADD_TIME_STAMP$/,
|
331
|
-
/^ADD_LAST_UPDATE$/,
|
332
|
-
/^ADD_MAIN_TIMESTAMP$/,
|
333
|
-
/^ADD_LAST_UPDATED_WHEN$/
|
334
|
-
add_time_stamp
|
335
|
-
# =================================================================== #
|
336
|
-
# === LICENCE_IS_MIT
|
337
|
-
# =================================================================== #
|
338
|
-
when /LICENCE_?IS_?MIT/,
|
339
|
-
/USE_?THE_?MIT_?LICENCE/
|
340
|
-
add_licence_is_MIT
|
341
|
-
# =================================================================== #
|
342
|
-
# === ADD_CONTACT_INFORMATION
|
343
|
-
#
|
344
|
-
# Add the default email address in use.
|
345
|
-
# =================================================================== #
|
346
|
-
when /ADD_?CONTACT_?INFORMATION/,
|
347
|
-
/ADD_?CONTACT_?DETAILS/,
|
348
|
-
/ADD_?EMAIL/,
|
349
|
-
/ADD_?MY_?EMAIL/,
|
350
|
-
/CONTACT_?INFORMATION/
|
351
|
-
add_contact_information
|
352
|
-
# =================================================================== #
|
353
|
-
# === ADD_GOBOLINUX_LINK
|
354
|
-
# =================================================================== #
|
355
|
-
when /^ADD_GOBOLINUX_LINK$/,
|
356
|
-
/^GOBOLINUX_IS_AWESOME$/
|
357
|
-
add_gobolinux_badge
|
358
|
-
# =================================================================== #
|
359
|
-
# === ADD_RUBY_LOGO_AND_TIMESTAMP
|
360
|
-
#
|
361
|
-
# This entry point combines two method-calls. This is the correct
|
362
|
-
# combination and order, too.
|
363
|
-
# =================================================================== #
|
364
|
-
when /^ADD_RUBY_LOGO_AND_TIMESTAMP$/,
|
365
|
-
/^MY_MAIN_HEADER$/,
|
366
|
-
/^ADD_DEFAULT_HEADER$/
|
367
|
-
add_badge
|
368
|
-
add_time_stamp
|
369
|
-
# =================================================================== #
|
370
|
-
# === ADD_BADGE
|
371
|
-
#
|
372
|
-
# Add a ruby badge to the autogenerated README.md file.
|
373
|
-
# =================================================================== #
|
374
|
-
when 'ADD_BADGE',
|
375
|
-
'DEFAULT_RUBY_HEADER',
|
376
|
-
'ADD_RUBY_HEADER',
|
377
|
-
'ADD_RUBY_BADGE',
|
378
|
-
/ADD_?RUBY_?BADGES/,
|
379
|
-
/ADD_?GOBOLINUX_?AND_?RUBY_?HEADER/,
|
380
|
-
/ADD_?DEFAULT_?HEADER/,
|
381
|
-
/RUBY_?HEADER/,
|
382
|
-
/ADD_?RUBY_?HEAD/,
|
383
|
-
/GOBOLINUX_?IS_?GREAT/,
|
384
|
-
/ADD(_|-)?MAIN(_|-)?HEADER/i
|
385
|
-
add_badge
|
386
|
-
# =================================================================== #
|
387
|
-
# === This will tap into RBT, to show which programs were last
|
388
|
-
# updated.
|
389
|
-
# =================================================================== #
|
390
|
-
when /^INSERT_THE_LAST_UPDATED_PROGRAMS_HERE$/
|
391
|
-
add_string_showing_the_last_updated_programs
|
392
|
-
# =================================================================== #
|
393
|
-
# === Handle files that begin with MACRO or INCLUDE_FILE
|
394
|
-
# =================================================================== #
|
395
|
-
when /^MACRO read_file (.+)$/,
|
396
|
-
/^INCLUDE_FILE (.+)$/,
|
397
|
-
/^embed_this_file (.+)$/
|
398
|
-
this_file = $1.to_s.dup
|
399
|
-
try_to_add_the_content_of_this_file(this_file)
|
400
|
-
# =================================================================== #
|
401
|
-
# === Handle the donate-macro next
|
402
|
-
# =================================================================== #
|
403
|
-
when /^DONATE_MACRO$/
|
404
|
-
add_text_for_the_donate_macro
|
405
|
-
# =================================================================== #
|
406
|
-
# === ADD_ENVIRONMENT_INFORMATION_PROPERLY_FORMATTED_ARRAY
|
407
|
-
# =================================================================== #
|
408
|
-
when /^ADD_?ENVIRONMENT_?INFORMATION_?PROPERLY_?FORMATTED_?ARRAY$/i
|
409
|
-
add_environment_information_properly_formatted_array
|
410
|
-
# =================================================================== #
|
411
|
-
# === Handle RBT-specific macros next
|
412
|
-
# =================================================================== #
|
413
|
-
when /^MACRO RBT\.(.+)$/
|
414
|
-
require 'rbt' # In this case, just load the whole RBT project.
|
415
|
-
# ================================================================= #
|
416
|
-
# The next line of code is equivalent to:
|
417
|
-
# RBT.will_install_which_binaries?
|
418
|
-
# ================================================================= #
|
419
|
-
if RBT.respond_to? $1.to_s.to_sym
|
420
|
-
result = RBT.send($1.to_s.to_sym)
|
421
|
-
if result.is_a? Array # ← should always be an Array, but still, if check seems fine
|
422
|
-
result = result.map {|entry| entry.prepend(' ') }.join(N)
|
423
|
-
end
|
424
|
-
add(result) # ← Add it here.
|
425
|
-
else
|
426
|
-
e 'RBT does not respond to '+$1.to_s.to_sym.to_s+'().'
|
427
|
-
end
|
428
|
-
else
|
429
|
-
add(line)
|
430
|
-
end
|
431
|
-
}
|
432
|
-
else
|
433
|
-
opne "No file called #{sfile(_)} could be found."
|
434
|
-
end
|
435
|
-
end
|
436
|
-
|
437
|
-
# ========================================================================= #
|
438
|
-
# === add_contextfree_art_disclaimer
|
439
|
-
# ========================================================================= #
|
440
|
-
def add_contextfree_art_disclaimer
|
441
|
-
@_ << "(The <b>above image</b> was <b>partially autogenerated</b> "\
|
442
|
-
"using <b>cfdg rules</b>. See this fine project here for "\
|
443
|
-
"more information pertaining to the <b>autogeneration</b> of "\
|
444
|
-
"such - or similar - images: "\
|
445
|
-
"**https://www.contextfreeart.org/gallery/**)\n"
|
446
|
-
end
|
447
|
-
|
448
|
-
# ========================================================================= #
|
449
|
-
# === add_licence_is_MIT (MIT tag)
|
450
|
-
#
|
451
|
-
# This will add the MIT licence to the readme.
|
452
|
-
# ========================================================================= #
|
453
|
-
def add_licence_is_MIT
|
454
|
-
@_ << "
|
455
|
-
## Licence
|
456
|
-
|
457
|
-
The licence for this gem is the MIT licence.
|
458
|
-
|
459
|
-
Basically the most important part of the MIT licence is that, aside
|
460
|
-
from you being able to use the project as you see fit, is the no
|
461
|
-
warranty disclaimer to avoid any potential misuse from the use
|
462
|
-
of the software at hand.
|
463
|
-
|
464
|
-
You can read up on this licence here:
|
465
|
-
|
466
|
-
https://opensource.org/licenses/MIT
|
467
|
-
|
468
|
-
The usual copyright assignment is:
|
469
|
-
|
470
|
-
Copyright #{current_year?} Robert Heiler
|
471
|
-
|
472
|
-
"
|
473
|
-
end; alias use_the_mit_licence add_licence_is_MIT # === use_the_mit_licence
|
474
|
-
|
475
|
-
# ========================================================================= #
|
476
|
-
# === add_contact_information
|
477
|
-
# ========================================================================= #
|
478
|
-
def add_contact_information
|
479
|
-
@_ << "
|
480
|
-
## Contact information and mandatory 2FA (no longer) coming up in 2022 / 2023
|
481
|
-
|
482
|
-
If your creative mind has ideas and specific suggestions to make this gem
|
483
|
-
more useful in general, feel free to drop me an email at any time, via:
|
484
|
-
|
485
|
-
shevy@inbox.lt
|
486
|
-
|
487
|
-
Before that email I used an email account at Google gmail, but in **2021** I
|
488
|
-
decided to slowly abandon gmail, for various reasons. In order to limit the
|
489
|
-
explanation here, allow me to just briefly state that I do not feel as if I
|
490
|
-
want to promote any Google service anymore when the user becomes the end
|
491
|
-
product (such as via data collection by upstream services, including other
|
492
|
-
proxy-services). My feeling is that this is a hugely flawed business model
|
493
|
-
to begin with, and I no longer wish to support this in any way, even if
|
494
|
-
only indirectly so, such as by using services of companies that try to
|
495
|
-
promote this flawed model.
|
496
|
-
|
497
|
-
In regards to responding to emails: please keep in mind that responding
|
498
|
-
may take some time, depending on the amount of work I may have at that
|
499
|
-
moment. So it is not that emails are ignored; it is more that I have not
|
500
|
-
(yet) found the time to read and reply. This means there may be a delay
|
501
|
-
of days, weeks and in some instances also months. There is, unfortunately,
|
502
|
-
not much I can do when I need to prioritise my time investment, but I try
|
503
|
-
to consider <b>all</b> feedback as an opportunity to improve my projects
|
504
|
-
nonetheless.
|
505
|
-
|
506
|
-
In <b>2022</b> rubygems.org decided to make 2FA mandatory for every
|
507
|
-
gem owner eventually:
|
508
|
-
|
509
|
-
see
|
510
|
-
https://blog.rubygems.org/2022/06/13/making-packages-more-secure.html
|
511
|
-
|
512
|
-
Mandatory 2FA will eventually be extended to all rubygems.org developers and
|
513
|
-
maintainers. As I can not use 2FA, for reasons I will skip explaining here,
|
514
|
-
this means that my projects will eventually be removed, as I no longer
|
515
|
-
have any control over my projects hosted on rubygems.org (because I
|
516
|
-
can not use 2FA).
|
517
|
-
|
518
|
-
At that point, I no longer have any control what is done to my projects
|
519
|
-
since whoever is controlling the gems ecosystem took away our control
|
520
|
-
here. I am not sure at which point ruby became corporate-controlled -
|
521
|
-
that was not the case several years ago, so something has
|
522
|
-
changed.
|
523
|
-
|
524
|
-
Ruby also only allows 2FA users to participate on the issue tracker these
|
525
|
-
days:
|
526
|
-
|
527
|
-
https://bugs.ruby-lang.org/issues/18800
|
528
|
-
|
529
|
-
But this has been reverted some months ago, so it is no longer applicable.
|
530
|
-
Suffice to say that I do not think that we should only be allowed to
|
531
|
-
interact on the world wide web when some 'authority' authenticated us,
|
532
|
-
such as via mandatory 2FA, so I hope this won't come back again.
|
533
|
-
|
534
|
-
Fighting spam is a noble goal, but when it also means you lock out
|
535
|
-
real human people then this is definitely NOT a good situation
|
536
|
-
to be had.
|
537
|
-
|
538
|
-
"
|
539
|
-
end
|
540
|
-
|
541
|
-
# ========================================================================= #
|
542
|
-
# === Roebe::ReadmeGenerator[]
|
543
|
-
# ========================================================================= #
|
544
|
-
def self.[](i = '')
|
545
|
-
new(i)
|
546
|
-
end
|
547
|
-
|
548
|
-
end; end
|
@@ -1,28 +0,0 @@
|
|
1
|
-
#!/usr/bin/ruby -w
|
2
|
-
# Encoding: UTF-8
|
3
|
-
# frozen_string_literal: true
|
4
|
-
# =========================================================================== #
|
5
|
-
# require 'roebe/classes/readme_generator/reset.rb'
|
6
|
-
# =========================================================================== #
|
7
|
-
module Roebe
|
8
|
-
|
9
|
-
class ReadmeGenerator < Base # === Roebe::ReadmeGenerator
|
10
|
-
|
11
|
-
# ========================================================================= #
|
12
|
-
# === reset (reset tag)
|
13
|
-
# ========================================================================= #
|
14
|
-
def reset
|
15
|
-
super()
|
16
|
-
infer_the_namespace
|
17
|
-
try_to_require_the_open_gem
|
18
|
-
# ======================================================================= #
|
19
|
-
# === @open_in_browser
|
20
|
-
# ======================================================================= #
|
21
|
-
@open_in_browser = true
|
22
|
-
# ======================================================================= #
|
23
|
-
# === @_
|
24
|
-
# ======================================================================= #
|
25
|
-
@_ = ''.dup
|
26
|
-
end
|
27
|
-
|
28
|
-
end; end
|
@@ -1,20 +0,0 @@
|
|
1
|
-
#!/usr/bin/ruby -w
|
2
|
-
# Encoding: UTF-8
|
3
|
-
# frozen_string_literal: true
|
4
|
-
# =========================================================================== #
|
5
|
-
# require 'roebe/classes/readme_generator/run.rb'
|
6
|
-
# =========================================================================== #
|
7
|
-
module Roebe
|
8
|
-
|
9
|
-
class ReadmeGenerator < Base # === Roebe::ReadmeGenerator
|
10
|
-
|
11
|
-
# ========================================================================= #
|
12
|
-
# === run (run tag)
|
13
|
-
# ========================================================================= #
|
14
|
-
def run
|
15
|
-
read_dataset_from_gen_file
|
16
|
-
store_the_string
|
17
|
-
generate_html_file_via_kramdown
|
18
|
-
end
|
19
|
-
|
20
|
-
end; end
|
@@ -1,31 +0,0 @@
|
|
1
|
-
#!/bin/bash
|
2
|
-
# =========================================================================== #
|
3
|
-
|
4
|
-
# =========================================================================== #
|
5
|
-
# All variables which are commonly used by LFS.
|
6
|
-
#
|
7
|
-
# source $ROEBERIA/shell_scripts/lfs/lfs_variables.sh
|
8
|
-
#
|
9
|
-
# =========================================================================== #
|
10
|
-
# source /home/x/programming/ruby/src/roebe/lib/roebe/shell_scripts/lfs/lfs_variables.sh
|
11
|
-
# =========================================================================== #
|
12
|
-
# export MNT="/mnt"
|
13
|
-
export MNT="/mnt"
|
14
|
-
export MOUNT="$MNT"
|
15
|
-
export LFS="$MOUNT/lfs"
|
16
|
-
export DEV="/dev"
|
17
|
-
export LFS_PARTITION="$DEV/sdb1" # This setting will define your LFS Partition.
|
18
|
-
export LFS_TMP="$LFS/temp"
|
19
|
-
export LFS_PROGRAMS="$LFS/home/Programs"
|
20
|
-
# export LFS_SOURCES="$LFS/home/x/SRC"
|
21
|
-
export LFS_SOURCES="$LFS/sources"
|
22
|
-
export LFS_SOURCE="$LFS_SOURCES"
|
23
|
-
export LFS_TOOLS="$LFS/tools" #
|
24
|
-
export LFS_SWAP="$DEV/sdb2"
|
25
|
-
export LFS_TEMP="$LFS/temp"
|
26
|
-
export MY_SRC="/home/x/src/"
|
27
|
-
|
28
|
-
# =========================================================================== #
|
29
|
-
# The next variable has to be manually updated:
|
30
|
-
# =========================================================================== #
|
31
|
-
export LFS_BACKUP="$LFS/last_backup/"
|