Class: Studium::ShowLecturesOnTheCommandline

Inherits:
Base
  • Object
show all
Includes:
WebConstants
Defined in:
lib/studium/utility_scripts/show_lectures_on_the_commandline/show_lectures_on_the_commandline.rb

Constant Summary collapse

ALSO_SHOW_URL =
#

ALSO_SHOW_URL

If this constant is set to true then this class will also show the URL to the target course.

#
true
IMAGE_FOR_THE_COMPLETED_MODULE =
#

Studium::ShowLecturesOnTheCommandline::IMAGE_FOR_THE_COMPLETED_MODULE

This constant resides here because it is only used by this .rb file.

#
'<img src="/home/x/data/images/studium/COMPLETED_MODULE.png" '\
'style="margin-left: 1em; border: 3px solid black">'.dup

Constants included from WebConstants

WebConstants::BR, WebConstants::TIMETABLE_DIV

Constants inherited from Base

Base::COMMON_YEAR_DAYS_IN_MONTH, Base::LEFT_PADDING, Base::NAMESPACE, Base::N_CHARACTERS_PER_LINE

Constants included from Colours

Colours::COLOURS

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#add_proper_year_entry_to_this_line, #already_solved_this_lva_number?, #append_what_into, #available_topics_as_short_name, #average_grade, #bachelor_master_or_diploma, #be_silent, #be_verbose?, #beautiful_url, #change_directory, #cheering_person, #chmod, #cliner, #colour_for_ects_points, #colourize_percentage, #convert_this_array_of_lectures_into_the_full_dataset, #copy, #course_filter, #cpruby, #create_directory, #create_file, #csv_file?, #current_month?, #current_semester?, #datum?, #day_month_year, #debug?, #delete_file, #directory_of_the_exam_topics?, #directory_to_my_exam_topics, #directory_to_the_exam_topics?, #disable_colours, #disable_colours_globally, #do_not_be_verbose, #do_not_use_opn, #do_these_curricula_include_both_a_bachelor_and_a_master_curriculum?, #does_this_line_include_a_german_weekday?, #does_this_line_include_a_html_colour?, #does_this_line_include_an_english_weekday?, #does_this_line_start_with_a_german_weekday?, #e, #ecomment, #editor?, #ee, #egrey, #enable_colours, #enable_colours_globally, #enable_debug, #encoding?, #english_to_german_weekday, #ensure_that_a_base_directory_exists_for_this_file, #ensure_that_the_log_directory_exists, #eparse, #esystem, #etomato, #exit_program, #extract_dd_mm_yyyy, #fetch_this_curriculum, #file_important_exams?, #file_lecture_information?, #file_passed_exams_per_month, #file_read_with_proper_encoding, #filter_away_already_answered_questions, #filter_away_invalid_questions, #filter_for_all_passed_exams, #find_corresponding_exam_topic, #from_curriculum_id_to_university, #german_date_notation, #german_weekday?, #german_weekdays?, #german_weekend_for?, #german_yes_or_no, #has_a_bachelor_and_a_master_curriculum?, #has_a_bachelor_curriculum?, #has_a_master_curriculum?, #has_lva_dates_registered?, #has_this_exam_topic_been_solved?, #has_year_entry?, #hh_mm_ss_dd_mm_yyyy, #horizontal_bar?, #html_log_directory?, #infer_the_namespace, #initialize_the_internal_hash, #internal_hash?, #is_a_master_lecture?, #is_a_registered_curriculum?, #is_a_weekday?, #is_connected_to_the_www?, #is_german_weekday?, #is_on_roebe?, #is_prüfungsimmanent?, #is_this_a_registered_exam_topic?, #is_this_a_valid_html_colour?, #is_this_day_today?, #konsole_support?, #last_file?, #lectures_from_indi1, #lectures_from_indi2, #lectures_from_indi3, #lectures_from_indi4, #lectures_from_the_bachelor_genetik_curriculum, #lectures_from_the_individual_vektor_curricula, #left_arrow?, #load_yaml_dataset, #map_input_to_this_curriculum_filename, #move_file, #n_days_difference_from_today_to_this_day, #n_seconds_to_n_days, #namespace?, #no_ext_name, #no_file_exists_at, #number_to_month, #obtain, #obtain_lectures_from_this_curriculum, #open_in_browser, #open_in_editor, #opne, #opnerev, #padded_current_month?, #parse_dd_mm_yyyy, #parse_this_line_for_date_entry, #path_to_exam_topic?, #project_yaml_directory?, #rds, #read_dataset_from_a_curriculum_file, #read_in_exam_dataset_from_this_file, #read_this_file_with_default_encoding, #readlines_from_this_input_file, #register_sigint, #remove_empty_strings, #remove_escape_sequences, #remove_internal_comments, #remove_leading_comments, #remove_leading_weekday_names_from, #remove_newlines, #remove_tags_from_this_input, #rename_kde_konsole_tab, #rename_konsole_tab?, #replace_all_html_colours_in_this, #replace_bold_token_with_default_colour, #replace_italic_token_with_default_colour, #replace_italic_token_with_this_colour, #replace_regular_numbers_with_unicode_numbers, #replace_underline_token_with_default_colour, #replace_underline_token_with_this_colour, #require_open_uri, #reset_the_internal_state, #return_all_bachelor_lectures, #return_all_exams_on_this_day, #return_all_numbers_from, #return_all_registered_curricula, #return_all_steop_lectures, #return_current_year, #return_dataset_for_this_topic, #return_dataset_from_this_curriculum_file, #return_dd_mm_yy_and_time_from, #return_directory_for, #return_ects_points_from_these_lectures, #return_either_grey_or_the_custom_colour_for_answers, #return_either_grey_or_the_custom_colour_for_questions, #return_file_for_this_curriculum, #return_german_name_for_this_english_month, #return_german_weekday_of?, #return_hh_mm_ss_from, #return_hour_from_this, #return_lectures_from_bachelor_vektor_curriculum, #return_lectures_with_at_the_least_one_upcoming_exam, #return_local_path_of_this_pwdstud, #return_lva_number_of_this_lecture, #return_month_fitting_to_this_input, #return_n_days_until_monday, #return_n_days_until_sunday, #return_n_exam_questions_in, #return_n_questions_were_answered_for_this_topic, #return_name_of_the_weekday, #return_name_of_this_curriculum, #return_name_of_this_curriculum_based_on_its_id_number, #return_opnn, #return_passed_courses, #return_pwd, #return_random_curriculum, #return_sanitized_dataset_from_the_file_lecture_information, #return_solved_lectures, #return_steop_lectures, #return_the_remote_homepage_url, #return_this_line_has_n_characters_as_html_colour_tags, #return_title_from_this_curriculum_file, #right_arrow?, #rinstall2, #roebe_exam_directory?, #roebe_path_to_file_lecture_information?, #ruby_src_dir_at_home?, #sanitize_this_topic, #sanitize_url, #select_for_prüfungsimmanente_LVs, #select_lectures_with_this_key, #set_be_verbose, #set_this_cd_alias_to, #set_xorg_buffer, #sfancy, #shall_we_make_use_of_unicode_symbols?, #show_todays_date, #silently_open_in_browser, #simp, #sort_these_lecture_names_by_time, #spacer, #studium_log_dir?, #this_month_has_n_days?, #total_ects_points_passed, #translate_dd_mm_yyyy_to_weekday, #try_to_require_html_templates, #try_to_require_the_open_gem, #try_to_require_the_rcfiles, #try_to_require_the_verbose_truth_gem, #turn_this_array_into_the_full_dataset, #unicode_blocks_line, #use_colours?, #use_opn?, #vertical_bar?, #web_liner, #weekday?, #weekdays?, #word_wrap, #write_what_into, #www_connection_is_unavailable, #yaml_dir?, #yellowrev, #yes_or_no

Methods included from RunmodeModule

#commandline?, #runmode?, #set_commandline_mode, #set_runmode, #set_www_mode, #www_mode?

Methods included from CommandlineArgumentsModule

#commandline_arguments?, #commandline_arguments_joined, #commandline_arguments_with_hyphens?, #commandline_arguments_without_leading_hyphens?, #first_argument?, #first_non_hyphen_argument?, #reset_the_commandline_arguments, #set_first_argument

Methods included from HtmlColoursModule

#aquamarine, #blanchedalmond, #brown, #cadetblue, #chocolate, #coral, #cornflowerblue, #crimson, #cyan, #darkblue, #darkcyan, #darkgoldenrod, #darkgreen, #darkkhaki, #darkolivegreen, #darkorange, #darkred, #darkseagreen, #darkslateblue, #darkslategray, #darkturquoise, #deepskyblue, #firebrick, #forestgreen, #gold, #goldenrod, #green, #grey, #indianred, #khaki, #lavender, #lawngreen, #lightblue, #lightcoral, #lightgreen, #lightred, #lightseagreen, #lightskyblue, #lightslategray, #lightslategrey, #lime, #limegreen, #mediumaquamarine, #mediumblue, #mediumpurple, #mediumseagreen, #mediumslateblue, #mediumspringgreen, #mediumturquoise, #mediumvioletred, #mintcream, #moccasin, #oldlace, #olive, #olivedrab, #orange, #orangered, #orchid, #palegoldenrod, #palegreen, #paleturquoise, #palevioletred, #peru, #plum, #powderblue, #red, #rosybrown, #royalblue, #saddlebrown, #salmon, #sandybrown, #seagreen, #sienna, #silver, #skyblue, #slateblue, #slategray, #springgreen, #steelblue, #tan, #teal, #thistle, #tomato, #turquoise, #violet, #whitesmoke, #yellow, #yellowgreen

Methods included from Colours

#bold_blue, #bold_red, #bold_yellow, cadetblue, #cadetblue, #chartreuse, #coral, coral, #cornflowerblue, cornflowerblue, crimson, #cyan, cyan, darkgoldenrod, #darkgoldenrod, #darkgray, darkgreen, darkolivegreen, darkseagreen, #darkslateblue, darkslateblue, #darkslategray, darkslategray, #darkturquoise, darkturquoise, #deepskyblue, deepskyblue, default_colour, #dimgray, disable_colours, #dodgerblue, e, #efancy, enable_colours, #erev, #ewarn, #forestgreen, forestgreen, gold, #goldenrod, goldenrod, #grey, grey, indianred, #indianred, khaki, #khaki, lawngreen, #lawngreen, lightblue, lightgreen, lightsalmon, #lightseagreen, lightseagreen, lightskyblue, #lightskyblue, #lightslategray, lightslategray, #lightsteelblue, lime, #lime, limegreen, #limegreen, #mediumaquamarine, mediumaquamarine, #mediumorchid, #mediumpurple, mediumpurple, #mediumseagreen, mediumseagreen, #mediumslateblue, mediumslateblue, #mediumspringgreen, mediumspringgreen, #mediumturquoise, mediumturquoise, #oldlace, olive, #olive, olivedrab, #olivedrab, orange, orangered, #orchid, orchid, palegreen, #palegreen, paleturquoise, #paleturquoise, palevioletred, #papayawhip, peru, #peru, plum, #plum, #powderblue, powderblue, rev, #rev?, royalblue, saddlebrown, #saddlebrown, #sandybrown, sandybrown, sdir, #sdir, seagreen, #seagreen, sfancy, #sfancy, sfile, #sfile, #simp, simp, #skyblue, skyblue, slateblue, #slategray, slategray, springgreen, #springgreen, #steelblue, steelblue, #swarn, swarn, #tan, tan, teal, #teal, #tomato, tomato, turquoise, use_colours?, use_this_colour_for_exam_answers, use_this_colour_for_exam_questions, #yellow, yellowgreen, #yellowgreen

Constructor Details

#initialize(commandline_arguments = [], run_already = true) ⇒ ShowLecturesOnTheCommandline

#

initialize

#


1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
# File 'lib/studium/utility_scripts/show_lectures_on_the_commandline/show_lectures_on_the_commandline.rb', line 1325

def initialize(
    commandline_arguments = [],
    run_already           = true
  )
  reset
  case commandline_arguments
  # ======================================================================= #
  # === :do_not_run_yet
  # ======================================================================= #
  when :do_not_run_yet
    commandline_arguments = nil
    run_already = false
  end
  set_commandline_arguments(
    commandline_arguments
  )
  case run_already
  # ======================================================================= #
  # === :do_not_run_yet
  # ======================================================================= #
  when :do_not_run_yet
    run_already = false
  end
  # ======================================================================= #
  # === Handle blocks given to this class
  # ======================================================================= #
  if block_given?
    yielded = yield
    case yielded
    # ===================================================================== #
    # === :do_not_run_yet
    # ===================================================================== #
    when :do_not_run_yet
      run_already = false
    # ===================================================================== #
    # === :www
    # ===================================================================== #
    when :www
      set_www_mode
    end
  end
  run if run_already
end

Class Method Details

.[](commandline_arguments = ARGV, run_already = true) ⇒ Object

#

Studium::ShowLecturesOnTheCommandline[]

#


3137
3138
3139
# File 'lib/studium/utility_scripts/show_lectures_on_the_commandline/show_lectures_on_the_commandline.rb', line 3137

def self.[](commandline_arguments = ARGV, run_already = true)
  new(commandline_arguments, run_already)
end

Instance Method Details

#add_to_the_dataset_without_any_further_checks(i) ⇒ Object

#

add_to_the_dataset_without_any_further_checks

#


2345
2346
2347
2348
# File 'lib/studium/utility_scripts/show_lectures_on_the_commandline/show_lectures_on_the_commandline.rb', line 2345

def add_to_the_dataset_without_any_further_checks(i)
  @dataset << i
  @dataset.flatten!
end

#check_for_title_entry_in_the_file(this_file = dataset? ) ⇒ Object

#

check_for_title_entry_in_the_file

You can put a line within a curriculum such as:

@title Biologie Basisblock

The method will check for this. However had, you can also avoid using such a title, by having a header section, as a comment, where the second line should contain the title of the lecture.

The latter is the default (and recommended) mode.

#


2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
# File 'lib/studium/utility_scripts/show_lectures_on_the_commandline/show_lectures_on_the_commandline.rb', line 2165

def check_for_title_entry_in_the_file(
    this_file = dataset?
  )
  temporary_dataset = Studium.read_dataset_from_a_curriculum_file(
    this_file,
    :retain_comments
  )
  # ======================================================================= #
  # If the second line in the curriculum-file starts with '# === #'
  #
  # This is recommended for all registered curricula.
  # ======================================================================= #
  if temporary_dataset[1].start_with?('# === ')
    use_this_title = temporary_dataset[1]
    set_title(use_this_title)
  # ======================================================================= #
  # else check for a @title entry
  # ======================================================================= #
  elsif this_file.any? {|line|
      line.start_with? '@title'
    }
    set_title(
      dataset.select {|line| line.start_with? '@title ' }
    )
    # ===================================================================== #
    # In this case, grab the title, and remove that line.
    # So, we will reject all entries that include '@title '.
    # ===================================================================== #
    dataset.reject! {|line| line.start_with? '@title '}
    dataset.compact!
    set_dataset(dataset)
  end
end

#clear_old_datasetObject

#

clear_old_dataset

#


2393
2394
2395
# File 'lib/studium/utility_scripts/show_lectures_on_the_commandline/show_lectures_on_the_commandline.rb', line 2393

def clear_old_dataset
  @dataset = []
end

#consider_generating_a_graphviz_image_displaying_the_modules(use_this_dataset) ⇒ Object

#

consider_generating_a_graphviz_image_displaying_the_modules

#


2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
# File 'lib/studium/utility_scripts/show_lectures_on_the_commandline/show_lectures_on_the_commandline.rb', line 2012

def consider_generating_a_graphviz_image_displaying_the_modules(
    use_this_dataset
  )
  require 'image_paradise/graphviz/generate_graphviz_image.rb'
  copy = use_this_dataset.dup
  copy.map! {|entry|
    if entry.include? '#'
      entry = entry[0 .. ( entry.index('#') - 1 )]
    end
    entry.strip
  }
  copy = turn_this_array_into_the_full_dataset(
    copy.flatten, @lecture_dataset
  )
  # ======================================================================= #
  # Next, we will work on this modified dataset. 
  # ======================================================================= #
  hash_containing_the_module_dependencies = {}
  copy.each_pair {|name_of_the_lecture, inner_hash|
    if inner_hash
      individual_curricula = inner_hash[:individual_curricula]
      if individual_curricula
        selection = individual_curricula.select {|most_inner_hash|
          most_inner_hash[:name_of_the_curriculum].include? @title
        }.first
        if selection
          individual_curriculum_module = selection[:individual_curriculum_module]
          if individual_curriculum_module
            individual_curriculum_module = individual_curriculum_module.first
          end
          individual_curriculum_depends_on_these_modules = selection[:individual_curriculum_depends_on_these_modules]
          hash_containing_the_module_dependencies[individual_curriculum_module] =
            individual_curriculum_depends_on_these_modules
        end
      end
    end
  }
  # ======================================================================= #
  # Next pass this Hash into class GenerateGraphvizImage.
  # ======================================================================= #
  ImageParadise::GenerateGraphvizImage.new(
    hash_containing_the_module_dependencies
  ) { :use_bold_font_and_german }
end

#consider_generating_a_html_file(i = @generate_html_file) ⇒ Object

#

consider_generating_a_html_file (html tag)

This method can generate a .html file. As a consequence it is fairly long and messy.

#


831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
# File 'lib/studium/utility_scripts/show_lectures_on_the_commandline/show_lectures_on_the_commandline.rb', line 831

def consider_generating_a_html_file(
    i = @generate_html_file
  )
  if i
    if is_on_roebe?
      # =================================================================== #
      # Install the project first in this case, so that the regexes
      # are up-to-date. This may take quite some time, so it is better
      # to move this to the end of the method, after the browser
      # has loaded the page. Actually - we can not do this if we
      # want to have up-to-date URLs.
      # =================================================================== #
      Studium.install_the_project_on_the_given_hostsystem
    end
    html_file = "#{log_dir?}html/"\
                "#{title?.to_s.tr(' ','_').delete('(),')}.html"
    _ = ''.dup
    if www_mode?
      # In this case, do not use the <meta> tag and similar entities.
    else
      _ << '<meta charset="UTF-8">'  
      _ << "#{N}<html>#{N}"
      _ << "<head>#{N}"
      _ << "<title>#{title?.to_s}</title>#{N}"
    end
    # ===================================================================== #
    # Add tooltip.css next.
    # ===================================================================== #
    _ << '<link rel="stylesheet" type="text/css" href="../../../programming/ruby/src/cyberweb/lib/cyberweb/cascading_style_sheets/balloon.css">'
    if www_mode?
      # And do nothing as well here.
    else
      _ << "</head>#{N}"
      _ << "<body style=\"font-size: 1.5em; "\
           "font-family: monospace; "\
           "padding: 1px; "\
           "margin: 0px\">#{N}" # <- Open the <body> tax here.
    end
    _ << '<div style="border: 1px solid black; padding:2px;">'
    # ===================================================================== #
    # Add the title of the curriculum next, as a darkblue and bold
    # <h1> tag. An example for such a title may be a String like
    # "Bachelorcurriculum Informatik".
    # ===================================================================== #
    _ << HtmlTags.h1(
      title?.to_s, css_style: 'font-weight: bold; color: darkblue'
    )+N
    remote_url = ::Studium.return_homepage_of_this_lecture(title?.to_s)
    _ << '<b style="margin-left:1em">
    Link to the remote page:
    </b>
    <a style="font-weight: bold; color: darkblue" href="'+remote_url+'">'+title?.to_s+'</a>'
    if show_loaded_from_which_file? and loaded_from_which_file?
      loaded_from_which_file?.each {|this_file|
        _ << '<h2 style="color:slateblue; margin-bottom:4px; margin-left: 0.75em;">
              Loaded from the file:
              </h2>'+N
        _ << '<b style="margin-left:2.0em; font-size:larger; color:blue">'+
              File.basename(this_file)+'</b>
              ( <span style="font-weight: bold; color:steelblue">'+this_file+'</span> )
              <br><br><br>'+N
      }
    end
    hash = {}
    # ===================================================================== #
    # === Iterate over the lectures here
    #
    # Next iterate over all lectures that are part of the curriculum
    # and build up a temporary Hash, with which we will work.
    # ===================================================================== #
    all_lectures?.each {|this_lecture|
      # =================================================================== #
      # raw_name_of_the_lecture will also include the lva-id.
      # =================================================================== #
      if this_lecture.include? '#' # Handle possible comments next.
        raw_name_of_the_lecture = this_lecture[0 .. (this_lecture.index('#')-1)].strip
      else
        raw_name_of_the_lecture = this_lecture.dup
      end
      raw_name_of_the_lecture.squeeze!(' ') # <- Trying this as of March 2018.
      # =================================================================== #
      # === Pointer to the lecture-dataset
      #
      # Obtain a pointer to the lecture dataset next.
      # =================================================================== #
      pointer_to_the_lecture_dataset = @lecture_dataset[raw_name_of_the_lecture]
      outdated_lecture = pointer_to_the_lecture_dataset[:outdated_lecture]
      if pointer_to_the_lecture_dataset.nil?
        next
      end
      if @ignore_outdated_lectures and outdated_lecture
        next 
      end
      hash[raw_name_of_the_lecture] = pointer_to_the_lecture_dataset
    }
    if @this_curriculum_has_n_ects_points_in_total >= 270.0
      @individual_curriculum = false
      # ^^^ ad-hoc hack.
    end
    # ===================================================================== #
    # === Handle modules of an individual curriculum
    #
    # Next, if we have an individual curriculum, we will use a slightly
    # different way to order the modules. How is it determined whether
    # the given curriculum at hand is an individual one? We will
    # simply use @individual_curriculum.
    # ===================================================================== #
    if @individual_curriculum
      new_hash = ::Studium::SortedIndividualCurricula.new(hash, name_of_the_curriculum?)
      # =================================================================== #
      # Rewrite the variable called `hash` next.
      # =================================================================== #
      hash.clear
      max_value = new_hash.max?
      max_value = 100000 if max_value.nil?
      max_value = 100000 if max_value > 100000 # Some bug was found on June 2022. Slight hack...
      (1 .. max_value).each {|module_number|
        pointer = new_hash[module_number]
        if pointer.nil?
          opne 'A nil-value was found for module number '+
                  steelblue(module_number)+'.'
          # e
          # e 'The hash was:'
          # e
          # pp new_hash
          # e
        end
        pointer.each {|name_of_the_lecture, inner_hash|
          hash[name_of_the_lecture] = inner_hash
        } if pointer
      }
    end
    @name_of_the_individual_curriculum_module = ''.dup
    index = 0
    # ===================================================================== #
    # === Iterate over all lectures
    #
    # Next, iterate over all lectures. An individual entry may look
    # like this:
    #
    #   185.A47 Physiologie und Grundlagen der Pathologie # 4.5 ECTS, VO, TU WIEN
    #
    # Because we may want to sort the dataset according to individual
    # modules, we will first sort that dataset completely, before
    # proceeding.
    # ===================================================================== #
    hash.each_pair {|this_lecture, pointer_to_the_lecture_dataset| index += 1
      splitted = this_lecture.split(' ')
      lva_id = splitted.first # Obtain the ID of the lva.
      # =================================================================== #
      # The variable `name_of_the_lecture` contains just the name of
      # the lecture alone, without leading LVA ID number.
      # =================================================================== #
      name_of_the_lecture = splitted[1..-1].join(' ').strip
      # =================================================================== #
      # Next, determine some helper-variables. Since as of July 2018
      # we will try another approach to obtain the specific entries of
      # our main Hash, via a more generic method called obtain().
      # =================================================================== #
      n_ects_points      = obtain(:ects,               pointer_to_the_lecture_dataset)
      university         = obtain(:university,         pointer_to_the_lecture_dataset)
      lecture_type       = obtain(:type,               pointer_to_the_lecture_dataset)
      bereits_absolviert = obtain(:already_solved,     pointer_to_the_lecture_dataset)
      curricula          = obtain(:curricula,          pointer_to_the_lecture_dataset)
      is_a_steop_lecture = obtain(:is_a_steop_lecture, pointer_to_the_lecture_dataset)
      semester           = obtain(:semester,           pointer_to_the_lecture_dataset).to_s # Must have .to_s due to nil-values.
      if pointer_to_the_lecture_dataset.has_key? :homepage
        # ================================================================= #
        # In this case everything is fine. We will continue.
        # ================================================================= #
      else
        e crimson('The lecture `')+
          sfancy(this_lecture)+
          crimson('` does not have a registered')
        e crimson('remote homepage entry.')
        open_this_in_the_browser = false
        if open_this_in_the_browser and
           is_on_roebe? and
           commandline_mode?
          # =============================================================== #
          # On my home system we will batch-open these in the browser.
          # This will only work if they are registered in BeautifulUrl
          # though. It will thus not work for every lecture, but it may
          # work for many lectures, which can thus be updated.
          # =============================================================== #
          e crimson('Opening the URL to this lecture in the editor now, so that')
          e crimson('this erroneous entry can be corrected.')
          this_url = Studium.return_remote_homepage_of_this_lecture(this_lecture)
          if this_url != this_lecture # Means we found something.
            Studium.open_this_remote_url(this_url)
            sleep(0.75)
          end
        end
      end
      # =================================================================== #
      # === 15.04.2019
      #
      # Since as of 15.04.2019, we will tap into the method
      # Studium.return_homepage_of_this_lecture() to determine
      # the remote URL.
      #
      # In the past we used the BeautifulUrl for this, but it is better
      # to make use of the automatically generated regexp-case-when menu,
      # residing in the file called
      # 'regexes_for_the_registered_lectures.rb'.
      # =================================================================== #
      use_this_as_remote_url = ::Studium.return_homepage_of_this_lecture(this_lecture)
      case semester
      when 'both'
        semester = 'Sommer / Winter'
      when 'winter'
        semester = 'Winter'
      when 'summer'
        semester = 'Sommer'
      end
      # =================================================================== #
      # Also add this to the hash that contains the lectures. We could
      # use `this_lecture` as key, but I prefer the name alone, without
      # leading lva id. Note that this would, in theory, conflict if we
      # have lectures that have the same name but a different LVA ID.
      # =================================================================== #
      @hash_containing_the_lectures_for_this_curriculum[name_of_the_lecture] =
        pointer_to_the_lecture_dataset
      @hash_containing_the_lectures_for_this_curriculum[name_of_the_lecture].update(
        remote_url: use_this_as_remote_url
      )
      bereits_absolviert = ja_oder_nein(bereits_absolviert)
      case bereits_absolviert
      when 'Ja'
        colourized_bereits_absolviert = '<b style="color:green">'+bereits_absolviert
        # ================================================================= #
        # Also append the date when this exam has been completed
        # successfully.
        # ================================================================= #
        on_which_date = @hash_containing_the_lectures_for_this_curriculum[name_of_the_lecture][:already_solved_at].to_s
        colourized_bereits_absolviert <<
          ", absolviert am</b> <b style=\"color:darkgreen\">#{on_which_date}</b>"
      else
        colourized_bereits_absolviert = '<b style="color:red">'+bereits_absolviert+'</b>'
      end
      # =================================================================== #
      # === Check special-content for the individual curriculum
      # =================================================================== #
      if individual_curriculum? and
         pointer_to_the_lecture_dataset.has_key?(:individual_curricula) and
         pointer_to_the_lecture_dataset[:individual_curricula].has_key?(:individual_curriculum_module)
        individual_curriculum_module  = pointer_to_the_lecture_dataset[:individual_curricula][:individual_curriculum_module]
        name_of_the_curriculum_module = pointer_to_the_lecture_dataset[:individual_curricula][:name_of_the_curriculum_module]
        if individual_curriculum_module.is_a? Array
          individual_curriculum_module = individual_curriculum_module.first
        end
        if @name_of_the_individual_curriculum_module != individual_curriculum_module 
          @name_of_the_individual_curriculum_module = individual_curriculum_module
          # =============================================================== #
          # Next we will show the name of the Module at hand. This will
          # be done only for lectures that are part of an individual
          # curriculum. We also need to determine the name of the
          # curriculum.
          # =============================================================== #
          # n_ects_in_this_module = Studium.return_n_ects_in_this_module(
          #   @name_of_the_individual_curriculum_module,
          #   individual_curriculum_module,
          #   :use_what_is_best # <- Not ideal for speed-reasons, but for now this must suffice.
          # )
          # n_ects_in_this_module = '<span style="color: darkgreen">('+
          #                          n_ects_in_this_module.to_s+
          #                          ' ECTS)</span>'
          # ^^^ we tried this on 31.12.2019, but it does not work very well.
          _ << '<h1><b style="color:midnightblue">Module</b> '\
               '<span style="color:#510042">'+
               @name_of_the_individual_curriculum_module+
               '</span> '+
               '<b style="color:midnightblue">'+
               name_of_the_curriculum_module.strip+
               '</b>'
          n_ects_in_that_module = ::Studium.return_n_ects_in_that_module(
            title?,
            @name_of_the_individual_curriculum_module,
            @lecture_dataset
          )
          # =============================================================== #
          # Show how many ECTS points are in that module.
          # =============================================================== #
          _ << " <span style=\"font-size:0.8em\">[#{n_ects_in_that_module} ECTS in this module]</span>"
          # =============================================================== #
          # Since as of 29.02.2020 we will also notify whether we have
          # completed this module or whether we have not.
          # =============================================================== #
          if ::Studium.query_based_on_curriculum_title_whether_this_module_been_completed(
              title?,
              @name_of_the_individual_curriculum_module,
              @lecture_dataset
            )
            _ << IMAGE_FOR_THE_COMPLETED_MODULE.dup
          end
          # =============================================================== #
          # And close the header-tag as well.
          # =============================================================== #
          _ << '</h1>' # + n_ects_in_this_module
        end
      end
      # =================================================================== #
      # Add the university-logo as well. This image can also be clicked
      # on via a <a href=""> tag.
      # =================================================================== #
       = return_proper_logo_for_this_university(university)
      # clickable_logo = '<a href="'+return_remote_url(this_lecture)+'">'+clickable_logo+'</a>'
      # ^^^ disabled the above as of 16.04.2019
       = '<a href="'+use_this_as_remote_url+'">'++'</a>'
      _ << '<span style="margin-left:2.0em">'+
           
      # =================================================================== #
      # If it is a STEOP lecture then a special "STEOP image" will be
      # shown.
      # =================================================================== #
      if is_a_steop_lecture
        _ << Studium.relative_steop_picture # return_proper_logo_for_this_university(:steop_picture)
      end
      # =================================================================== #
      # Next, we add the name of the lecture. This can either be
      # `this_lecture`, which will include the lecture-id,
      # or `name_of_the_lecture`, which will NOT include the lecture-id.
      # =================================================================== #
      if bereits_absolviert == 'Nein'
        # ================================================================= #
        # In this case we will use slightly different colours.
        # ================================================================= #
        bold_name_of_the_lecture = '<b style="font-size:larger; color: navy">'+
          this_lecture+
        '</b>'
      else # this is the default
        bold_name_of_the_lecture = '<b style="font-size:larger">'+
          this_lecture+
        '</b>'
      end
      _ << " Lehrveranstaltung <b>##{index}</b>:</span> "+
           bold_name_of_the_lecture+
           ', Bereits <b>absolviert</b>? <span style="font-size:larger">'+
            colourized_bereits_absolviert+'</span>'\
           ' (LVA Nummer: <b>'+lva_id.to_s+'</b>; '\
           'ECTS: <b>'+n_ects_points.to_s+'</b>; '\
           'Lecture Type: <b>'+lecture_type+'</b>; '\
           'Semester: <b>'+semester+'</b>; '
      _ << "University: <b>#{university}</b>) "
      # =================================================================== #
      # Add bachelor-or-master lecture next but only for unsolved
      # lectures.
      # =================================================================== #
      if bereits_absolviert == 'Nein'
        _ << (curricula)
      end
      # =================================================================== #
      # Next check whether the lecture is a practical course. If it is we
      # will add a certain image, but only if it is NOT yet solved.
      # =================================================================== #
      if is_this_lecture_a_practical_course?(lecture_type) and
         (bereits_absolviert == 'Nein')
        _ << PRACTICAL_COURSE_IMAGE
      end
      _ << "#{HtmlTags::BR}#{N}"
      # =================================================================== #
      # If the lecture has not been solved yet, we will show the remote
      # URL. However had, via the commandline flag --show-all-URLs this
      # can be overruled.
      # =================================================================== #
      shall_we_show_the_url = false
      if @show_all_URLs or (bereits_absolviert == 'Nein')
        shall_we_show_the_url = true
      end
      # =================================================================== #
      # === Show the associated URL to the given lecture.
      # =================================================================== #
      if shall_we_show_the_url
        this_url = ::Studium.return_homepage_of_this_lecture(this_lecture)
        _ << return_arrow_pointing_to_the_right_side('3em')
        _ << '<a style="margin-left: 5em; font-size: larger; font-weight:bold" href="'+this_url+'">'+
             this_url+
             '</a>'+BR+N
        # ================================================================= #
        # === Show Moodle entries
        #
        # Since as of 28.10.2019 we will also display the Moodle link
        # to this course.
        # ================================================================= #
        url_to_moodle = ::Studium.return_remote_moodle_link_of_this_lecture(this_lecture)
        _ << return_arrow_pointing_to_the_right_side('3em')
        if (url_to_moodle == this_lecture) and !url_to_moodle.include?('http')
          url_to_moodle = '[No remote URL for Moodle is known for this course.]'
          _ << '<span style="margin-left: 5em; font-size: larger; font-weight:bold; color: darkblue" href="'+url_to_moodle+'">'+
               url_to_moodle+
               '</span>'+BR+N
        else
          _ << '<a style="margin-left: 5em; font-size: larger; font-weight:bold" href="'+url_to_moodle+'">'+
               url_to_moodle+
               '</a>'+BR+N
        end
        # ================================================================= #
        # Next, determine when the next exam may happen but only do so
        # when the instance variable @show_next_exams is true. We will
        # also NOT do any checking here and simply use the first found
        # entry, if we are instructed to show the next upcoming exams.
        # The user has to update the file lecture_information on his/her
        # own.
        # ================================================================= #
        if @show_next_exams
          if pointer_to_the_lecture_dataset.has_key? 'exams'
            array_upcoming_exams = pointer_to_the_lecture_dataset['exams']
            first_entry = array_upcoming_exams.first
            first_entry = remove_weekdays(first_entry)
            weekday = first_entry
            if weekday.include? ','
              weekday = weekday.split(',').first
            end
            weekday = english_to_german_weekday(
              translate_dd_mm_yyyy_to_weekday(weekday)
            )
            _ << '<span style="font-weight:bold; font-size: larger;margin-left:9em"> ^^^ '+
                 '<b style="color: teal">Next exam:</b> '+
                 weekday+' '+
                 first_entry+'</span>'+BR+N
          end
        end
      end
    }
    # =================================================================== #
    # Next add how many lectures are in this Curriculum.
    # =================================================================== #
    _ << BR+
         return_how_many_lectures_are_in_this_curriculum_and_how_many_of_them_are_already_solved(:use_for_html).join(' ')+N
    _ << BR+BR+
         return_how_many_ects_points_this_curriculum_has_in_total(:no_colours)+'<br>'+N
    _ << BR+
         return_how_many_ects_points_have_been_passed_already(:use_for_html).join(' ')+N
    # =================================================================== #
    # Determine how many lectures are missing still.
    # =================================================================== #
    n_missing_lectures = n_total_lectures?.to_i - n_lectures_completed?
    _ << "#{BR}#{BR}There are still <b>#{n_missing_lectures.to_s}</b> lectures missing "\
         "before this curriculum has been completed successfully."
    # =================================================================== #
    # Next, add average grade, if we are using it at all altogether.
    # =================================================================== #
    if @do_report
      average_grade = return_the_average_grade
      _ << "\n<br><br>The <span style=\"font-weight:800;padding-left:2px; padding-right:2px;background-color: black; color:gold\">average grade</span> "\
           "is: <b style=\"color:darkgreen\">#{average_grade}</b>\n\n<br><br>"
    end
    # =================================================================== #
    # Also add the timetable of upcoming exams next, a html <div>.
    # =================================================================== #
    if @show_next_exams
      _ << "#{return_timetable_of_upcoming_exams}#{N}"
    end
    _ << "#{N}</div>"
    _ << @append_this_string_onto_the_html_string
    # =================================================================== #
    # Store into e. g.:
    #   "#{log_dir?}html/#{title?.to_s.tr(' ','_').delete('()')}.html"
    # =================================================================== #
    set_html_string(_)
    _ << "</html>#{N}"
    # =================================================================== #
    # We will only generate a .html file if we are using the commandline
    # variant.
    # =================================================================== #
    if cmdline?
      result = "Next storing into\n".dup
      result << "  `#{sfile(html_file)}`\n"
      also_open_in_the_browser = true
      if also_open_in_the_browser
        result << "\nThat page will be opened via the browser as well."
        opne result
        write_what_into(_, html_file)
        Open.in_browser(html_file) { :be_silent } # Don't show the exact command.
      end
    end
  end
end

#consider_generating_a_spreadsheet(i = @title) ⇒ Object

#

consider_generating_a_spreadsheet

#


2002
2003
2004
2005
2006
2007
# File 'lib/studium/utility_scripts/show_lectures_on_the_commandline/show_lectures_on_the_commandline.rb', line 2002

def consider_generating_a_spreadsheet(
    i = @title
  )
  require 'studium/utility_scripts/generate_spreadsheet/generate_spreadsheet.rb'
  Studium::GenerateSpreadsheet.new(i)
end

#consider_showing_to_which_universities_the_lectures_belong_toObject

#

consider_showing_to_which_universities_the_lectures_belong_to

We should only show as to which university a particular lecture belongs to if it is an individual curriculum. Other curricula all belong to one particular university, so showing the “table” on the commandline is useless.

#


2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
# File 'lib/studium/utility_scripts/show_lectures_on_the_commandline/show_lectures_on_the_commandline.rb', line 2889

def consider_showing_to_which_universities_the_lectures_belong_to
  if @show_to_which_universities_the_lectures_belong_to
    first_argument = @commandline_arguments
    if first_argument.is_a? Array
      first_argument = first_argument.first
    end
    first_argument = first_argument.to_s.delete('-')
    if cmdline?
      e
      e 'The percentage-value of lectures attributed to '\
        'the different'
      e 'universities will be shown next:'
    end
    _ = Studium::LecturesAttributedToUniversities.new(first_argument) {
      :do_not_show_the_title_and_do_not_report
    }
    splitted_html_string = _.html_string.split("\n")
    # ===================================================================== #
    # Also embed this into a little <div> container next:
    # ===================================================================== #
    @append_this_string_onto_the_html_string <<
      '<div style="padding: 0.70em; background-color: black; '\
      'font-size: 1.0em; font-family: monospace;">'
      splitted_html_string.each {|line|
        @append_this_string_onto_the_html_string << "<b>#{line.strip}</b><br>#{N}"
      }
      @append_this_string_onto_the_html_string << '</div>'
    # ===================================================================== #
    # And now we can report our findings, if we are on the commandline.
    # ===================================================================== #
    _.report if cmdline?
  end
end

#dataset?Boolean Also known as: dataset_holding_all_lectures, all_lectures?, lectures?

#

dataset?

#

Returns:

  • (Boolean)


1956
1957
1958
# File 'lib/studium/utility_scripts/show_lectures_on_the_commandline/show_lectures_on_the_commandline.rb', line 1956

def dataset?
  @dataset
end

#determine_from_which_files_to_read(i = FILE_MASTER_VEKTORX, type_of_the_curriculum = :bachelor) ⇒ Object Also known as: determine_from_which_file_to_read

#

determine_from_which_files_to_read

This method will also assign towards the instance variables The available curricula are stored within file_constants.rb in the studium/constants/ subdirectory.

#


57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
# File 'lib/studium/utility_scripts/show_lectures_on_the_commandline/show_lectures_on_the_commandline.rb', line 57

def determine_from_which_files_to_read(
    i                      = FILE_MASTER_VEKTORX, # Default entry comes here.
    type_of_the_curriculum = :bachelor
  )
  # ======================================================================= #
  # The following case/when menu describes where we can find the
  # curriculum file and what "type", e. g. bachelor or master,
  # it is.
  # ======================================================================= #
  case i # case tag
  # ======================================================================= #
  # === :master_bioinformatics_and_nanobiotechnology_in_molecular_medicine
  # ======================================================================= #
  when :master_bioinformatics_and_nanobiotechnology_in_molecular_medicine
    i = return_and_check_file_for_this_curriculum(i)
    is_master_curriculum
    do_show_lecture_attribution_to_universities
  # ======================================================================= #
  # === :master_dummy_curriculum
  #
  # This refers to any dummy curriculum that we may want to test,
  # for master-curricula.
  # ======================================================================= #
  when :master_dummy_curriculum
    i = return_and_check_file_for_this_curriculum(i)
    is_master_curriculum
    do_show_lecture_attribution_to_universities
  # ======================================================================= #
  # === :bachelor_informatik_und_biotechnologie_unter_berücksichtigung_immunanalytisch_molekularmedizinischer_aspekte
  # ======================================================================= #
  when :bachelor_informatik_und_biotechnologie_unter_berücksichtigung_immunanalytisch_molekularmedizinischer_aspekte,
       :bachelor_boku_individuell,
       :indi2
    i = return_and_check_file_for_this_curriculum(i)
    is_bachelor_curriculum
    is_an_individual_curriculum
    do_show_lecture_attribution_to_universities
  # ======================================================================= #
  # === :bachelor_dummy_curriculum
  #
  # This refers to any dummy curriculum that we may want to test.
  # ======================================================================= #
  when :bachelor_dummy_curriculum,
       :dummy
    i = return_and_check_file_for_this_curriculum(i)
    is_bachelor_curriculum
    do_show_lecture_attribution_to_universities
  # ======================================================================= #
  # === :bachelor_individual_bachelor_informatik_und_molekulare_biologie
  # ======================================================================= #
  when :bachelor_individual_bachelor_informatik_und_molekulare_biologie
    i = return_and_check_file_for_this_curriculum(i)
    is_bachelor_curriculum
    is_an_individual_curriculum
    do_show_lecture_attribution_to_universities
  # ======================================================================= #
  # === :bachelor_forstwirtschaft
  # ======================================================================= #
  when :bachelor_forstwirtschaft
    i = return_and_check_file_for_this_curriculum(i)
    is_bachelor_curriculum
    do_show_lecture_attribution_to_universities
  # ======================================================================= #
  # === :bachelor_informatik_und_molekulare_biologie
  # ======================================================================= #
  when :bachelor_informatik_und_molekulare_biologie,
       :bachelor_biologische_informatik,
       :indi3
    i = return_and_check_file_for_this_curriculum(i)
    is_bachelor_curriculum
    is_an_individual_curriculum
    do_show_lecture_attribution_to_universities
  # ======================================================================= #
  # === :master_bioinformatics_and_molecular_biotechnology
  #
  # This refers to the indi4 curriculum.
  # ======================================================================= #
  when :master_bioinformatics_and_molecular_biotechnology,
       :indi4
    i = return_and_check_file_for_this_curriculum(i)
    is_master_curriculum
    is_an_individual_curriculum
    do_show_lecture_attribution_to_universities
  # ======================================================================= #
  # === :bachelor_vektor_curriculum
  # ======================================================================= #
  when :bachelor_vektor_curriculum,
       :bachelor_vektorx_curriculum,
       :indi1
    i = return_and_check_file_for_this_curriculum(i)
    is_bachelor_curriculum
    is_an_individual_curriculum
    do_show_lecture_attribution_to_universities
  # ======================================================================= #
  # === :master_vektoren_curriculum
  # ======================================================================= #
  when :master_vektoren_curriculum
    i = return_and_check_file_for_this_curriculum(i)
    is_master_curriculum
    is_an_individual_curriculum
    do_show_lecture_attribution_to_universities
  # ======================================================================= #
  # === :bachelor_bioinformatik_und_biotechnologie
  # ======================================================================= #
  when :bachelor_bioinformatik_und_biotechnologie
    i = return_and_check_file_for_this_curriculum(i)
    is_bachelor_curriculum
    is_an_individual_curriculum
    do_show_lecture_attribution_to_universities
  # ======================================================================= #
  # === :bachelor_mikrobiologie_individuelles_curriculum
  #
  # Removed as of 29.02.2020.
  # ======================================================================= #
  # when :bachelor_mikrobiologie_individuelles_curriculum,
  #      :bachelor_mikrobiologie_curriculum,
  #      :bachelor_mikrobiologie,
  #      :mikrobiologie
  #   i = return_and_check_file_for_this_curriculum(i)
  #   is_bachelor_curriculum
  # ======================================================================= #
  # === :bachelor_molekularbiologie_graz
  # ======================================================================= #
  when :bachelor_molekularbiologie_graz,
       :bachelor_molekularbiologie_graz_curriculum,
       :bachelor_molekularbiologie,
       :bachelor_molekularbiologie_curriculum
    i = return_and_check_file_for_this_curriculum(i)
    is_bachelor_curriculum
  # ======================================================================= #
  # === :bachelor_ernährung_curriculum
  # ======================================================================= #
  when :bachelor_ernährung_curriculum
    i = return_and_check_file_for_this_curriculum(i)
    is_bachelor_curriculum
  # ======================================================================= #
  # === :bachelor_verfahrenstechnik_curriculum
  # ======================================================================= #
  when :bachelor_verfahrenstechnik_curriculum,
       :verfahrenstechnik_curriculum,
       :verfahrenstechnik
    i = return_and_check_file_for_this_curriculum(i)
    is_bachelor_curriculum
  # ======================================================================= #
  # === :bachelor_genetik_curriculum
  # ======================================================================= #
  when :bachelor_genetik_curriculum,
       :genetik_curriculum
    i = return_and_check_file_for_this_curriculum(i)
    is_bachelor_curriculum
  # ======================================================================= #
  # === :master_genetik_und_entwicklungsbiologie_curriculum
  # ======================================================================= #
  when :master_genetik_und_entwicklungsbiologie_curriculum
    i = return_and_check_file_for_this_curriculum(i)
    is_master_curriculum
  # ======================================================================= #
  # === :master_pharmazie_curriculum
  # ======================================================================= #
  when :master_pharmazie_curriculum,
       :master_pharmazie
    i = return_and_check_file_for_this_curriculum(i)
    is_master_curriculum
  # ======================================================================= #
  # === :bachelor_pharmazie_curriculum
  # ======================================================================= #
  when :bachelor_pharmazie_curriculum
    i = return_and_check_file_for_this_curriculum(i)
    is_bachelor_curriculum
  # ======================================================================= #
  # === :master_biologische_chemie_curriculum
  # ======================================================================= #
  when :master_biologische_chemie_curriculum,
       :master_biologische_chemie
    i = return_and_check_file_for_this_curriculum(i)
    is_master_curriculum
  # ======================================================================= #
  # === :master_lmbt_curriculum
  # ======================================================================= #
  when :master_lmbt_curriculum
    i = return_and_check_file_for_this_curriculum(i)
    is_master_curriculum
  # ======================================================================= #
  # === :bachelor_boku_lmbt_curriculum
  # ======================================================================= #
  when :bachelor_boku_lmbt_curriculum
    i = return_and_check_file_for_this_curriculum(i)
    is_bachelor_curriculum
  # ======================================================================= #
  # === :technical_chemistry_curriculum
  # ======================================================================= #
  when :bachelor_technical_chemistry_curriculum,
       :technical_chemistry_curriculum
    i = return_and_check_file_for_this_curriculum(i)
    is_bachelor_curriculum
    do_show_lecture_attribution_to_universities
  # ======================================================================= #
  # === :bachelor_informatik_curriculum
  # ======================================================================= #
  when :bachelor_informatik_curriculum,
       :bachelor_informatik,
       :binformatik
    i = return_and_check_file_for_this_curriculum(i)
    is_bachelor_curriculum
  # ======================================================================= #
  # === :bachelor_ktww_curriculum
  # ======================================================================= #
  when :bachelor_ktww_curriculum,
       :bachelor_boku_ktww_curriculum
    i = return_and_check_file_for_this_curriculum(i)
    is_bachelor_curriculum
  # ======================================================================= #
  # === :bachelor_agrarwissenschaften_curriculum
  # ======================================================================= #
  when :bachelor_agrarwissenschaften_curriculum
    i = return_and_check_file_for_this_curriculum(i)
    is_bachelor_curriculum
  # ======================================================================= #
  # === :bachelor_medizinische_informatik_curriculum
  # ======================================================================= #
  when :bachelor_medizinische_informatik_curriculum
    i = return_and_check_file_for_this_curriculum(i)
    is_bachelor_curriculum
  # ======================================================================= #
  # === :bachelor_botanik_curriculum
  # ======================================================================= #
  when :bachelor_botanik_curriculum,
       :bachelor_botanik
    i = return_and_check_file_for_this_curriculum(i)
    is_bachelor_curriculum
  # ======================================================================= #
  # === :master_bioinformatik_curriculum
  # ======================================================================= #
  when :master_bioinformatik_curriculum
    i = return_and_check_file_for_this_curriculum(i)
    is_master_curriculum
  # ======================================================================= #
  # === :bachelor_ökologie_curriculum
  # ======================================================================= #
  when :bachelor_ökologie_curriculum
    i = return_and_check_file_for_this_curriculum(i)
    is_bachelor_curriculum
  # ======================================================================= #
  # === :bachelor_master_tu_wien
  # ======================================================================= #
  when :bachelor_master_tu_wien
    i = return_and_check_file_for_this_curriculum(i)
    is_bachelor_master_curriculum
  # ======================================================================= #
  # === :master_molbio_curriculum
  # ======================================================================= #
  when :master_molbio_curriculum
    i = return_and_check_file_for_this_curriculum(i)
    is_master_curriculum
  # ======================================================================= #
  # === :master_immunobiology_curriculum
  # ======================================================================= #
  when :master_immunobiology_curriculum
    i = return_and_check_file_for_this_curriculum(i)
    is_master_curriculum
  # ======================================================================= #
  # === :bachelor_chemie_curriculum
  # ======================================================================= #
  when :bachelor_chemie_curriculum
    i = return_and_check_file_for_this_curriculum(i)
    is_bachelor_curriculum
  # ======================================================================= #
  # === :bachelor_boku_ubrm_curriculum
  # ======================================================================= #
  when :bachelor_boku_ubrm_curriculum
    i = return_and_check_file_for_this_curriculum(i)
    is_bachelor_curriculum
  # ======================================================================= #
  # === :master_tu_vienna_biotechnology_curriculum
  # ======================================================================= #
  when :master_tu_vienna_biotechnology_curriculum
    i = return_and_check_file_for_this_curriculum(i)
    is_master_curriculum
  # ======================================================================= #
  # === :bachelor_molekulare_biologie_curriculum
  # ======================================================================= #
  when :bachelor_molekulare_biologie_curriculum
    i = return_and_check_file_for_this_curriculum(i)
    is_bachelor_curriculum
  # ======================================================================= #
  # === :bachelor_basisblock_biologie
  # ======================================================================= #
  when :bachelor_basisblock_biologie
    i = return_and_check_file_for_this_curriculum(i)
    is_bachelor_curriculum
  else
    if is_on_roebe? and i.is_a?(String) and !File.exist?(i)
      e 'Warning: input '+i.to_s+' is not registered in this menu().'
    end
  end
  if i.include? 'master_individuelles_' # This must be a master-lecture then.
    type_of_the_curriculum = :master
  end if i.is_a? String
  # ======================================================================= #
  # We must work on Arrays past this point.
  # ======================================================================= #
  unless i.is_a? Array
    i = [i]
  end
  i.flatten! # Keep this important Array flat.
  @read_from_these_files = i
end

#determine_the_type_of_the_curriculum(i = :bachelor) ⇒ Object

#

determine_the_type_of_the_curriculum (type tag)

The allowed types are currently:

:bachelor
:master
:bachelor_and_master

The default will be towards :bachelor.

#


429
430
431
432
433
434
435
436
437
# File 'lib/studium/utility_scripts/show_lectures_on_the_commandline/show_lectures_on_the_commandline.rb', line 429

def determine_the_type_of_the_curriculum(
    i = :bachelor
  )
  case i
  when :bachelor_master
    i = :bachelor_and_master # Slight sanitize-operation here.
  end
  @type_of_the_curriculum = i
end

#do_all_actions_after_the_main_dataset_was_read_inObject

#

do_all_actions_after_the_main_dataset_was_read_in

#


2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
# File 'lib/studium/utility_scripts/show_lectures_on_the_commandline/show_lectures_on_the_commandline.rb', line 2799

def do_all_actions_after_the_main_dataset_was_read_in
  iterate_over_the_lectures
  consider_showing_to_which_universities_the_lectures_belong_to
  # ======================================================================= #
  # The next method will output something like:
  #   "A total of 52 lectures are part of this Curriculum."
  # ======================================================================= #
  if commandline?
    report_how_many_lectures_are_in_this_curriculum_and_how_many_of_them_are_already_solved
    report_how_many_ects_points_have_been_passed_already
    report_how_many_ects_points_are_in_this_curriculum
    report_the_average_grade
    report_the_university_attribution
  end
  consider_generating_a_html_file
end

#do_generate_a_html_fileObject

#

do_generate_a_html_file

This method can be used to generate a .html file no matter what.

The other method, consider_generating_a_html_file, will instead honour a certain instance variable.

#


1318
1319
1320
# File 'lib/studium/utility_scripts/show_lectures_on_the_commandline/show_lectures_on_the_commandline.rb', line 1318

def do_generate_a_html_file
  consider_generating_a_html_file(true)
end

#do_ignore_outdated_lecturesObject

#

do_ignore_outdated_lectures

#


3123
3124
3125
# File 'lib/studium/utility_scripts/show_lectures_on_the_commandline/show_lectures_on_the_commandline.rb', line 3123

def do_ignore_outdated_lectures
  @ignore_outdated_lectures = true
end

#do_not_read_in_from_a_fileObject

#

do_not_read_in_from_a_file

#


486
487
488
# File 'lib/studium/utility_scripts/show_lectures_on_the_commandline/show_lectures_on_the_commandline.rb', line 486

def do_not_read_in_from_a_file
  @read_from_these_files = false
end

#do_not_report_anythingObject Also known as: do_not_report

#

do_not_report_anything

#


2119
2120
2121
# File 'lib/studium/utility_scripts/show_lectures_on_the_commandline/show_lectures_on_the_commandline.rb', line 2119

def do_not_report_anything
  @do_report = false
end

#do_not_show_loaded_from_which_fileObject

#

do_not_show_loaded_from_which_file

#


2409
2410
2411
# File 'lib/studium/utility_scripts/show_lectures_on_the_commandline/show_lectures_on_the_commandline.rb', line 2409

def do_not_show_loaded_from_which_file
  @show_loaded_from_which_file = false
end

#do_not_show_the_next_examsObject

#

do_not_show_the_next_exams

Use this method if you do NOT want to show the next exams.

#


2402
2403
2404
# File 'lib/studium/utility_scripts/show_lectures_on_the_commandline/show_lectures_on_the_commandline.rb', line 2402

def do_not_show_the_next_exams
  @show_next_exams = false
end

#do_show_all_URLsObject

#

do_show_all_URLs

#


2226
2227
2228
# File 'lib/studium/utility_scripts/show_lectures_on_the_commandline/show_lectures_on_the_commandline.rb', line 2226

def do_show_all_URLs
  @show_all_URLs = true
end

#do_show_lecture_attribution_to_universitiesObject

#

do_show_lecture_attribution_to_universities

#


2877
2878
2879
# File 'lib/studium/utility_scripts/show_lectures_on_the_commandline/show_lectures_on_the_commandline.rb', line 2877

def do_show_lecture_attribution_to_universities
  @show_to_which_universities_the_lectures_belong_to = true
end

#exclude_title_entries_from_the_main_datasetObject

#

exclude_title_entries_from_the_main_dataset

#


2281
2282
2283
# File 'lib/studium/utility_scripts/show_lectures_on_the_commandline/show_lectures_on_the_commandline.rb', line 2281

def exclude_title_entries_from_the_main_dataset
  @dataset.reject! {|line| line.start_with? '@title ' }
end

#html_string?Boolean

#

html_string?

#

Returns:

  • (Boolean)


821
822
823
# File 'lib/studium/utility_scripts/show_lectures_on_the_commandline/show_lectures_on_the_commandline.rb', line 821

def html_string?
  @html_string
end

#ignore_outdated_lectures?Boolean

#

ignore_outdated_lectures?

#

Returns:

  • (Boolean)


3130
3131
3132
# File 'lib/studium/utility_scripts/show_lectures_on_the_commandline/show_lectures_on_the_commandline.rb', line 3130

def ignore_outdated_lectures?
  @ignore_outdated_lectures
end

#individual_curriculum?Boolean Also known as: is_it_an_individual_curriculum?

#

individual_curriculum?

#

Returns:

  • (Boolean)


2432
2433
2434
# File 'lib/studium/utility_scripts/show_lectures_on_the_commandline/show_lectures_on_the_commandline.rb', line 2432

def individual_curriculum?
  @individual_curriculum
end

#is_an_individual_curriculumObject

#

is_an_individual_curriculum

#


2446
2447
2448
# File 'lib/studium/utility_scripts/show_lectures_on_the_commandline/show_lectures_on_the_commandline.rb', line 2446

def is_an_individual_curriculum
  @individual_curriculum = true
end

#is_bachelor_curriculumObject

#

is_bachelor_curriculum

#


500
501
502
# File 'lib/studium/utility_scripts/show_lectures_on_the_commandline/show_lectures_on_the_commandline.rb', line 500

def is_bachelor_curriculum
  determine_the_type_of_the_curriculum(:bachelor)
end

#is_bachelor_master_curriculumObject

#

is_bachelor_master_curriculum

#


507
508
509
# File 'lib/studium/utility_scripts/show_lectures_on_the_commandline/show_lectures_on_the_commandline.rb', line 507

def is_bachelor_master_curriculum
  determine_the_type_of_the_curriculum(:bachelor_master)
end

#is_master_curriculumObject

#

is_master_curriculum

Denote that our curriculum at hand is a master-curriculum.

#


479
480
481
# File 'lib/studium/utility_scripts/show_lectures_on_the_commandline/show_lectures_on_the_commandline.rb', line 479

def is_master_curriculum
  determine_the_type_of_the_curriculum(:master)
end

#is_not_an_individual_curriculumObject

#

is_not_an_individual_curriculum

#


2439
2440
2441
# File 'lib/studium/utility_scripts/show_lectures_on_the_commandline/show_lectures_on_the_commandline.rb', line 2439

def is_not_an_individual_curriculum
  @individual_curriculum = false
end

#is_this_a_registered_lecture?(i) ⇒ Boolean

#

is_this_a_registered_lecture?

#

Returns:

  • (Boolean)


2425
2426
2427
# File 'lib/studium/utility_scripts/show_lectures_on_the_commandline/show_lectures_on_the_commandline.rb', line 2425

def is_this_a_registered_lecture?(i)
  @lecture_dataset.has_key?(i.strip)
end

#is_this_lecture_a_practical_course?(lecture_type) ⇒ Boolean

#

is_this_lecture_a_practical_course?

#

Returns:

  • (Boolean)


2267
2268
2269
# File 'lib/studium/utility_scripts/show_lectures_on_the_commandline/show_lectures_on_the_commandline.rb', line 2267

def is_this_lecture_a_practical_course?(lecture_type)
  ARRAY_LECTURE_TYPES_THAT_ARE_MANDATORY_CONTINUOUS_ASSESSMENT.include? lecture_type
end

#iterate_over_the_lectures(i = @dataset) ⇒ Object Also known as: do_the_main_iteration

#

iterate_over_the_lectures (iterate tag)

#


2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
# File 'lib/studium/utility_scripts/show_lectures_on_the_commandline/show_lectures_on_the_commandline.rb', line 2926

def iterate_over_the_lectures(
    i = @dataset
  )
  i.each_with_index {|line, index| index += 1
    result = ''.dup # This is the line that will be reported to the user.
    # ===================================================================== #
    # Since as of January 2018 the dataset has already been sanitized a
    # bit before coming to this method, so there will no longer be any
    # '#' characters. In the past, the variable line would look like
    # this:
    #
    #   "754117 Mikrobiologie - Übungen (AW)              # 2.0 ECTS, UE\n"
    #
    # That is why the next line still checks for this.
    # ===================================================================== #
    if line and line.include?('#')
      raw_line = line[0 .. (line.index('#') - 1)] # ← raw_line is like: "754117 Mikrobiologie - Übungen (AW)"
    # ===================================================================== #
    # The next code checks for a leading LVA-id entry, but it must also
    # keep in mind that ID entries may be like this: "185.A47"
    # ===================================================================== #
    # elsif starts_with_a_lecture_id_entry?(line)
    #   raw_line = line.split(' ')[1 .. -1].join(' ').strip.dup
    else
      raw_line = line.dup
    end
    raw_line.strip! # ← Added this in December 2019.
    raw_line.squeeze!(' ') # ← Added this as of March 2018.
    # ===================================================================== #
    # Obtain the remote URL. Since as of 20.02.2018, this requires that
    # the beautiful_url project also deals with leading numbers, so all
    # entries must have that too, as an additional qualifier.
    #
    # On November 2019 support for BeautifulUrl was removed, and
    # replaced with Studium.return_remote_url_of_this_lecture()
    # instead.
    # ===================================================================== #
    remote_url = Studium.return_remote_url_of_this_lecture(raw_line)
    if remote_url == raw_line
      e crimson("No registered remote homepage for #{raw_line}.")
    end
    splitted = raw_line.split(' ')
    lecture_id = splitted.first # ← Obtain the lecture id.
    name_of_the_lecture = splitted[1..-1].join(' ')
    padded_index = ('('+index.to_s+')').rjust(5)
    colourized_index = slategray(padded_index)
    # ===================================================================== #
    # Create a colourized string for the remote URL next.
    # ===================================================================== #
    colourized_remote_url = N+dodgerblue('')+
                              dodgerblue(remote_url)+
                              dodgerblue('')
    pointer_to_the_lecture = @lecture_dataset[raw_line]
    if pointer_to_the_lecture and
       pointer_to_the_lecture.has_key?(:already_solved)
      already_solved = pointer_to_the_lecture[:already_solved]
    else
      opne "#{swarn('Problem with `')}#{sfancy(raw_line)}#{swarn('`:')}"
      opne swarn('no registered key called :already_solved was found')
      # =================================================================== #
      # Also inform the user whether this lecture is registered at all.
      # If not, notify the user about this.
      # =================================================================== #
      unless main_dataset?.has_key? raw_line
        opne swarn('The lecture ')+
             sfancy(raw_line)+swarn(' has not yet been')
        opne swarn('registered in the file `')+
             sfancy('lecture_information.yml')+
             swarn('`.')
      end
      pp pointer_to_the_lecture
      already_solved = false
    end
    if pointer_to_the_lecture.nil?
      opne "Skipping this lecture (#{sfancy(raw_line)})"
      opne 'as it is not registered or otherwise missing.'
      next
    end
    # ===================================================================== #
    # Deconstruct the content of our hash-"pointer" next.
    # ===================================================================== #
    n_ects_points = pointer_to_the_lecture[:ects]
    @this_curriculum_has_n_ects_points_in_total += n_ects_points
    padded_name_of_the_lecture = name_of_the_lecture.ljust(76)
    padded_n_ects_points = n_ects_points.to_s.rjust(5)
    colourized_n_ects_points = steelblue(padded_n_ects_points)
    expanded_ja_oder_nein = ja_oder_nein(already_solved)
    case expanded_ja_oder_nein
    when 'Ja'
      colourized_ja_oder_nein = lightgreen(expanded_ja_oder_nein.rjust(4))
    when 'Nein' # Lectures that were not yet passed, will be highlighted in red.
      colourized_ja_oder_nein = crimson(expanded_ja_oder_nein.rjust(4))
    end
    fancified_already_solved = 'Bereits absolviert? '+colourized_ja_oder_nein+'. '
    result << colourized_index+' '+
              sfancy(padded_name_of_the_lecture)+' '+
              fancified_already_solved+
              '('+mediumseagreen('LVA Nummer: ')+
              sfancy(lecture_id.rjust(7))
    grade = nil
    if already_solved
      # =================================================================== #
      # Obtain the grade of this lecture.
      # =================================================================== #
      if pointer_to_the_lecture.has_key? :grade
        grade = pointer_to_the_lecture[:grade]
        # ================================================================= #
        # We must keep in mind that the grade can also be a '+' character.
        # We can not calculate the average number from entries that are
        # '+' Strings, so we will ignore these entries - but we will
        # do so not here but lateron, when we calculate the average grade.
        # ================================================================= #
        @array_storing_the_grades << grade
      end
      @n_lectures_are_already_solved += 1
      @n_ects_were_passed_so_far += n_ects_points
      # =================================================================== #
      # If the lecture was already solved then we will not show
      # the remote URL.
      # =================================================================== #
      colourized_remote_url = ''
    end
    result << ', '+mediumseagreen('n ECTS: ')+colourized_n_ects_points
    if grade
      result << ', '+mediumseagreen('Grade: '+grade.to_s)
    end
    unless ALSO_SHOW_URL
      colourized_remote_url = ''
    end
    if @do_report and cmdline? # We only report this on the commandline.
      result << ') '+colourized_remote_url
      e result
    end
  }
  if @this_curriculum_has_n_ects_points_in_total >= 270.0
    # ===================================================================== #
    # This check is to avoid checking for combined bachelor-master
    # individual curricula, as we can not show a correct module
    # chain in this case really - or at the least not without
    # additional code (23.12.2019).
    # ===================================================================== #
  else
    if is_it_an_individual_curriculum? and is_on_roebe?
      opne 'Trying to generate an image displaying '\
              'the '+steelblue('modules')+' next.'
      consider_generating_a_graphviz_image_displaying_the_modules(
        i
      )
      opne 'Trying to generate a '+steelblue('spreadsheet')+' next.'
      consider_generating_a_spreadsheet
    end
  end
end

#ja_oder_nein(i = 'nein') ⇒ Object

#

ja_oder_nein

Input “true” will become “Ja” and input “false” will become “Nein”.

#


2600
2601
2602
2603
2604
# File 'lib/studium/utility_scripts/show_lectures_on_the_commandline/show_lectures_on_the_commandline.rb', line 2600

def ja_oder_nein(
    i = 'nein'
  )
  Studium.ja_oder_nein(i)
end

#lecture_dataset?Boolean Also known as: main_dataset?

#

lecture_dataset?

#

Returns:

  • (Boolean)


2246
2247
2248
# File 'lib/studium/utility_scripts/show_lectures_on_the_commandline/show_lectures_on_the_commandline.rb', line 2246

def lecture_dataset?
  @lecture_dataset
end
#

menu (menu tag)

#


1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
# File 'lib/studium/utility_scripts/show_lectures_on_the_commandline/show_lectures_on_the_commandline.rb', line 1393

def menu(
    i = commandline_arguments?
  )
  if i.is_a? Array
    i.each {|entry| menu(entry) }
  else
    case i.to_s # case tag
    # ===================================================================== #
    # === lectures_commandline --ignore-outdated
    # ===================================================================== #
    when /^-?-?ignore(-|_| )?outdated$/i
      do_ignore_outdated_lectures
    # ===================================================================== #
    # === lectures_commandline --indi3
    #
    # This is indi3.
    # ===================================================================== #
    when /^-?-?master(-|_| )?bioinformatics(-|_| )?and(-|_| )?molecular(-|_| )?biotechnology$/i,
         /^-?-?indi3$/i
      use_master_bioinformatics_and_nanobiotechnology_in_molecular_medicine
    # ===================================================================== #
    # === lectures_commandline --bachelor-vektorx
    # ===================================================================== #
    when /^-?-?bachelor(-|_| )?vektorx?$/i,
         /^-?-?bachelor(-|_| )?vektore?n?$/,
         /^-?-?bachelor(-|_| )?vector$/,
         /^-?-?bachelor(-|_| )?vector(-|_| )?curriculum$/,
         /^-?-?molekularsimulatorisch(-|_| )?therapeutische(-|_| )?vektoren$/i,
         /^-?-?bachelor(-|_| )?molekularsimulatorisch(-|_| )?therapeutische(-|_| )?vektoren$/i,
         /^-?-?bachelor(-|_| )?individuelles(-|_| )?curriculum(-|_| )?molekularsimulatorische(-|_| )?vektoren(-|_| )?in(-|_| )?der(-|_| )?biotechnologie$/i,
         /^-?-?bachelor(-|_| )?individuelles(-|_| )?curriculum(-|_| )?molekularsimulatorische(-|_| )?vektoren(-|_| )?in(-|_| )?biotechnologie(-|_| )?und(-|_| )?bioinformatik$/i,
         /^-?-?bvektor$/i,
         /^-?-?individuelles(-|_| )?bachelor(-|_| )?studium/i,
         /^-?-?indi4$/i,
         'vektoren'
      use_bachelor_vektor_curriculum
    # ===================================================================== #
    # === lectures_commandline --bioinf2
    #
    # This is indi2, the bachelor-programme at the BOKU.
    #
    # The full name is:
    #
    #   "Bachelorcurriculum Informatik und Biotechnologie unter Berücksichtigung immunanalytisch-molekularmedizinischer Aspekte"
    #
    # ===================================================================== #
    when /^-?-?bioinf2$/i,
         /^-?-?bachelor(-|_| )?bioinformatik(-|_| )?und(-|_| )?molekulare(-|_| )?biotechnologie$/i,
         /^-?-?bachelor(-|_| )?bioinformatik(-|_| )?und(-|_| )?biotechnologie$/i,
         /^-?-?bachelor(-|_| )?bioinformatik(-|_| )?an(-|_| )?der(-|_| )?boku$/i,
         /^-?-?indi2$/i
      use_bachelor_informatik_und_biotechnologie_unter_berücksichtigung_immunanalytisch_molekularmedizinischer_aspekte
    # ===================================================================== #
    # === lectures_commandline --biologische_informatik
    #
    # This is indi1, at the TU Vienna.
    # ===================================================================== #
    when /^-?-?biologische(-|_| )?informatik$/i,
         /^-?-?bachelor(-|_| )?biologische(-|_| )?informatik$/i,
         /^-?-?use(-|_| )?individual(-|_| )?bachelor(-|_| )?informatik(-|_| )?und(-|_| )?molekulare(-|_| )?biologie$/i,
         /^-?-?indi1$/i,
         /^-?-?indi$/i
      use_bachelor_biologische_informatik
    # ===================================================================== #
    # === lectures_commandline --mdummy
    # ===================================================================== #
    when /^-?-?master(-|_| )?dummy(-|_| )?curriculum$/i,
         /^-?-?mdummy$/i
      use_master_dummy_curriculum
    # ===================================================================== #
    # === lectures_commandline --dummy
    # ===================================================================== #
    when /^-?-?bachelor(-|_| )?dummy(-|_| )?curriculum$/i,
         /^-?-?bdummy$/i,
         /^-?-?dummy$/i
      use_bachelor_dummy_curriculum
    # ===================================================================== #
    # === lectures_commandline --aggregate
    #
    # This entry point really combines all curricula and lectures
    # that I intend to pass.
    #
    # Invocation example on my home system:
    #
    #   bigaggregate
    #
    # ===================================================================== #
    when /^-?-?aggregate$/i
      use_master_vektoren_curriculum # Combine the bachelor-master curricula.
      is_not_an_individual_curriculum
      prepend_this_to_dataset(
        %i(
          bachelor_vektorx_curriculum
          master_vektorx_curriculum
          bachelor_informatik_und_molekulare_biologie
          bachelor_lbt
          bachelor_bioinformatik_an_der_boku

          master_lbt
          master_bioinformatik_an_der_boku
        ) # bachelor_agrarwissenschaften
          # bachelor_tu_wien
      )
      prepend_this_to_dataset(
        ['892100 Physik (KTWW+HNT)']
      )
      sanitize_the_dataset
      uniq_the_dataset
    # ===================================================================== #
    # === lectures_commandline --aggregate-only-individual-curricula
    #
    # This entry point combines all individual curricula and lectures
    # in these curricula that I wish to pass.
    # ===================================================================== #
    when /^-?-?aggregate(-|_| )?only(-|_| )?individual(-|_| )?curricula$/i
      use_master_vektoren_curriculum # Combine the bachelor-master curricula.
      prepend_this_to_dataset(
        %i(
          bachelor_vektorx_curriculum
          bachelor_informatik_und_molekulare_biologie
          bachelor_bioinformatik_an_der_boku
        )
      )
      sanitize_the_dataset
      uniq_the_dataset
    # ===================================================================== #
    # === lectures_commandline --lmbt_curriculum
    # ===================================================================== #
    when /^-?-?bachelor(-|_| )?lm?bt$/i,
         /^-?-?bachelor(-|_| )?lm?bt$(-|_| )?curriculum/i,
         /^-?-?lm?bt$(-|_| )?curriculum/i,
         'lmbt',
         /lbt/i
      use_bachelor_lmbt_curriculum
    # ===================================================================== #
    # === lectures_commandline --bachelor-master-vektorx
    #
    # This entry point is the "bachelor-master-vector" joint
    # curriculum.
    #
    # Another invocation example:
    #
    #   lectures_commandline --bmvec
    #
    # ===================================================================== #
    when /^-?-?bachelor(-|_| )?master(-|_| )?vektorx?$/i,
         /^-?-?bachelor(-|_| )?master(-|_| )?vektoren$/i,
         /^-?-?bachelor(-|_| )?master(-|_| )?vector$/i,
         /^-?-?bmvec$/i,
         /^-?-?bmvek$/i
      use_master_vektoren_curriculum # Combine the bachelor-master curricula.
      prepend_this_to_dataset(:bachelor_vektorx_curriculum) # And then prepend the dataset.
    # ===================================================================== #
    # === master_vektoren
    #
    # This entry point deals with the master lecture of the
    # vector-curriculum.
    #
    # Invocation example:
    #
    #   lectures_commandline --master_vektorx
    #
    # ===================================================================== #
    when /^-?-?master(-|_| )?ve(c|k)torx$/,
         /^-?-?master(_|-)?molekularsimulatorisch(_|-)?therapeutische(_|-)?vektoren$/i,
         /^-?-?master(_|-)?individuelles(_|-)?curriculum(_|-)?molekularsimulatorische(_|-)?vektoren/i, # lcommandline --master-individuelles-curriculum-molekularsimulatorische-vektoren
         /^-?-?master(_|-)?vektoren$/i,
         /^-?-?master(-|_| )?ve(c|k)tors?$/,
         /^-?-?master(-|_| )?individuell/,
         'mastervect',
         'mastersim'
      use_master_vektoren_curriculum
    # ===================================================================== #
    # === lectures_commandline --forstwirtschaft
    # ===================================================================== #
    when /^-?-?forstwirtschaft$/i,
         /^-?-?bachelor(-|_| )?forstwirtschaft$/i
      use_bachelor_forstwirtschaft
    # ===================================================================== #
    # === lectures_commandline --bachelor-ern
    # ===================================================================== #
    when /^-?-?bachelor(-|_| )?ernährung?$/,
         /^-?-?bachelor(-|_| )?ern$/,
         /^-?-?bachelor(-|_| )?ernährung(_|-)?uni(_|-)?wien$/,
         /^-?-?bachelor(-|_| )?ernährungswissenschaften$/,
         /^-?-?bachelor(-|_| )?nutrition(_|-)?science$/i,
         /-?-?ernährung/,
         'ernährungswissenschaften',
         'ern'
      use_bachelor_ernährung_curriculum
    # ===================================================================== #
    # === lectures_commandline --bachelor_molekularbiologie_graz
    # ===================================================================== #
    when /^-?-?bachelor(-|_| )?molekularbiologie(-|_| )?graz$/i,
         /^-?-?bachelor(-|_| )?molekularbiologie(-|_| )?graz(-|_| )?curriculum$/i,
         /^-?-?bachelor(-|_| )?molbio(-|_| )?graz$/i,
         /^-?-?bachelor(-|_| )?molekularbiologie$/i,
         /^-?-?graz$/i
      use_bachelor_molekularbiologie_curriculum
    # ===================================================================== #
    # === lectures_commandline --bachelor-pharmazie
    # ===================================================================== #
    when /^-?-?bachelor(-|_| )?pharmazie$/i,
         /^-?-?pharmazie$/i,
         /^-?-?pharm$/i,
         /^-?-?bachelor(-|_| )?pharm$/i
      use_bachelor_pharmazie_curriculum
    # ===================================================================== #
    # === lectures_commandline --bachelor_verfahrenstechnik
    # ===================================================================== #
    when /^-?-?bachelor(-|_| )?verfahrenstechnik$/i,
         /^-?-?verfahrenstechnik$/i
      use_bachelor_verfahrenstechnik_curriculum
    # ===================================================================== #
    # === lectures_commandline --bachelor_technical_chemistry
    # ===================================================================== #
    when /^-?-?bachelor(-|_| )?technical(-|_| )?chemistry?$/i
      use_bachelor_technical_chemistry_curriculum
    # ===================================================================== #
    # === lectures_commandline --master-lmbt
    # ===================================================================== #
    when /^-?-?(-|_| )?lm?bt$/i,
         /^-?-?master(-|_| )?lm?bt(-|_| )?curriculum$/i,
         /^-?-?master(-|_| )?biotech$/i,
         /^-?-?master(-|_| )?lmbt$/i,
         /LBT2/i,
         'biotechnology',
         'masterbiotech'
      use_master_lmbt_curriculum
    # ===================================================================== #
    # === lectures_commandline --master-pharmazie
    # ===================================================================== #
    when /^-?-?master(-|_| )?pharmazie$/i,
         /^-?-?master(-|_| )?pharmazie(-|_| )?curriculum$/i,
         'mpharmacy',
         'mpharma'
      use_master_pharmazie_curriculum
    # ===================================================================== #
    # === lectures_commandline --master-biologische-chemie
    # ===================================================================== #
    when /^-?-?master(-|_| )?biologische(-|_| )?chemie$/i,
         /^-?-?master(-|_| )?biologische(-|_| )?chemie(-|_| )?curriculum$/i,
         /^-?-?biologische(-|_| )?chemie$/i,
         'mbiochem'
      use_master_biologische_chemie_curriculum
    # ===================================================================== #
    # === lectures_commandline --tu_master_biotech
    # ===================================================================== #
    when /^-?-?master(_|-)?tu(_|-)?biotechnology$/i,
         /^-?-?tu(_|-)?master(_|-)?biotech$/i,
         /^-?-?master(_|-)?tu(_|-)?wien(_|-)?biotechnologie$/i,
         /^-?-?tu(_|-)?vienna(_|-)?biotech(_|-)?master$/i,
         /^-?-?master(_|-)?tuwienbiotech$/i,
         /^-?-?tu(_|-)?wien(_|-)?biotech$/i
      use_tu_master_biotechnology_curriculum
    # ===================================================================== #
    # === lectures_commandline --bachelor-mikrobiologie
    # ===================================================================== #
    when /^-?-?bachelor(-|_| )?mikrobiologie$/i,
         /^-?-?mikrobiologie$/i,
         /^-?-?microbiology$/i
      use_mikrobiologie_individuelles_curriculum
    # ===================================================================== #
    # === lectures_commandline --priority-points
    # ===================================================================== #
    when /^-?-?priority(-|_| )?points$/i
      use_priority_points
    # ===================================================================== #
    # === lectures_commandline --informatik_curriculum
    # ===================================================================== #
    when /^-?-?informatik(_|-)?curriculum$/i,
         /^-?-?informatik$/i,
         /^-?-?bachelor(_|-)?informatik$/i,
         /^-?-?bachelor(_|-)?informatik(_|-)?curriculum$/i,
         'informatik'
      use_bachelor_informatik_curriculum
    # ===================================================================== #
    # === lectures_commandline --ktww_curriculum
    # ===================================================================== #
    when /^-?-?ktww(_|-)?curriculum$/i,
         /^-?-?boku(_|-)?ktww$/i,
         /^-?-?ktww$/i,
         /^-?-?bachelor(_|-)?ktww$/i,
         /^-?-?bachelor(_|-)?boku(_|-)?ktww(_|-)?curriculum$/i
      use_bachelor_ktww_curriculum
    # ===================================================================== #
    # === --no-html-page
    # ===================================================================== #
    when /^-?-?no(-|_| )?html(-|_| )?page$/,
         /^-?-?no(-|_| )?html$/
      no_html_page
    # ===================================================================== #
    # === lectures_commandline --aw_curriculum
    # ===================================================================== #
    when /^-?-?aw(_|-)?curriculum$/i,
         /^-?-?boku(_|-)?aw$/i,
         /^-?-?AW$/i,
         /^-?-?agrarwissenschaften$/i,
         /^-?-?bachelor(_|-)?agrarwissenschaften$/i,
         'bachelorAW'
      use_bachelor_agrarwissenschaften_curriculum
    # ===================================================================== #
    # === lectures_commandline --master-genetik-und-entwicklungsbiologie
    # ===================================================================== #
    when /^-?-?master(-|_| )?genetik(-|_| )?und(-|_| )?entwicklungsbiologie$/i,
         /^-?-?master(-|_| )?genetik(-|_| )?und(-|_| )?entwicklungsbiologie(-|_| )?curriculum$/i
      use_uni_vienna_master_genetik_und_entwicklungsbiologie_curriculum
    # ===================================================================== #
    # === lectures_commandline --master_bioinformatik
    # ===================================================================== #
    when /^-?-?master(_|-)?bioinformatik$/i,
         /^-?-?master(_|-)?bioinformatics$/i
      use_uni_vienna_master_bioinformatics_curriculum
    # ===================================================================== #
    # === lectures_commandline --bachelor_medizinische_informatik
    # ===================================================================== #
    when /^-?-?bachelor(-|_| )?medizinische(-|_| )?informatik$/i
      use_bachelor_medizinische_informatik_curriculum
    # ===================================================================== #
    # === lectures_commandline --molbio
    # ===================================================================== #
    when /^-?-?bachelor(-|_| )?molekularbiologie$/,
         /^-?-?bachelor(-|_| )?molekulare(-|_| )?biologie$/, # lectures_commandline --bachelor_molekulare_biologie
         /^-?-?bachelor(-|_| )?molbio$/,
         /^-?-?molbio$/,
         /^-?-?mbio$/,
         'molekularebiologie'
      use_bachelor_molbio_curriculum
    # ===================================================================== #
    # === lectures_commandline --bachelor-chemie
    # ===================================================================== #
    when /^-?-?bachelor(-|_| )?chemie?$/,
         /^-?-?bachelor(-|_| )?chemie?uni(_|-)?wien$/,
         /^-?-?bachelor(-|_| )?chemie(-|_| )?uni(-|_| )?wien$/,
         /^-?-?uni(-|_| )?wien(-|_| )?chemie$/,
         /^-?-?uniwien(-|_| )?bachelor(-|_| )?chemie$/,
         /^-?-?chem(-|_| )?bach$/i, # lcommandline --chembach
         'chemie'
      use_bachelor_chemie_curriculum
    # ===================================================================== #
    # === lectures_commandline --show-all-URLs
    #
    # This can be triggered like so:
    #
    #   studiumsolved --show-all-URLs --tuwienbiotech
    #
    # ===================================================================== #
    when /^-?-?show(_|-)?all(_|-)?URLs$/i
      do_show_all_URLs
    # ===================================================================== #
    # === lectures_commandline --bachelor_ökologie_curriculum
    # ===================================================================== #
    when /^-?-?bachelor(_|-)?ökologie(_|-)?curriculum$/i,
         /^-?-?bachelor(_|-)?ecology(_|-)?curriculum/i,
         'ökologie'
      use_bachelor_ökologie_curriculum
    # ===================================================================== #
    # === lectures_commandline --molbio2
    # ===================================================================== #
    when /^-?-?master(-|_| )?molekularbiologie$/,
         /^-?-?master(-|_| )?molekulare(-|_| )?biologie/i,
         /^-?-?master(-|_| )?molbio$/,
         /^-?-?molbio2$/,
         /^-?-?mbio2$/,
         'mmolbio'
      use_master_molbio_curriculum
    # ===================================================================== #
    # === lectures_commandline --master_immunobiologie
    # ===================================================================== #
    when /^-?-?master(-|_| )?immunobiologie$/i,
         /^-?-?master(-|_| )?immunobiology$/i,
         /^-?-?master(-|_| )?immunobio$/i,
         /^-?-?master(-|_| )?immunbiology$/i,
         /^-?-?master(-|_| )?immuno$/i,
         /^-?-?immunbio$/i
      use_master_immunobiology_curriculum
    # ===================================================================== #
    # === lectures_commandline --biologie_basisblock
    # ===================================================================== #
    when /^-?-?uniwien(_|-)?biologie(_|-)?basisblock$/i,
         /^-?-?bachelor(_|-)?biologie(_|-)?basisblock$/i,
         /^-?-?bachelor(_|-)?biologe(_|-)?basisblock$/i,
         /^-?-?biologie(_|-)?basisblock$/i,
         /^-?-?bachelor(_|-)?biologie/i,
         /^-?-?biologie(_|-)?base$/i,
         /^-?-?biologie(_|-)?1$/i,
         'biologiebasisblock',
         'biologie',
         'uniwienbiologie'
      use_bachelor_biologie_basisblock_curriculum
    # ===================================================================== #
    # === lectures_commandline --genetic
    # ===================================================================== #
    when /^-?-?bachelor(-|_| )?genetik$/,
         /^-?-?bachelor(-|_| )?genetics$/,
         /^-?-?bachelor(-|_| )?mikrobiologie(-|_| )?und(-|_| )?genetik$/,
         /^-?-?geneti(c|k)$/,
         /^-?-?genetics$/,
         'mikrobiologie'
      use_bachelor_genetik_curriculum
    # ===================================================================== #
    # === curriculum bachelor_master_lmbt_curriculum
    # ===================================================================== #
    when /^-?-?lmbt(-|_| )?complete/i,
         /^-?-?bachelor(-|_| )?master(-|_| )?lmbt(-|_| )?curriculum$/i
      use_master_lmbt_curriculum
      prepend_this_to_dataset(:bachelor_lmbt_curriculum)
    # ===================================================================== #
    # === lectures_commandline --bachelor_master_tu_wien
    # ===================================================================== #
    when /^-?-?bachelor(-|_| )?master(-|_| )?tu(-|_| )?wien$/i,
         /bachelor(-|_| )?master(-|_| )?individuelles(-|_| )?studium(-|_| )?an(-|_| )?der(-|_| )?tu(-|_| )?wien$/i
      use_bachelor_master_tu_wien_curriculum
    # ===================================================================== #
    # === lectures_commandline --bachelor_botanik
    # ===================================================================== #
    when /^-?-?bachelor(-|_| )?botanik(-|_| )?curriculum$/i,
         /^-?-?bachelor(-|_| )?botanik$/i,
         /^botanik$/,
         'botany'
      use_bachelor_botanik_curriculum
    # ===================================================================== #
    # === lectures_commandline --bachelor-boku-ubrm
    # ===================================================================== #
    when /^-?-?bachelor(-|_| )?boku(-|_| )?ubrm$/i,
         /^-?-?boku(-|_| )?ubrm$/i,
         /^-?-?ubrm$/i
      use_bachelor_ubrm_curriculum
    # ===================================================================== #
    # === curriculum --master_immunobiologie --do-not-show-upcoming-exams
    # ===================================================================== #
    when /-?-?do-?not-?show-?upcoming-?exams/,
         /-?-?do-?not-?show-?next-?exams/,
         /-?-?no-?next-?exams/
      do_not_show_the_next_exams
    # ===================================================================== #
    # === curriculum --files
    # ===================================================================== #
    when /-?-?files?\??/,
         /-?-?fshow(_|-)?important(_|-)?files/
      show_important_files
      exit
    # ===================================================================== #
    # === curriculum --help
    # ===================================================================== #
    when /^-?-?help$/
      show_help
      exit
    # ===================================================================== #
    # === lectures_commandline --available-curricula
    # ===================================================================== #
    when /-?-?available-?curricula/,
         /-?-?show-?available/
      show_available_curricula
      exit
    else # else tag
      opne "Unknown input `#{sfancy(i)}` "\
              "(in the method #{__method__}())"
      exit # We will exit since as of April 2018; less confusing to do so.
    end
  end
end

#n_ects_points_in_total?Boolean Also known as: total_ects_points?

#

n_ects_points_in_total?

#

Returns:

  • (Boolean)


2296
2297
2298
# File 'lib/studium/utility_scripts/show_lectures_on_the_commandline/show_lectures_on_the_commandline.rb', line 2296

def n_ects_points_in_total?
  @this_curriculum_has_n_ects_points_in_total
end

#n_ects_were_passed_in_this_curriculum?Boolean Also known as: n_ects_were_passed_in_this_curriculum, n_ects_were_passed_so_far

#

n_ects_were_passed_in_this_curriculum?

#

Returns:

  • (Boolean)


2288
2289
2290
# File 'lib/studium/utility_scripts/show_lectures_on_the_commandline/show_lectures_on_the_commandline.rb', line 2288

def n_ects_were_passed_in_this_curriculum?
  @n_ects_were_passed_so_far
end

#n_lectures_are_already_solved?Boolean Also known as: n_lectures_completed?

#

n_lectures_are_already_solved?

#

Returns:

  • (Boolean)


2253
2254
2255
# File 'lib/studium/utility_scripts/show_lectures_on_the_commandline/show_lectures_on_the_commandline.rb', line 2253

def n_lectures_are_already_solved?
  @n_lectures_are_already_solved
end

#n_lectures_in_this_curriculum?Boolean

#

n_lectures_in_this_curriculum?

#

Returns:

  • (Boolean)


2126
2127
2128
# File 'lib/studium/utility_scripts/show_lectures_on_the_commandline/show_lectures_on_the_commandline.rb', line 2126

def n_lectures_in_this_curriculum?
  @dataset.size
end

#n_total_lectures?Boolean

#

n_total_lectures?

#

Returns:

  • (Boolean)


2260
2261
2262
# File 'lib/studium/utility_scripts/show_lectures_on_the_commandline/show_lectures_on_the_commandline.rb', line 2260

def n_total_lectures?
  @dataset.size
end

#no_html_and_do_not_report_anythingObject

#

no_html_and_do_not_report_anything

#


2590
2591
2592
2593
# File 'lib/studium/utility_scripts/show_lectures_on_the_commandline/show_lectures_on_the_commandline.rb', line 2590

def no_html_and_do_not_report_anything
  no_html
  do_not_report_anything
end

#no_html_pageObject Also known as: no_html

#

no_html_page7

#


2202
2203
2204
# File 'lib/studium/utility_scripts/show_lectures_on_the_commandline/show_lectures_on_the_commandline.rb', line 2202

def no_html_page
  @generate_html_file = false
end

#obtain_sanitized_dataset_from(i) ⇒ Object

#

obtain_sanitized_dataset_from

This method combines two other methods - loading the dataset that belongs to a Curriculum; and sorting that dataset.

#


2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
# File 'lib/studium/utility_scripts/show_lectures_on_the_commandline/show_lectures_on_the_commandline.rb', line 2356

def obtain_sanitized_dataset_from(i)
  # ======================================================================= #
  # Keep in mind that the following method also allows for optional
  # arguments such as :remove_comments_and_title
  #
  # We do not need to do this for this file, though, as this file may
  # probably make use of all the information it can get.
  # ======================================================================= #
  dataset = Studium.read_dataset_from_a_curriculum_file(i).map(&:chomp)
  # ======================================================================= #
  # Next, we must check for duplicate entries. For now we will work on
  # the dataset obtained above ^^^ but if we need a more accurate 
  # approach, we should work on the name + LVA-ID of the lecture at
  # hand instead.
  # ======================================================================= #
  unless dataset == dataset.uniq
    e 'We have found at the least one duplicate entry. This will be '\
      'shown next:'
    e
    these_are_the_duplicates = {}
    these_are_the_duplicates.default = 0
    dataset.each {|this_entry|
      these_are_the_duplicates[this_entry] += 1
    }
    these_are_the_duplicates.select {|key, value| value > 1 }.each {|duplicate, n_times|
      e sfancy("  #{duplicate}")
    }
    e
    e 'Please correct these entries before we can continue.'
    exit
  end
  sort_dataset(dataset) if @shall_we_sort_the_dataset
end

#opnn(i = namespace?) ) ⇒ Object

#

opnn

#


2609
2610
2611
2612
2613
2614
2615
# File 'lib/studium/utility_scripts/show_lectures_on_the_commandline/show_lectures_on_the_commandline.rb', line 2609

def opnn(i = namespace?)
  if block_given?
    super(i) { yield }
  else
    super(i)
  end
end

#prepend_this_to_dataset(i = :bachelor_biologie_basisblock_curriculum) ⇒ Object

#

prepend_this_to_dataset

An Array can be given to this method. If a symbol is given, such as :bachelor_lbt, then that symbol will be treated in a special way as far as this method is concerned.

#


2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
# File 'lib/studium/utility_scripts/show_lectures_on_the_commandline/show_lectures_on_the_commandline.rb', line 2307

def prepend_this_to_dataset(
    i = :bachelor_biologie_basisblock_curriculum
  )
  original_input = i.dup
  if i.is_a? Symbol
    # ===================================================================== #
    # Here we will handle input such as :bachelor_lbt.
    # ===================================================================== #
    i = return_curriculum_file_based_on_this_input(i)
  end
  if i.is_a? Array
    i.flatten.each {|entry| prepend_this_to_dataset(entry) }
  else
    if i.nil?
      e 'A nil value was encountered, onto the method called '+
        steelblue('prepend_this_dataset()')+'.'
      e 'The original input was: '+
        royalblue(original_input.to_s)
    elsif File.exist? i # Read in existing files.
      array = obtain_sanitized_dataset_from(i)
      @dataset = array+@dataset
      @dataset.flatten!
      exclude_title_entries_from_the_main_dataset
    # ===================================================================== #
    # The next check is for ad-hoc addition of lectures, such as via:
    #   ['892100 Physik (KTWW+HNT)']
    # ===================================================================== #
    elsif is_this_a_registered_lecture? i
      @dataset << i
    else
      opne "No file exists at #{sfile(i)}."
    end
  end
end

#read_from_these_files?Boolean Also known as: loaded_from_which_file?, curriculum_file?, curriculum_file_location?, curriculum_file_location, curriculum?

#

read_from_these_files?

#

Returns:

  • (Boolean)


1945
1946
1947
# File 'lib/studium/utility_scripts/show_lectures_on_the_commandline/show_lectures_on_the_commandline.rb', line 1945

def read_from_these_files?
  @read_from_these_files # This also means to keep track of the position of the curriculum-file.
end

#read_in_dataset_from_this_file(i) ⇒ Object

#

read_in_dataset_from_this_file

Input to this method should be a String, not an Array.

#


2135
2136
2137
2138
2139
# File 'lib/studium/utility_scripts/show_lectures_on_the_commandline/show_lectures_on_the_commandline.rb', line 2135

def read_in_dataset_from_this_file(i)
  @dataset << obtain_sanitized_dataset_from(i)
  @dataset.flatten!
  check_for_title_entry_in_the_file(i)
end

#read_in_main_dataset_from_the_existing_files(i = @read_from_these_files) ⇒ Object

#

read_in_main_dataset_from_the_existing_files

This method will read in from an Array, which is usually stored in the instance variables @read_from_these_files.

Input to this method can be like this:

["/Programs/Ruby/2.5.1/lib/ruby/site_ruby/2.5.0/studium/yaml/curricula/master_bioinformatik_066875.yml"]
#


1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
# File 'lib/studium/utility_scripts/show_lectures_on_the_commandline/show_lectures_on_the_commandline.rb', line 1973

def read_in_main_dataset_from_the_existing_files(
    i = @read_from_these_files
  )
  if i
    i.each {|this_file|
      # =================================================================== #
      # The next method will read into the variable @dataset.
      # =================================================================== #
      if File.exist? this_file.to_s
        read_in_dataset_from_this_file(this_file) # Delegate to this method.
      else
        opne "Can not read from non-existing file "\
                "`#{sfile(this_file)}`."
        opne 'The original input to the method '+
                sfancy(__method__.to_s)+' was '+
                sfancy(i)+' (class '+i.to_s+')'
        opne 'The '+orange('caller-stack')+' will be shown next:'
        e
        pp caller()
        e
        exit
      end
    }
  end
end

#report_how_many_ects_points_are_in_this_curriculumObject

#

report_how_many_ects_points_are_in_this_curriculum

#


2216
2217
2218
2219
2220
2221
# File 'lib/studium/utility_scripts/show_lectures_on_the_commandline/show_lectures_on_the_commandline.rb', line 2216

def report_how_many_ects_points_are_in_this_curriculum
  if @do_report
    e return_how_many_ects_points_this_curriculum_has_in_total
    e
  end
end

#report_how_many_ects_points_have_been_passed_alreadyObject

#

report_how_many_ects_points_have_been_passed_already

#


2091
2092
2093
2094
2095
2096
2097
# File 'lib/studium/utility_scripts/show_lectures_on_the_commandline/show_lectures_on_the_commandline.rb', line 2091

def report_how_many_ects_points_have_been_passed_already
  array = return_how_many_ects_points_have_been_passed_already
  e array.first
  e
  e array.last
  e
end

#report_how_many_exams_have_been_passed_alreadyObject

#

report_how_many_exams_have_been_passed_already

To invoke this method try:

emo --agrarwissenschaften
#


2107
2108
2109
2110
2111
2112
2113
2114
# File 'lib/studium/utility_scripts/show_lectures_on_the_commandline/show_lectures_on_the_commandline.rb', line 2107

def report_how_many_exams_have_been_passed_already
  n_lectures_are_in_this_curriculum = n_lectures_in_this_curriculum?
  opne sfancy(@n_lectures_are_already_solved.to_s)+' lectures have '\
          'already been passed out'
  opne 'of a total '+
          slateblue(n_lectures_are_in_this_curriculum.to_s)+', in '\
          'the curriculum '+simp(title?.to_s)+'.'
end

#report_how_many_lectures_are_in_this_curriculum_and_how_many_of_them_are_already_solvedObject

#

report_how_many_lectures_are_in_this_curriculum_and_how_many_of_them_are_already_solved

#


2233
2234
2235
2236
2237
2238
2239
2240
2241
# File 'lib/studium/utility_scripts/show_lectures_on_the_commandline/show_lectures_on_the_commandline.rb', line 2233

def report_how_many_lectures_are_in_this_curriculum_and_how_many_of_them_are_already_solved
  array = return_how_many_lectures_are_in_this_curriculum_and_how_many_of_them_are_already_solved
  if @do_report
    e
    e array[0]
    e array[1]
    e
  end
end

#report_the_average_gradeObject

#

report_the_average_grade

#


2144
2145
2146
2147
2148
2149
2150
# File 'lib/studium/utility_scripts/show_lectures_on_the_commandline/show_lectures_on_the_commandline.rb', line 2144

def report_the_average_grade
  if @do_report
    average_grade = return_the_average_grade
    e "The #{gold('average grade')} is: #{sfancy(average_grade)}"
    e
  end
end

#report_the_university_attributionObject

#

report_the_university_attribution

This method will report the university-attribution of that curriculum.

#


2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
# File 'lib/studium/utility_scripts/show_lectures_on_the_commandline/show_lectures_on_the_commandline.rb', line 2646

def report_the_university_attribution
  require 'studium/toplevel_methods/toplevel_methods.rb'
  # ======================================================================= #
  # We must build up our main Hash next. That Hash should look e. g.
  # like this:
  #
  #   {
  #     "TU Wien"=>115.5,
  #     "Uni Wien"=>30.0,
  #     "BOKU Wien"=>26.0,
  #     "Vetmed Wien"=>8.5
  #   }
  #
  # ======================================================================= #
  sanitize_the_dataset
  hash = {}
  @dataset.each {|entry|
    pointer = @lecture_dataset[entry]
    if pointer
      n_ects = pointer[:ects]
      this_university = pointer[:university]
      if hash.has_key? this_university
        hash[this_university] += n_ects
      else
        hash[this_university] = n_ects
      end
    else
      e steelblue('No entry found for ')+
        royalblue(entry.to_s)
    end
  }
  Studium.report_n_ects_per_university(hash, n_ects_points_in_total?)
end

#report_title(this_title = @title) ⇒ Object Also known as: display_the_name_of_the_curriculum

#

report_title

Use this method to report the title of the Curriculum at hand.

#


2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
# File 'lib/studium/utility_scripts/show_lectures_on_the_commandline/show_lectures_on_the_commandline.rb', line 2557

def report_title(
    this_title = @title
  )
  if this_title
    e; e springgreen(this_title); e
  else
    opne 'No title was set via @title. This is '\
            'currently disallowed, so we exit now.'
    opne "The file to read from was `"\
            "#{sfancy(@read_from_this_file)}`."
    exit
  end
end

#resetObject

#

reset

#


2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
# File 'lib/studium/utility_scripts/show_lectures_on_the_commandline/show_lectures_on_the_commandline.rb', line 2683

def reset
  super()
  is_bachelor_curriculum # ← This is just to set a default.
  infer_the_namespace
  # ======================================================================= #
  # === @lecture_dataset
  #
  # This variable keeps track of all registered lectures at the
  # universities.
  # ======================================================================= #
  @lecture_dataset = return_dataset_from_the_file_lecture_information
  # ======================================================================= #
  # === @this_curriculum_has_n_ects_points_in_total
  # ======================================================================= #
  @this_curriculum_has_n_ects_points_in_total = 0
  # ======================================================================= #
  # === @n_ects_were_passed_so_far
  # ======================================================================= #
  @n_ects_were_passed_so_far = 0
  # ======================================================================= #
  # === @shall_we_sort_the_dataset
  # ======================================================================= #
  @shall_we_sort_the_dataset = true # ← Whether to sort the dataset or not.
  # ======================================================================= #
  # === @dataset
  # ======================================================================= #
  @dataset = []
  # ======================================================================= #
  # === @title
  #
  # Which title to use for this curriculum.
  # ======================================================================= #
  @title = nil
  # ======================================================================= #
  # === @hash_containing_the_lectures_for_this_curriculum
  #
  # The following hash will contain the lectures that are used for
  # the curriculum. Specifically it will be used to autogenerate the
  # .html file.
  # ======================================================================= #
  @hash_containing_the_lectures_for_this_curriculum = {}
  # ======================================================================= #
  # === @individual_curriculum
  #
  # The following variable determines whether this lecture is an
  # individual curriculum or whether it is not.
  # ======================================================================= #
  @individual_curriculum = false
  # ======================================================================= #
  # === @show_next_exams
  # ======================================================================= #
  @show_next_exams = true
  # ======================================================================= #
  # === @n_lectures_are_already_solved
  # ======================================================================= #
  @n_lectures_are_already_solved = 0
  # ======================================================================= #
  # Next, determine from which files we will read.
  # ======================================================================= #
  determine_from_which_files_to_read
  # ======================================================================= #
  # === @array_storing_the_grades
  # ======================================================================= #
  @array_storing_the_grades = []
  # ======================================================================= #
  # === @generate_html_file
  #
  # If the following variable is true then this class will additionally
  # generate a .html file.
  # ======================================================================= #
  @generate_html_file = true
  # ======================================================================= #
  # === @mode
  #
  # The @mode can be :commandline or :www.
  # ======================================================================= #
  @mode = :commandline
  # ======================================================================= #
  # === @show_loaded_from_which_file
  # ======================================================================= #
  @show_loaded_from_which_file = true
  # ======================================================================= #
  # === @do_report
  # ======================================================================= #
  @do_report = true
  # ======================================================================= #
  # === @show_all_URLs
  # ======================================================================= #
  @show_all_URLs = false
  # ======================================================================= #
  # === @html_string
  # ======================================================================= #
  @html_string = nil
  # ======================================================================= #
  # === @show_to_which_universities_the_lectures_belong_to
  #
  # By default we will not show to which university the given lectures
  # belong to.
  # ======================================================================= #
  @show_to_which_universities_the_lectures_belong_to = false
  # ======================================================================= #
  # === @append_this_string_onto_the_html_string
  #
  # The following instance variable can be used to append more onto
  # the main HTML string.
  # ======================================================================= #
  @append_this_string_onto_the_html_string = ''.dup
  # ======================================================================= #
  # === @ignore_outdated_lectures
  # ======================================================================= #
  @ignore_outdated_lectures = false
end

#return_and_check_file_for_this_curriculum(i) ⇒ Object

#

return_and_check_file_for_this_curriculum

The reason we have this method here is so that we can intercept individual curricula. If it is an individual curriculum then we will also show the university-attribution in the generated .html file.

#


697
698
699
700
701
702
703
# File 'lib/studium/utility_scripts/show_lectures_on_the_commandline/show_lectures_on_the_commandline.rb', line 697

def return_and_check_file_for_this_curriculum(i)
  if i.to_s.include?('individuelles_curriculum') or
     i.to_s.include?('vector') # Special exception.
    do_show_lecture_attribution_to_universities
  end
  return return_file_for_this_curriculum(i) # ← in studium/base/curriculum.rb
end

#return_arrow_pointing_to_the_right_side(optional_margin_left = nil) ⇒ Object

#

return_arrow_pointing_to_the_right_side

#


757
758
759
760
761
762
763
764
765
766
767
# File 'lib/studium/utility_scripts/show_lectures_on_the_commandline/show_lectures_on_the_commandline.rb', line 757

def return_arrow_pointing_to_the_right_side(
    optional_margin_left = nil
  )
  if optional_margin_left
    '<img src="/home/x/data/images/STD/PFEIL6_red.png" style="margin-left:'+
    optional_margin_left.to_s+
    '">'.dup
  else
    '<img src="/home/x/data/images/STD/PFEIL6_red.png">'.dup
  end
end

#return_bachelor_or_master_logo(this_lecture = nil) ⇒ Object

#

Here we differ between bachelor-logo and the master-logo.

By default, we will operate on @type_of_the_curriculum, but this can be wrong in a mixed bachelor-master curriculum.

#


2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
# File 'lib/studium/utility_scripts/show_lectures_on_the_commandline/show_lectures_on_the_commandline.rb', line 2530

def (
    this_lecture = nil
  )
  if this_lecture.nil?
    case @type_of_the_curriculum
    when :bachelor
      BACHELOR_IMAGE
    when :master
      MASTER_IMAGE
    end
  else
    # ===================================================================== #
    # Else assume an Array was given.
    # ===================================================================== #
    if this_lecture.any? {|entry| entry.start_with?('033') }
      BACHELOR_IMAGE
    else
      MASTER_IMAGE
    end
  end
end

#return_how_many_ects_points_have_been_passed_already(use_for = @mode) ⇒ Object

#

return_how_many_ects_points_have_been_passed_already

#


2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
# File 'lib/studium/utility_scripts/show_lectures_on_the_commandline/show_lectures_on_the_commandline.rb', line 2060

def return_how_many_ects_points_have_been_passed_already(
    use_for = @mode
  )
  n_percent = (
    (@n_ects_were_passed_so_far.to_f * 100) / n_ects_points_in_total?
  ).round(2)
  # ======================================================================= #
  # The next variable is not colourized by default, so that we can use
  # it for the :use_for_html entry point that will come next. A similar
  # reason is valid for the variable called `second_part`.
  # ======================================================================= #
  colourized_n_ECTS_points_were_passed = @n_ects_were_passed_so_far.to_s
  second_part = "  <b>#{@title}</b>."
  case use_for
  when :use_for_html # (html tag, www tag)
    first_part = "In total we have passed <b>#{colourized_n_ECTS_points_were_passed} ECTS "\
                 "points</b> (<b>#{n_percent.to_s+'%'}</b>) so far in the"
  when :commandline, :default # This is the default.
    colourized_n_ECTS_points_were_passed = plum(
      colourized_n_ECTS_points_were_passed
    )
    first_part = "In total we have passed #{colourized_n_ECTS_points_were_passed} ECTS "\
                 "points (#{orangered(n_percent.to_s+'%')}) so far in the"
    second_part = "  #{sfancy(@title)}."
  end
  [ first_part, second_part ]
end

#return_how_many_ects_points_this_curriculum_has_in_total(use_colours = true) ⇒ Object

#

return_how_many_ects_points_this_curriculum_has_in_total

#


1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
# File 'lib/studium/utility_scripts/show_lectures_on_the_commandline/show_lectures_on_the_commandline.rb', line 1880

def return_how_many_ects_points_this_curriculum_has_in_total(
    use_colours = true
  )
  case use_colours
  when :no_colours
    use_colours = false
  end
  n_ects_points = @this_curriculum_has_n_ects_points_in_total
  # ======================================================================= #
  # Use colours, if issued to do so. On the commandline, this will
  # be the tomato colour.
  # ======================================================================= #
  if use_colours
    n_ects_points = tomato(n_ects_points)
  else
    n_ects_points = "<b>#{n_ects_points}</b>" # In this case we will assume www-use.
  end
  # ======================================================================= #
  # Next, return the Strings that informs the user how many ECTS points
  # the given curriculm has, in total. Since as of November 2019, we
  # will also inform the user how many of these ECTS require a
  # continuous mandatory assessment ("prüfungsimmanent").
  # ======================================================================= #
  n_ects_prüfungsimmanent = 0
  @dataset.each {|line|
    # ===================================================================== #
    # A line may look like this:
    #
    #   182.711 Betriebssysteme                            # 2.0 ECTS, VO
    #
    # ===================================================================== #
    name = line.dup
    if name.include? '#'
      name = name[0 .. (name.index('#') - 1)]
      name.strip!
      # =================================================================== #
      # Must still squeeze a bit:
      # =================================================================== #
      name.squeeze!(' ')
      if @lecture_dataset.has_key? name
        pointer = @lecture_dataset[name]
        n_ects  = pointer[:ects].to_f
        type    = pointer[:type]
        if is_prüfungsimmanent?(type)
          n_ects_prüfungsimmanent += n_ects
        end
      end
    end
  }
  n_percent_prüfungsimmanent = ((
    n_ects_prüfungsimmanent.to_f * 100.0
  ) / @this_curriculum_has_n_ects_points_in_total.to_f).round(1)
  colourized_n_ects_prüfungsimmanent =
    skyblue(n_percent_prüfungsimmanent.to_s.dup)
  "This curriculum has #{n_ects_points} ECTS points "\
  "in total, of which "\
  "#{colourized_n_ects_prüfungsimmanent} ECTS "\
  "("+n_percent_prüfungsimmanent.to_s+"%)\n"\
  "require continuous mandatory assessment "\
  "(#{orangered('prüfungsimmanent')})."
end

#return_how_many_lectures_are_in_this_curriculum_and_how_many_of_them_are_already_solved(optional_use_colours = true) ⇒ Object

#

return_how_many_lectures_are_in_this_curriculum_and_how_many_of_them_are_already_solved

This method will return an Array with two members. The reason for this is that it is easier on the commandline to output two Arrays; and to also use this when we autogenerate a .html file.

#


3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
# File 'lib/studium/utility_scripts/show_lectures_on_the_commandline/show_lectures_on_the_commandline.rb', line 3087

def return_how_many_lectures_are_in_this_curriculum_and_how_many_of_them_are_already_solved(
    optional_use_colours = true
  )
  n_percent = (
    (@n_lectures_are_already_solved.to_i * 100) / @dataset.size.to_f
  ).round(1)
  case optional_use_colours # Use colours in this case.
  # ======================================================================= #
  # === :use_for_html
  # ======================================================================= #
  when :use_for_html # (html tag, www tag)
    colourized_n_percent_finished = ' (<b>'+n_percent.to_s+'% finished'+'</b>)'
    first_part = "A total of <b>#{@dataset.size.to_s}</b> lectures are part of this Curriculum."
    second_part = "<b>#{@n_lectures_are_already_solved.to_s}</b> of these "\
                  "are already solved.#{colourized_n_percent_finished}"
  # ======================================================================= #
  # === :no_colours
  # ======================================================================= #
  when :no_colours, false
    colourized_n_percent_finished = ' ('+n_percent.to_s+'% finished'+')'
    first_part = "A total of #{@dataset.size.to_s} lectures are part of this Curriculum."
    second_part = "#{@n_lectures_are_already_solved.to_s} of these "\
                  "are already solved.#{colourized_n_percent_finished}"
  else # This here is the default clause.
    colourized_n_percent_finished = ' ('+orangered(n_percent.to_s+'% finished')+')'
    first_part = "A total of #{springgreen(@dataset.size.to_s)} "\
                 "lectures are part of this Curriculum."
    second_part = "#{springgreen(@n_lectures_are_already_solved.to_s)} of these "\
                  "are already solved.#{colourized_n_percent_finished}"
  end
  [ first_part, second_part ]
end

#return_proper_logo_for_this_university(i) ⇒ Object

#

return_proper_logo_for_this_university

#


2416
2417
2418
2419
2420
# File 'lib/studium/utility_scripts/show_lectures_on_the_commandline/show_lectures_on_the_commandline.rb', line 2416

def return_proper_logo_for_this_university(
    i
  )
  Studium.return_proper_university_image(i)
end

#return_the_average_gradeObject

#

return_the_average_grade

This method will return the average grade. So for example, if we have passed three exams, with a grade of 2, 3 and 4, respectively, then the average grade will be 2 + 3 + 4 = 9 / 3 → 3.

#


2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
# File 'lib/studium/utility_scripts/show_lectures_on_the_commandline/show_lectures_on_the_commandline.rb', line 2624

def return_the_average_grade
  # ======================================================================= #
  # We must work on a copy, because some grades, such as '+', are not
  # useful for calculating the average grade - hence we will have to
  # weed these entries out, for the purpose of calculating the
  # average grade through this method here.
  # ======================================================================= #
  array_storing_the_grades = @array_storing_the_grades.dup
  array_storing_the_grades.reject! {|grade|
    grade == '+' or grade == 'E' # Remove '+' and 'E' exam results.
  }
  average_grade = (
    array_storing_the_grades.sum.to_f / array_storing_the_grades.size
  ).round(2)
  return average_grade
end

#return_timetable_of_upcoming_examsObject

#

return_timetable_of_upcoming_exams

This method is for the display of a HTML timetable <div> element.

It will be near the bottom part of the auto-generated .html file, if we actually wish to generate a .html file.

#


777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
# File 'lib/studium/utility_scripts/show_lectures_on_the_commandline/show_lectures_on_the_commandline.rb', line 777

def return_timetable_of_upcoming_exams
  # ======================================================================= #
  # The dataset consists of the lectures that are part of this curriculum.
  # ======================================================================= #
  new_hash = {}
  dataset = @hash_containing_the_lectures_for_this_curriculum
  # ======================================================================= #
  # We have to time-sort this.
  # ======================================================================= #
  dataset = dataset.sort_by {|name_of_the_lecture, inner_hash|
    if inner_hash.has_key? 'exams'
      exams = inner_hash['exams']
      if exams.is_a? Array
        exams = exams.first
        if exams.include? ', '
          exams = exams.split(', ').first.strip
        end
      end
    else
      exams = '01.01.2500' # <- Fake time stamp.
    end
    if exams.empty?
      exams = '01.01.2500' # <- Fake time stamp.
    end
    Time.parse(exams)
  }
  dataset.each {|inner_array|
    key   = inner_array.first
    value = inner_array.last
    new_hash[key] = value
  }
  Studium.return_div_timetable_of_upcoming_exams(dataset)
end

#runObject

#

run (run tag)

The menu() method has to come before any other methods here.

#


2821
2822
2823
2824
2825
2826
2827
2828
2829
# File 'lib/studium/utility_scripts/show_lectures_on_the_commandline/show_lectures_on_the_commandline.rb', line 2821

def run
  menu # First, pass the commandline into the menu-method.
  read_in_main_dataset_from_the_existing_files
  if commandline?
    try_to_rename_kde_konsole_tab
    report_title
  end
  do_all_actions_after_the_main_dataset_was_read_in # Continue here.
end

#sanitize_the_datasetObject

#

sanitize_the_dataset

#


2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
# File 'lib/studium/utility_scripts/show_lectures_on_the_commandline/show_lectures_on_the_commandline.rb', line 2473

def sanitize_the_dataset
  @dataset.map! {|entry|
    entry = entry.dup if entry.frozen?
    entry.squeeze!(' ')
    if entry.include? '#'
      entry = entry[0 .. (entry.index('#')-1)]
    end
    entry.strip!
    entry
  }
end

#set_commandline_arguments(i) ⇒ Object

#

set_commandline_arguments

#


1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
# File 'lib/studium/utility_scripts/show_lectures_on_the_commandline/show_lectures_on_the_commandline.rb', line 1859

def set_commandline_arguments(i)
  # ======================================================================= #
  # We will handle empty Arrays a bit differently if we are on
  # a roebe-system.
  # ======================================================================= #
  if i.is_a?(Array) and i.empty?
    i << :bachelor_vektorx # Set a default value here.
  end
  @commandline_arguments = i
end

#set_dataset(i) ⇒ Object Also known as: set_all_lectures

#

set_dataset

#


1873
1874
1875
# File 'lib/studium/utility_scripts/show_lectures_on_the_commandline/show_lectures_on_the_commandline.rb', line 1873

def set_dataset(i)
  @dataset = i
end

#set_html_string(i) ⇒ Object

#

set_html_string

#


814
815
816
# File 'lib/studium/utility_scripts/show_lectures_on_the_commandline/show_lectures_on_the_commandline.rb', line 814

def set_html_string(i)
  @html_string = i.to_s.dup
end

#set_title(i) ⇒ Object Also known as: set_title_of_the_curriculum

#

set_title

The title of the Curriculum in question. Should be hardcoded in the file.

#


2577
2578
2579
2580
2581
2582
2583
2584
2585
# File 'lib/studium/utility_scripts/show_lectures_on_the_commandline/show_lectures_on_the_commandline.rb', line 2577

def set_title(i)
  i = i.first if i.is_a? Array
  i = i.dup.delete(N) # Want to work on a String really.
  if i.start_with? '# ==='
    i.sub!(/^# === /,'')
  end
  i.sub!(/^@title /,'') if i.include? '@title '
  @title = i.strip.chomp
end

#show_available_curriculaObject

#

show_available_curricula

This method will show the available Curricula.

Invocation example:

studium_solved --show-available
#


2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
# File 'lib/studium/utility_scripts/show_lectures_on_the_commandline/show_lectures_on_the_commandline.rb', line 2860

def show_available_curricula
  e 'These curricula are available:'
  e
  Studium.return_array_location_of_all_registered_curricula.each {|entry|
    if entry.is_a? Array
      entry.each {|inner_entry|
        e "  #{sfancy(File.basename(inner_entry).sub(/\.yml$/,''))}"
      }
    else
      e "  #{sfancy(File.basename(entry).sub(/\.yml$/,'').strip)}"
    end
  }; e
end

#show_helpObject

#

show_help (help tag)

The help options for class Studium::ShowLecturesOnTheCommandline are stored in this method here.

To invoke this method, do:

show_lectures_on_the_commandline --help
#


723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
# File 'lib/studium/utility_scripts/show_lectures_on_the_commandline/show_lectures_on_the_commandline.rb', line 723

def show_help
  e
  opnn { :no_trailing_colon }
  help_string = <<-EOF


The following help-options are available and documented:

EOF
  e help_string
  ecomment "  #{slateblue('--available-curricula?')}         # show "\
           "which curricula are available"
  ecomment "  #{slateblue('--do-not-show-upcoming-exams')}   # Do not show upcoming exams"
  ecomment "  #{slateblue('--show-all-URLs')}                # Also "\
           "show remote URLs of already solved lectures"
  ecomment "  #{slateblue('--priority-points')}              # Display "\
           "a curriculum based on priority points"
  ecomment "  #{slateblue('--use-this-curriculum=foo.md')}   # use "\
           "this curriculum as specified in the file"
  e
end

#show_important_files(use_this_file = Studium.file_lecture_information) ⇒ Object

#

show_important_files

This method will show the file that has all lectures registered.

Usage example:

curriculum --files?
#


2841
2842
2843
2844
2845
2846
2847
2848
# File 'lib/studium/utility_scripts/show_lectures_on_the_commandline/show_lectures_on_the_commandline.rb', line 2841

def show_important_files(
    use_this_file = Studium.file_lecture_information
  )
  e "The following file is the most important file by far:"
  e
  e "  #{sfile(use_this_file)}"
  e
end

#show_loaded_from_which_file?Boolean

#

show_loaded_from_which_file?

#

Returns:

  • (Boolean)


2209
2210
2211
# File 'lib/studium/utility_scripts/show_lectures_on_the_commandline/show_lectures_on_the_commandline.rb', line 2209

def show_loaded_from_which_file?
  @show_loaded_from_which_file
end

#sort_dataset(i = @dataset) ⇒ Object

#

sort_dataset

This method will sort the dataset, according to the name of the lecture rather than the leading ID number.

#


2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
# File 'lib/studium/utility_scripts/show_lectures_on_the_commandline/show_lectures_on_the_commandline.rb', line 2491

def sort_dataset(
    i = @dataset
  )
  i.sort_by! {|line|
    # ===================================================================== #
    # The next line will split on ' ' tokens, take all but the first
    # entry, rejoin, strip and delete '(' tokens. So essentially we
    # will strip away the leading numbers from the line at hand.
    # ===================================================================== #
    line.split(' ')[1 .. -1].join(' ').strip
  }
end

#starts_with_a_lecture_id_entry?(i) ⇒ Boolean

#

starts_with_a_lecture_id_entry?

#

Returns:

  • (Boolean)


2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
# File 'lib/studium/utility_scripts/show_lectures_on_the_commandline/show_lectures_on_the_commandline.rb', line 2507

def starts_with_a_lecture_id_entry?(i)
  result = false
  if i.include? ' '
    splitted = i.split(' ')
    first_entry = splitted.first
    # ===================================================================== #
    # See: https://rubular.com/r/EKEk3QuWRQ1s
    # ===================================================================== #
    if first_entry =~ /^\d+\.?[A-Z]*\d{1,4}$/
      result = true
    end
  end
  result
end

#title?Boolean Also known as: return_name_of_the_curriculum, name_of_the_curriculum, name_of_the_curriculum?

#

title?

#

Returns:

  • (Boolean)


2453
2454
2455
# File 'lib/studium/utility_scripts/show_lectures_on_the_commandline/show_lectures_on_the_commandline.rb', line 2453

def title?
  @title
end

#try_to_rename_kde_konsole_tab(use_this_title = return_name_of_the_curriculum) ⇒ Object

#

try_to_rename_kde_konsole_tab

This method can be used to rename the KDE Konsole tab.

#


1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
# File 'lib/studium/utility_scripts/show_lectures_on_the_commandline/show_lectures_on_the_commandline.rb', line 1374

def try_to_rename_kde_konsole_tab(
    use_this_title = return_name_of_the_curriculum
  )
  if rename_konsole_tab?
    begin
      require 'roebe/requires/require_kde_konsole.rb'
      Roebe::KdeKonsole.new(use_this_title) { :be_quiet }
    rescue LoadError
      if is_on_roebe?
        e "The #{steelblue('class Roebe::KdeKonsole')} is not "\
          "available. Install the roebe-gem."
      end
    end
  end
end

#type_of_the_curriculum?Boolean Also known as: curriculum_type?

#

type_of_the_curriculum?

#

Returns:

  • (Boolean)


2274
2275
2276
# File 'lib/studium/utility_scripts/show_lectures_on_the_commandline/show_lectures_on_the_commandline.rb', line 2274

def type_of_the_curriculum?
  @type_of_the_curriculum
end

#uniq_the_datasetObject

#

uniq_the_dataset

This ad-hoc method will simply eliminate all the duplicates that may exist in the main dataset at hand. It is only called from within menu() right now (December 2019).

#


2466
2467
2468
# File 'lib/studium/utility_scripts/show_lectures_on_the_commandline/show_lectures_on_the_commandline.rb', line 2466

def uniq_the_dataset
  @dataset.uniq!
end

#use_bachelor_agrarwissenschaften_curriculumObject

#

use_bachelor_agrarwissenschaften_curriculum

#


542
543
544
# File 'lib/studium/utility_scripts/show_lectures_on_the_commandline/show_lectures_on_the_commandline.rb', line 542

def use_bachelor_agrarwissenschaften_curriculum
  determine_from_which_file_to_read(:bachelor_agrarwissenschaften_curriculum)
end

#use_bachelor_biologie_basisblock_curriculumObject

#

use_bachelor_biologie_basisblock_curriculum

#


605
606
607
# File 'lib/studium/utility_scripts/show_lectures_on_the_commandline/show_lectures_on_the_commandline.rb', line 605

def use_bachelor_biologie_basisblock_curriculum
  determine_from_which_file_to_read(:bachelor_basisblock_biologie)
end

#use_bachelor_biologische_informatikObject

#

use_bachelor_biologische_informatik

#


675
676
677
# File 'lib/studium/utility_scripts/show_lectures_on_the_commandline/show_lectures_on_the_commandline.rb', line 675

def use_bachelor_biologische_informatik
  determine_from_which_file_to_read(:bachelor_biologische_informatik)
end

#use_bachelor_botanik_curriculumObject

#

use_bachelor_botanik_curriculum

#


556
557
558
# File 'lib/studium/utility_scripts/show_lectures_on_the_commandline/show_lectures_on_the_commandline.rb', line 556

def use_bachelor_botanik_curriculum
  determine_from_which_file_to_read(:bachelor_botanik_curriculum)
end

#use_bachelor_chemie_curriculumObject

#

use_bachelor_chemie_curriculum

#


584
585
586
# File 'lib/studium/utility_scripts/show_lectures_on_the_commandline/show_lectures_on_the_commandline.rb', line 584

def use_bachelor_chemie_curriculum
  determine_from_which_file_to_read(:bachelor_chemie_curriculum)
end

#use_bachelor_dummy_curriculumObject

#

use_bachelor_dummy_curriculum

#


382
383
384
# File 'lib/studium/utility_scripts/show_lectures_on_the_commandline/show_lectures_on_the_commandline.rb', line 382

def use_bachelor_dummy_curriculum
  determine_from_which_file_to_read(:bachelor_dummy_curriculum)
end

#use_bachelor_ernährung_curriculumObject

#

use_bachelor_ernährung_curriculum

#


442
443
444
# File 'lib/studium/utility_scripts/show_lectures_on_the_commandline/show_lectures_on_the_commandline.rb', line 442

def use_bachelor_ernährung_curriculum
  determine_from_which_file_to_read(:bachelor_ernährung_curriculum)
end

#use_bachelor_forstwirtschaftObject

#

use_bachelor_forstwirtschaft

#


661
662
663
# File 'lib/studium/utility_scripts/show_lectures_on_the_commandline/show_lectures_on_the_commandline.rb', line 661

def use_bachelor_forstwirtschaft
  determine_from_which_file_to_read(:bachelor_forstwirtschaft)
end

#use_bachelor_genetik_curriculumObject

#

use_bachelor_genetik_curriculum

#


563
564
565
# File 'lib/studium/utility_scripts/show_lectures_on_the_commandline/show_lectures_on_the_commandline.rb', line 563

def use_bachelor_genetik_curriculum
  determine_from_which_file_to_read(:bachelor_genetik_curriculum)
end

#use_bachelor_informatik_curriculumObject

#

use_bachelor_informatik_curriculum

#


528
529
530
# File 'lib/studium/utility_scripts/show_lectures_on_the_commandline/show_lectures_on_the_commandline.rb', line 528

def use_bachelor_informatik_curriculum
  determine_from_which_file_to_read(:bachelor_informatik_curriculum)
end

#use_bachelor_informatik_und_biotechnologie_unter_berücksichtigung_immunanalytisch_molekularmedizinischer_aspekteObject

#

use_bachelor_informatik_und_biotechnologie_unter_berücksichtigung_immunanalytisch_molekularmedizinischer_aspekte

#


389
390
391
# File 'lib/studium/utility_scripts/show_lectures_on_the_commandline/show_lectures_on_the_commandline.rb', line 389

def use_bachelor_informatik_und_biotechnologie_unter_berücksichtigung_immunanalytisch_molekularmedizinischer_aspekte
  determine_from_which_file_to_read(:bachelor_informatik_und_biotechnologie_unter_berücksichtigung_immunanalytisch_molekularmedizinischer_aspekte)
end

#use_bachelor_ktww_curriculumObject

#

use_bachelor_ktww_curriculum

#


647
648
649
# File 'lib/studium/utility_scripts/show_lectures_on_the_commandline/show_lectures_on_the_commandline.rb', line 647

def use_bachelor_ktww_curriculum
  determine_from_which_file_to_read(:bachelor_boku_ktww_curriculum)
end

#use_bachelor_lmbt_curriculumObject

#

use_bachelor_lmbt_curriculum

#


535
536
537
# File 'lib/studium/utility_scripts/show_lectures_on_the_commandline/show_lectures_on_the_commandline.rb', line 535

def use_bachelor_lmbt_curriculum
  determine_from_which_file_to_read(:bachelor_boku_lmbt_curriculum)
end

#use_bachelor_master_tu_wien_curriculumObject

#

use_bachelor_master_tu_wien_curriculum

#


549
550
551
# File 'lib/studium/utility_scripts/show_lectures_on_the_commandline/show_lectures_on_the_commandline.rb', line 549

def use_bachelor_master_tu_wien_curriculum
  determine_from_which_file_to_read(:bachelor_master_tu_wien)
end

#use_bachelor_medizinische_informatik_curriculumObject

#

use_bachelor_medizinische_informatik_curriculum

#


514
515
516
# File 'lib/studium/utility_scripts/show_lectures_on_the_commandline/show_lectures_on_the_commandline.rb', line 514

def use_bachelor_medizinische_informatik_curriculum
  determine_from_which_file_to_read(:bachelor_medizinische_informatik_curriculum)
end

#use_bachelor_molbio_curriculumObject

#

use_bachelor_molbio_curriculum

#


619
620
621
# File 'lib/studium/utility_scripts/show_lectures_on_the_commandline/show_lectures_on_the_commandline.rb', line 619

def use_bachelor_molbio_curriculum
  determine_from_which_file_to_read(:bachelor_molekulare_biologie_curriculum)
end

#use_bachelor_molekularbiologie_curriculumObject Also known as: use_bachelor_molekularbiologie_graz_curriculum

#

use_bachelor_molekularbiologie_curriculum

#


456
457
458
# File 'lib/studium/utility_scripts/show_lectures_on_the_commandline/show_lectures_on_the_commandline.rb', line 456

def use_bachelor_molekularbiologie_curriculum
  determine_from_which_file_to_read(:bachelor_molekularbiologie_graz_curriculum)
end

#use_bachelor_pharmazie_curriculumObject

#

use_bachelor_pharmazie_curriculum

#


449
450
451
# File 'lib/studium/utility_scripts/show_lectures_on_the_commandline/show_lectures_on_the_commandline.rb', line 449

def use_bachelor_pharmazie_curriculum
  determine_from_which_file_to_read(:bachelor_pharmazie_curriculum)
end

#use_bachelor_technical_chemistry_curriculumObject

#

use_bachelor_technical_chemistry_curriculum

#


626
627
628
# File 'lib/studium/utility_scripts/show_lectures_on_the_commandline/show_lectures_on_the_commandline.rb', line 626

def use_bachelor_technical_chemistry_curriculum
  determine_from_which_file_to_read(:technical_chemistry_curriculum)
end

#use_bachelor_ubrm_curriculumObject

#

use_bachelor_ubrm_curriculum

#


640
641
642
# File 'lib/studium/utility_scripts/show_lectures_on_the_commandline/show_lectures_on_the_commandline.rb', line 640

def use_bachelor_ubrm_curriculum
  determine_from_which_file_to_read(:bachelor_boku_ubrm_curriculum)
end

#use_bachelor_vektor_curriculumObject

#

use_bachelor_vektor_curriculum

This method is to be used to read from the bachelor-vektorx curriculum.

#


685
686
687
# File 'lib/studium/utility_scripts/show_lectures_on_the_commandline/show_lectures_on_the_commandline.rb', line 685

def use_bachelor_vektor_curriculum
  determine_from_which_file_to_read(:bachelor_vektor_curriculum)
end

#use_bachelor_verfahrenstechnik_curriculumObject

#

use_bachelor_verfahrenstechnik_curriculum

#


633
634
635
# File 'lib/studium/utility_scripts/show_lectures_on_the_commandline/show_lectures_on_the_commandline.rb', line 633

def use_bachelor_verfahrenstechnik_curriculum
  determine_from_which_file_to_read(:bachelor_verfahrenstechnik_curriculum)
end

#use_bachelor_ökologie_curriculumObject

#

use_bachelor_ökologie_curriculum

#


521
522
523
# File 'lib/studium/utility_scripts/show_lectures_on_the_commandline/show_lectures_on_the_commandline.rb', line 521

def use_bachelor_ökologie_curriculum
  determine_from_which_file_to_read(:bachelor_ökologie_curriculum)
end

#use_individual_bachelor_informatik_und_molekulare_biologieObject

#

use_individual_bachelor_informatik_und_molekulare_biologie

#


708
709
710
# File 'lib/studium/utility_scripts/show_lectures_on_the_commandline/show_lectures_on_the_commandline.rb', line 708

def use_individual_bachelor_informatik_und_molekulare_biologie
  determine_from_which_file_to_read(:bachelor_individual_bachelor_informatik_und_molekulare_biologie)
end

#use_master_bioinformatics_and_nanobiotechnology_in_molecular_medicineObject

#

use_master_bioinformatics_and_nanobiotechnology_in_molecular_medicine

#


368
369
370
# File 'lib/studium/utility_scripts/show_lectures_on_the_commandline/show_lectures_on_the_commandline.rb', line 368

def use_master_bioinformatics_and_nanobiotechnology_in_molecular_medicine
  determine_from_which_file_to_read(:master_bioinformatics_and_nanobiotechnology_in_molecular_medicine)
end

#use_master_biologische_chemie_curriculumObject

#

use_master_biologische_chemie_curriculum

#


463
464
465
# File 'lib/studium/utility_scripts/show_lectures_on_the_commandline/show_lectures_on_the_commandline.rb', line 463

def use_master_biologische_chemie_curriculum
  determine_from_which_file_to_read(:master_biologische_chemie_curriculum)
end

#use_master_dummy_curriculumObject

#

use_master_dummy_curriculum

#


375
376
377
# File 'lib/studium/utility_scripts/show_lectures_on_the_commandline/show_lectures_on_the_commandline.rb', line 375

def use_master_dummy_curriculum
  determine_from_which_file_to_read(:master_dummy_curriculum)
end

#use_master_immunobiology_curriculumObject

#

use_master_immunobiology_curriculum

#


598
599
600
# File 'lib/studium/utility_scripts/show_lectures_on_the_commandline/show_lectures_on_the_commandline.rb', line 598

def use_master_immunobiology_curriculum
  determine_from_which_file_to_read(:master_immunobiology_curriculum)
end

#use_master_lmbt_curriculumObject

#

use_master_lmbt_curriculum

#


470
471
472
# File 'lib/studium/utility_scripts/show_lectures_on_the_commandline/show_lectures_on_the_commandline.rb', line 470

def use_master_lmbt_curriculum
  determine_from_which_file_to_read(:master_lmbt_curriculum)
end

#use_master_molbio_curriculumObject

#

use_master_molbio_curriculum

#


570
571
572
# File 'lib/studium/utility_scripts/show_lectures_on_the_commandline/show_lectures_on_the_commandline.rb', line 570

def use_master_molbio_curriculum
  determine_from_which_file_to_read(:master_molbio_curriculum)
end

#use_master_pharmazie_curriculumObject

#

use_master_pharmazie_curriculum

#


591
592
593
# File 'lib/studium/utility_scripts/show_lectures_on_the_commandline/show_lectures_on_the_commandline.rb', line 591

def use_master_pharmazie_curriculum
  determine_from_which_file_to_read(:master_pharmazie_curriculum)
end

#use_master_vektoren_curriculumObject

#

use_master_vektoren_curriculum

#


668
669
670
# File 'lib/studium/utility_scripts/show_lectures_on_the_commandline/show_lectures_on_the_commandline.rb', line 668

def use_master_vektoren_curriculum
  determine_from_which_file_to_read(:master_vektoren_curriculum)
end

#use_mikrobiologie_individuelles_curriculumObject Also known as: use_mikrobiologie_curriculum

#

use_mikrobiologie_individuelles_curriculum

#


654
655
656
# File 'lib/studium/utility_scripts/show_lectures_on_the_commandline/show_lectures_on_the_commandline.rb', line 654

def use_mikrobiologie_individuelles_curriculum
  determine_from_which_file_to_read(:bachelor_mikrobiologie_individuelles_curriculum)
end

#use_priority_pointsObject

#

use_priority_points

This will use priority_points as dataset.

Invocation example:

ShowLecturesOnTheCommandline --priority-points
#


403
404
405
406
407
408
409
410
411
412
413
414
415
416
# File 'lib/studium/utility_scripts/show_lectures_on_the_commandline/show_lectures_on_the_commandline.rb', line 403

def use_priority_points
  _ = main_dataset?
  _.select! {|a,b|
    b.has_key? :priority_points
  }
  is_master_curriculum # ← Hardcoded for now.
  do_not_read_in_from_a_file
  set_title 'Custom individual curriculum based on priority points'
  # ======================================================================= #
  # We only need to use the names of the lectures, hence why we will
  # use the method .keys().
  # ======================================================================= #
  set_all_lectures(_.keys)
end

#use_tu_master_biotechnology_curriculumObject

#

use_tu_master_biotechnology_curriculum

#


612
613
614
# File 'lib/studium/utility_scripts/show_lectures_on_the_commandline/show_lectures_on_the_commandline.rb', line 612

def use_tu_master_biotechnology_curriculum
  determine_from_which_file_to_read(:master_tu_vienna_biotechnology_curriculum)
end

#use_uni_vienna_master_bioinformatics_curriculumObject

#

use_uni_vienna_master_bioinformatics_curriculum

#


577
578
579
# File 'lib/studium/utility_scripts/show_lectures_on_the_commandline/show_lectures_on_the_commandline.rb', line 577

def use_uni_vienna_master_bioinformatics_curriculum
  determine_from_which_file_to_read(:master_bioinformatik_curriculum)
end

#use_uni_vienna_master_genetik_und_entwicklungsbiologie_curriculumObject

#

use_uni_vienna_master_genetik_und_entwicklungsbiologie_curriculum

#


493
494
495
# File 'lib/studium/utility_scripts/show_lectures_on_the_commandline/show_lectures_on_the_commandline.rb', line 493

def use_uni_vienna_master_genetik_und_entwicklungsbiologie_curriculum
  determine_from_which_file_to_read(:master_genetik_und_entwicklungsbiologie_curriculum)
end