The purpose of the studium-gem
The Studium project attempts to help you (well, and me, at the least back when I used to study) with study- and exam-related topics. The purpose of the gem is primarily to distribute the code and interconnect the various ruby files under the same "umbrella-project". It was started to bundle together knowledge over various different topics - be it related to ruby, informatics, biology, chemistry or physics.
There are several different classes that could be of help here.
Have a look at the right hand side of the gem's homepage, the Table of Contents. Some classes are described in some more detail in the file here.
Note that there are a LOT of different classes and it is rather unlikely that you will need all of them. Some have only a very limited scope and thus are not too overly useful. Other classes are more important, though, and the page here attempts to focus primarily on these classes, or rather, the functionality that these classes provide.
A general overview on the commandline, as to what the main functionality is, can be obtained through this:
The major focus of the studium gem lies in regards to "flashcards", mnemo-cards, anki-cards - aka entries that have a registered question, and an associated answer to that question. (anki-cards are a bit different in that they focus on a GUI and allow such fancy things like embedding pictures; the studium project also has this as a minor goal, but this comes only via GUI bindings, not the commandline variant, obviously.)
These questions can be asked on the commandline, via a delay - usually a three seconds delay, but this can be toggled and changed by the end user.
First, the question will appear on the commandline, and then, after that specified delay, the answer will be revealed.
You can query the current set delay via:
Note that, in order for the question-answer "exam trainer" to work, you need to have written down these questions and answers somewhere. By default, I have bundled the dataset that I personally use, but this will probably be very useless to most other people, so I recommend to keep your own entries. (Many of my own entries are in german rather than english, so ... feel free to re-use any of these questions as you like to, if you find them useful. There are almost 30.000 question-answers registered as of October 2018, in various topics).
The format for question-answers is very simple:
- One question and one answer per given line. For example:
'- How does Rails call a "footer" on every page? "Partials".'
The above would constitute a question-answer exam entry.
The first part there constitutes the question; and the part after the first '?' character is the answer. The '?' token is not mandatory though; you can also substitute with 'A:' (which stands short for "Answer") and not make use of '?' at all.
Note that any words enclosed in double quotes "" will be colourized differently when displayed on the commandline. The reason for this is mostly so that it provides a stronger visual cue as to what may be more important in the given question/answer at hand. I found this helpful for memorizing when having these questions asked on the commandline; for some reason my brain reacts more strongly to colours. Probably does so for other people too, but again - if you dislike anything there, you can (and should) always use your own exam-dataset here.
The default encoding is currently hardcoded towards the constant called ENCODING_ISO. This is the encoding ISO-8859-1.
This setting (constant) can be found in the file studium/constants/encodings.rb
However had, if you wish to use another encoding such as UTF, then you can specify this in the yaml file default_encoding.yml. Simply add the name of the constant there.
The reason why I personally use ISO-8859-1 as encoding is because german umlauts can be a hassle under UTF. I found it much easier to just be done with it by using ISO-8859-1 rather than struggle with UTF hassling me with its intrinsic complexity that provides zero net benefits to me personally (since I personally don't need UTF anywhere).
Since this may be different for other people, that constant shall handle the encoding to use for the whole studium-project.
Note that this default may change at a later moment in time when I use UTF (even though I don't need it).
For the time being, there also exists a commandline way to change the encoding in use for the Studium project.
studium --encoding=utf studium --encoding=iso1
The individual exam topics are stored in the subdirectory exam_topics/.
I distribute the dataset for the topics that I have an interest in with this gem, which explains why the gem is quite large. This dataset will probably not be very useful for other people, but if you want to use this project (such as a base, and then modify it) then you are encouraged to build up your own dataset anyway.
The primary reason why I distributed my own dataset with this gem is to simply show how it can be done.
The format for these exams must be a simple one, that is - one question and one answer per registered line. I currently encourage you to use not more than 1000 question-answer entries per such a file but if you want to, you can ignore this limit. I personally found it useful to have. Whenever I have more than 1000 questions, I tend to create a new file with "advanced" questions, or simply split things up.
For example, I used to have a single file for biochemistry. Since then I split it up into several sub-topics, such as metabolism, advanced biochemistry and aminoacids, so the total question-answers for biochemistry is close to 4000 as of now. (It may be even more if you also include molecular techniques and genetics into biochemistry, which some university lectures do. But I found it easier to use separate topics here, such as genetics, genomics*+ and **gene technology instead.)
If you want to query which exam-topic is the current default (the current studyset), then you can use the following invocation on the commandline:
Showing upcoming exams
class Studium::DisplayNextExams.new can show upcoming exams.
The first input argument should be a number, e. g. 10, which means that the first 10 upcoming exams will be shown. For the next 20 exams, it would be d20.
Note that this depends on aliases called "pwdstud1" or "pwdstud2". These have to exist in a yaml file (on my system this is cd_aliases.yml). The display is on the commandline but in principle, a GUI could be used as well.
Also note that when it is invoked, it will also store the result into a file called, e. g. d20.md or d10.md. This would allow you to upload that file if you want to. I needed that functionality because I wanted to display the upcoming exams somewhere else other than on my machine.
Note that there also exists another class, which can show upcoming exams, via a .html file. This class is called Studium::Exams::UpcomingImportantExams. You can invoke it from the commandline like so:
You can also pass in some other commands to the file from the commandline, such as --do-not-exit - see the --help option for more information of class Studium::Exams::UpcomingImportantExams.
Since as of March 2018, the studium project also supports flashcards formally.
Flashcards are menmonic-cards, where a question may be on the front of a paper, and the answer to that question is on the backside.
Obviously computers can simulate this more easily without wasting paper - but some people may prefer oldschool paper for memorizing content.
At any rate, if you wish to add a new question-answer, then you can use this commandline invocation:
You can also add a new question via the bin/studium file:
Upcoming exams, via the timetable
You can show the list of upcoming exams via:
Note that this makes use of the information stored in the file called lecture_information.yml, which has to be maintained by someone. In this case, I still maintain it (in the year 2018) - but this may not be the case at a later time, so ideally you should be able to maintain that file on your own.
The class that is responsible for interpreting the dataset stored in that .yml file, is class Studium::Exams::UpcomingImportantExams.
This is the very same class that is invoked via studium --timetable.
The exam dates should ideally follow the dd.mm.yyyy notation, that is day.month.year.
An example will be given next. Say that you have a course called Physics for Engineers. Two exams are upcoming which you may wish to register in the yaml file, like so:
"Physics for Engineers": - "02.02.2018" - "02.03.2018"
The above means that the next exam "Physics for Engineers" will occur at the beginning of february; then the next exam will be at the beginning of march, and so forth.
In the .yml file, the exam-related entries are called exams: and should denote an Array.
Once the exam has been registered like that then class Studium::Exams::UpcomingImportantExams will make use of the information.
The class DisplayNextExams will display the next n upcoming exams, where n should be a number from 3-20. There are also files such as d10 or d20 in the bin/ subdirectory, which defaults to e. g. 10 or 20 upcoming exams.
Note that in order for this to work, this may require to define local directories, and the exams in a file called exams.yml.
This may change in the future, since the exams.yml file is not distributed with this gem (it is specific for my exams, so really most useless to other people) - but for now, this is how things are.
If you want to designate another file or location, have a look at the file file_constants.rb. You can also invoke this method to set another file position:
Simply pass the location of your exams-file, which must be a yaml file, into that method.
Regex-search for exams
You can search for passed exams via a "pseudo-regex", aka // in a string:
studium /Partial name of exam goes in here/ studium /Elektronen/ studium /Bioinf/
Let's look at the last example, on the commandline. This will send the first argument "/Bioinf/" to the ruby code that handles the commandline. ARGV is an Array that will hold the arguments given to a ruby .rb file as Strings, so we have a pseudo-regex there - a String object that starts and ends with the character '/'. We assume this String to be a regex, which conveniently allows us to query for the name of passed exams.
This may be helpful if you want to find all exams that you have passed successfully (and registered somewhere) but do not quite remember the full name of the exam. Or, as in the last example, to show all exams passed with a title that includes "Bioinf" (meaning Bioinformatics or Bioinformatik).
Of course this should be tailored to your exams, not mine or anyone else's exams. :)
You can also see the passed exams that belong to a given theme.
So for example, to show all exams that fit to the theme "chemistry", you can use this call to output these exams:
Flashcards / Mnemo-cards
The core of this project is to simulate the behaviour of mnemo-cards, memo-cards or flashcards (we will assume these names to be synonymous).
The project can ask a random exam question.
Then, if the correct answer has been given, this question can be marked as "solved" - the code for the latter solved action resides in the file called solved.rb.
Any question that has been marked as "solved" will no longer be within the total pool of questions that the computer will ask you.
In other words, we can toggle on/off on a per question basis, via a trailing  to a line in that file.
This allows you to systematically work through an exam dataset for a given topic at hand.
Currently there is a cap - 1000 questions to the same topic, not more than that. This was mostly because I found it better to split up the topics, e. g. "basic chemistry", and then "advanced chemistry", and so on and so forth.
Namespaces in the project
The main namespace is called Studium, which is german for studies.
The exam-relevant part resides under Studium::Exams. So when you see that latter namespace, you know that it has to be code that is specific to exams.
There are also some auxiliary classes, such as a primitive "statistical analyzer" of some sort, to rate the performance per day (from day to day, in regards to exam-questions that were answered).
Statistical information within the Studium project
The Studium project also allows for a few statistical informations, e. g. such as how many exams were passed in this or that period of time. You can also show the curricula used for any given individual curriculum at hand.
This can be invoked such as in this way:
This will tap into class Studium::DetermineCurricula.
The file lecture_information.yml is very important and central to the project, so some words about it.
Lectures of (other) universities can be registered in that file.
The file lecture_information.yml is also distributed with the studium gem, in the yaml/ subdirectory.
The format of that file is simple:
- First line, within enclosed "" quotes, comes the name of the lecture. Make sure that the name is exactly, 1:1, the official name of the lecture at hand. Make sure that the name really is the name of the lecture, too - awkward errors may otherwise be the result.
Then, additionally, you must *prepend the LV ID as the first entry in that particular line.
Complete example for this:
"301617 Strukturbiologie I":
So - first comes the particular LV ID entry and then comes the name of the lecture.
This is the main entry for that lecture in the .yml file.
Then, you can denote the content of the lecture at hand, via a Hash. You can use !ruby/symbol to use a symbol; it is a yaml file after all, with all pros and cons that come with it.
The three main entries are presently:
!ruby/symbol ects: 3.0 !ruby/symbol university: BOKU !ruby/symbol language: german
More information can be added. See the file for more examples in how to use it properly.
Why is this information important?
The information stored in the file lecture_information.yml is important because it allows us to automatically calculate the ECTS points in a given curriculum, and also keep track whether a particular exam has already been passed successfully. (The latter part has to be adjusted to your own exam-dataset of course.)
Some helper classes exist to sanitize or check the validity of the information contained in that file. For example, class Studium::AutopurgeThisLectureDate can be used to purge outdated lva-entries from the file, allowing you to more easily stay up-to-date with ongoing lectures.
(Obviously, for all of this to work, you need to have a file that keeps track of these different lectures in the first place.)
You can also check the validity of this file, from the commandline, through class Studium::CheckTheLectureInformationFile.
This can be invoked from the commandline as well:
The class AutoStud can automatically modify the cd_aliases yaml file. cd_aliases are part of another project and bundle together my cd-aliases, that is - aliases that help me navigate through my local filesystem quickly. I make heavy use of aliases in general.
If there is a file called exams.yml, then we can put numbers, so called "tag-identifiers", into these. So for example, we may have the entry '# === (13)' there. This means that pwdstud13 is an alias to this directory, which will correspond to an exam entry. These entries should be sorted in a way so that entry 1 means the next upcoming exam, entry 2 the one after that, and so forth and so on.
In the past, before 20.01.2018, I manually did most of the work there - first, by modifying exams.yml, and then by navigating towards the target directory, and then invoking "newstud NUMBER" here, such as newstud 13. This was tedious and somewhat error-prone, but mostly unnecessary. I then created class AutoStud, which allowed me to navigate to the directory at hand, and just take the name of the working directory to determine the number. But even that was too cumbersome, so I added a range specifier, such as:
This will, similar to a Range in ruby, work through from 1 to 15, and invoke class NewStud. This class is the one that will modify the cd-aliases file.
Even the range specifier was unnecessary since I added:
This will automatically guess what is the max entry and use that.
If the above subsection is a bit confusing, don't worry, it really is simple once you understand it. It essentially serves two purposes:
(a) to be able to show which exames are upcoming, via say, <b>d25</b> (see bin/d25 for that) (b) to just quickly navigate to these directories for upcoming exams
I can then e. g. do "to4" to navigate to exam number 4 and look at the directory as to what material has been collected for this exam.
Obviously this works for the exam dataset on my system - you may have to maintain your own exams.yml file. I am willing to make improvements to this part, both in regards to code, but also in regards to the documentation.
Determine which curricula is used for which lecture
One of the most important files for this project, file lecture_information.yml, also contains the assigned curricula for a given lecture at hand.
The class Studium::DetermineCurricula can then be used to automatically output, on the commandline, in which curricula a certain lecture is listed. This allows us to batch-calculate the curricula used in an individual curriculum - e. g. if you design such a curriculum, the class may help you to automatically output from which other curricula certain lectures were used/re-used. This constitutes the "statistics" part of that class.
class Studium::ForeignLanguagePercentage can be used to show which lectures are in a given language, such as the english language.
This requires that the entry called "!ruby/symbol language: english" in the file lecture_information.yml has been set.
This class will show lectures that are part of the given curriculum on the commandline. Additionally, a .html file can be autogenerated (and will be opened in the browser, if a certain constant has been set to true).
If a lecture has already been passed, then the remote URL will not be shown. This behaviour can be overruled from the commandline like so:
show_lectures_on_the_commandline --show-all-URLs --tuwienbiotech
This will show all remote URLs, even for lectures that were already solved.
class Studium::ShowLectures will show lectures according to a particular theme. For example, say that you want to see all lectures that have something to do with "analytical chemistry".
You could then invoke this class and pass in a commandline option such as the following one:
I have aliased the show_lectures.rb file, to the alias called show_lectures, and then I can do this from the commandline:
(Actually, I even have this aliased, to "tanalytical" - the t stands for "theme". I use this for all the themes, e. g. "tgenetics" for all themes belonging to the theme genetics, "tinformatics" for all themes belonging to the theme informatics, and so forth.)
This class will also show a split between bachelor and master lectures. Bachelor lectures are shown first, then we will show the lectures belonging to a master curriculum.
This class thus allows us to quickly find out which lectures belong to a certain theme. It can then help when you wish to create an individual curriculum based on one or several certain themes - or when you simply want to see which lectures are available belonging to a particular theme. (I used it to see which exams I may do next, to fulfil a certain theme criteria.)
Note that this class acts on information, which must have been added prior to the file lecture_information, which is also distributed with this project. Always keep that file up to date - a lot of code in this project depends on that file.
Since as of 10.03.2018, you can also pass in the options --timetable or --upcoming. This will then autogenerate a .html file listening the coming exams. That functionality depends on class ShowLecturesOnTheCommandline.
The class Studium::Exams::Cycle can be used to cycle through the yaml file that holds which exams may be upcoming.
Since as of March 2018, the yaml file is distributed with the studium gem and can be found in the respective yaml directory, such as at:
Obviously if you wish to make use of it, you will have to modify that file to fit your own preferences rather than mine. This also depends on the exam topics that you want to be exercising next.
The way how the class operates is really simple:
- After having asked one question from the current main topic, the class will move towards the next topic at hand, and so forth. When it reaches the "end", it will resume at the beginning, so in other words this is a cyclic array and the class operates via a "cyclic modus operandi" - which thus explains he name of this class: Cycle.
If you want to find out where the main .yml file resides, you can do so via:
If you want to display which entries are part of the current exam-cluster, you can do so from the commandline via:
class Studium::ShowOutdatedLvaDates can be used to show which lectures (lva aka "lehrveranstaltung") have outdated lva_dates entries.
That way the outdated entries can be updated (or removed).
This then allows other classes in the project to more reliably show only lectures that are up-to-date.
If you need to show the LVA dates of a given lecture at hand, on the commandline, then you may want to use class Studium::ShowLvaDatesOfThisLecture, defined in the file show_lva_dates_of_this_lecture.rb.
The usage is quite simple - pass in the name of the lecture that you are interested in, such as "Primatologie".
If you want to get the most accurate information, then you should ideally also pass in the lecture ID; such as in the above example with "Primatologie", the input string should be in the form of:
We call the "300227 Primatologie" variant as the full input and the variant with "Primatologie" alone as partial input. If only a partial input is provided, then the script will try to be greedy and find as many relevant entries as possible. This can be used as a feature too.
For example, consider that show_lva_dates_of_this_lecture is an alias to the above .rb file, then the following commandline use:
would show all lectures that have the tag "Geneti" included.
Note that you do not necessarily need an alias such as show_lva_dates_of_this_lecture; you can also invoke it from the commandline such as via:
studium --show-lva-dates-of-this-lecture=Primatologie studium --show-lva-dates-of-this-lecture="300227 Primatologie"
This class will show all lectures that occur on a given day. The format for that day must be in dd.mm.yyyy format such as 18.06.2018. (In the future this requirement may change and allow for other formats, such as yyyy.mm.dd; but for now, this is the only supported time format.)
The class will then proceed to check the file lecture_information.yml for matching entries. If found, they will be retained and lateron displayed, via the .report method.
You can either invoke the clas directly - it resides at studium/utility_scripts/show_lectures_on_this_day.rb - or you can invoke this functionality from the commandline.
The syntax for the commandline invocation can be in two formats.
studium --lectures-on-this-day=05.05.2018 studium 07.05.2018
The latter is significantly shorter and is recommended. It is the current default action for input in the form dd.mm.yyyy. Do note that this may, however had, also change in the future - but for now (March 2018), this is the documented default behaviour for input like the above. Use the more explicit one with the -- flags, since that one will be supported forever.
class Studium::NExamsInTheseTopics can report how many exam topics are registered in the given input-topics at hand, and how many of these were solved.
Several topics are combined together.
For example, for basic biochemistry, you can pass the argument meta_biochemistry to this class, as a String.
class Studium::NExamsInTheseTopics will then output how many questions were registered in that topic in total, and how many of these questions were already solved.
For the "meta-topic" meta_biochemistry, we group together many biochemistry-related topics - basic biochemistry, advanced biochemistry, structural biology, proteomics, metabolism, enzymes, glycolysis and so forth.
I created this class so that I can have a look at combined topics. Otherwise it is quite similar to the statistics shown when a single question is asked on the commandline, through class AskExamQuestion (full name is: Studium::Exams::AskExamQuestion).
Since as of August 2018, you can also use this as exam-trainer, by providing the number of the sub-topic at hand.
So for example, if the main topic is meta-genetics, and you pass in the argument 3, then the entry at the 3rd place will be used as means to ask a question.
metagen 2 metagen 5
Where "metagen" is my alias to:
By default, lines that end via "" are ignored, but you can also ask a question from ALL available questions, even if they end with a "" token.
ask_exam_questions amg1 --all-questions
This would ask a random question from the amg1-dataset.
The class Studium::Exams::UpcomingExamsDataset is a helper-class.
It wraps over the file exams.yml and allows a simple query to the upcoming exams, based on that file (which, as exam, must be registered in the file exams.yml).
This information can then be used to query which exams are upcoming on which day, at which time. This information can also be re-used in different classes, which was one important reason as to why this class has been created in the first place.
class Studium::Exams::MandatoryContinuousAssessment can be used to handle lectures that require mandatory attendance (in german "pr??fungsimmanente Lehrveranstaltungen").
The section here does not include all options that this class is able to handle; instead, only a select subset will be shown and explained here.
If you want to show which mandatory courses may be upcoming, sorted on the assigned priority, then you can do this:
The command mandatory is an alias I use to the .rb file that holds class Studium::Exams::MandatoryContinuousAssessment.
You can also compare (some of) the registered curricula, by issuing:
This will output the amount of ECTS points stored in courses that require a mandatory attendance.
If you want to also see the individual lecture, do any of this:
mandatory --compare-detail mandatory --compare-stats
On a side-note, if you wish to see some mandatory lectures, such as those that belong to the lecture type VO+SE, you can pass this as input to bin/studium, like so:
The module-method stored in Studium.pristine can be used to create a new lecture_information file. The one that is, by default, bundled with the studium-gem is/was tailored to my own needs. So if you want to use the file, it may be better to generate it once, and then modify that newly generated file.
This can also be done on the commandline, via:
studium --pristine studium --new-lecture-information
You can then copy this file into the default location, where the file lecture_information.yml is normally stored, via:
Commandline examples of the studium gem
This subsection shows some commandline examples, in a succinct manner.
Display bachelor curricula, via the syntax --bachelor=NAME_HERE
studium --bachelor=vektorx studium --bachelor=genetics
Display master curricula, via the syntax --master=NAME_HERE
studium --master=vektorx studium --master=immunobio
Note that in both cases, the curriculum has to be registered.
If you wish to see which exams have been passed, that is, completed successfully, then use this invocation style:
studium --passed-exams? studium --passed-exams
If you want to show how many ECTS points have been completed in the registered curricula, do either of the following:
studium --passed-ects? studium --passed-ects
This module-method can show the upcoming exams, as a html table.
This allows you to look at the upcoming exams in a browser.
The priority of the given lecture must be among these values:
1, 2, 3, 4, 5
Thus, a priority value of higher than 5 will not be shown/considered.
The studium-gem uses several aliases. These exist mostly for convenience.
For example, bin/studium has an entry point called --master-curricula. This variant also works via --master alone. The latter option is not explicitely mentioned since it is just an alias. If you think that a specific alias is missing, let me know and I will add it (as long as it does not conflict with any other entry point.)
Return all passed exams
If you need to obtain a list (an Array) of all exams passed, you can use any of the following two methods:
On the commandline, you can invoke this via:
studium --passed-exams studium --all-passed-exams studium --return-all-passed-exams
Note that this will only honour exams that have been registered in the file lecture_information.yml.
Vorbesprechungen / Preliminary meetings
Some courses require a date before the actual course week, which we will call "preliminary meetings" (in german, "Vorbesprechung" or "Vorbesprechungstermin").
The Studium project also supports this. The corresponding entry that has to exist, in the file lecture_information.yml, is called "vorbesprechungen:".
The class Vorbesprechungen can show upcoming preliminary meetings. That way you should not miss the mandatory attendance part anymore.
curricula.yml and registered curricula
The file curricula.yml collects the id-numbers of different bachelor/master curricula, from different universities, in Austria. It can be found under the yaml/ subdirectory.
In theory this file could be extended to also include EU-wide curricula listed, but I only limited it to my own potential use cases or that of (former) colleagues.
If other people want to add different curricula numbers, subdirectories may have to be created for each country - but for now, since nobody else may need more curricula, the current structure will remain as it is.
Do also note that within the yaml/ subdirectory, there is another directory called curricula/. The latter directory includes several curricula with the respective lectures that belong to this particular curriculum. These files are used to keep track of which lectures are part of these curricula and whether you have already successfully passed these or whether you have not.
Exams at universities are typically graded. Different countries make use of different systems. For example, germany uses 6 grades whereas Austria uses 5 grades.
If you want to output which exams fit to a certain grade, such as grade 2, then you can use code written in studium/toplevel_methods/show_passed_exams_having_this_grade.rb:
The API is:
. .(2) .(4)
Simply pass the number to that method. In order for this to work, you must use some file where the grades are stored. This can be either in the file lecture_information.yml (I recommend this approach), but it could also be a .csv file. (The latter is mostly for legacy reasons; when this project was started, a .csv file was used. Lateron it was realized that the yaml file would be much better since it can also include native and nested data structures, which makes it a lot easier to parse as-is, via the yaml wrapper that ruby has.)
The colours within the Studium project are handled in two main ways:
(1) By the external gem called colours (2) Internally in most classes of this project via the @use_colours instance variable.
In other words, if the instance variable @use_colours is set to false then we will not use colours at all. That way you can also disable colours for the whole project.
By default, on the commandline, for exam questions and exam answers to said question, colours can be defined by the user, through the file called custom_colours.yml.
That file has keys such as colour_for_answers and colour_for_answers, which denotes the colour to be used for when a question is asked and an answer to that question is revealed.
Currently this defaults to olivedrab for exam-questions and lightslategray for exam-answers, but you can use any other colour code here if you want to. These HTML names are the preferred variants; if you need a link to these names, you could use this one here https://www.w3schools.com/colors/colors_hex.asp.
You can also change these colours through the commandline.
studium --use-this-colour-for-exam-answers=slateblue studium --use-this-colour-for-exam-questions=grey
Expanding time ranges
Take a lecture where you may have to spend time in a laboratory, from early morning to late evening, over a time period of three weeks. (This is just an example to illustrate this subsection.)
You may see that the school/university displays the dates via something like:
15.10. - 2.11.2018,
Exactly like this (this is actually a copy/pasted "real-world" example, including the trailing ',').
What does the above mean? Well, it means that the course will start at the 15th of october, in the year 2018 (this is the dd.mm.yyyy notation which is in general used in europe).
The - means "up until" and the end date is specified to be at the second of november, in 2018.
Since I needed to quickly convert this into a specific time for use in a calendar-like application, I needed a class that can output an Array of dates where this course will be held. So class Studium::ExpandTimeRange was created.
It will accept such odd input and output an Array that can be used in a yaml file, of specific dates, weekend-names and the time. This then allows me to quickly copy/paste this into the corresponding yaml file. (I needed to have this expanded to every day because I also visually have to look at that yaml file.)
Internally you can also use module-level instance methods, such as:
Use whatever you prefer - the last method is quite short though, so you can use it like this:
.expander('15.10. - 2.11.2018')
This also works over the commandline, of course:
studium --expand-time-range="15.10. - 2.11.2018," studium --expander="15.10.-2.11.2018"
Evaluating the progress in different curricula
You can evaluate your progress in different curricula via class Studium::CurriculumComparer. This class resides within the statistics/ subdirectory.
In order for this to work, successfully completed lectures have to be registered in the file lecture_information.yml prior to using this class.
The class will output which curricula have the highest amount of ECTS points, sorted first. That way you can assess how far you have gotten in this or that curriculum so far.
Improving this project
If other people would like to make use of this this project, I am open for suggestions on how to make it more flexible.
Otherwise, I will just keep it here as it is, as I do (or rather, did) require it in a few of my other projects. And if nobody else uses it then this is also fine because I used to be the number one user here anyway - the project had to solve existing problems, and it did so fairly well. Extra work past this point (in the year 2018) is mostly just to polish existing functionality, and to add a tiny bit of new functionality every now and then. :)
The method obtain_this_value_from_hash()
This method resides in the file studium/base/base.rb.
It was created in order to access the main Hash - that is, the Hash that is returned from the file lecture_information.yml.
I had to access the various entries from said file and this was becoming a bit tedious. It became even more tedious because some keys are Strings and some keys are Symbols. Since I did not want to look up all the time whether I am dealing with Strings or with Symbols, I transitioned into using that method instead.
It is thus a bit similar to HashWithIndifferentAccess, except that it is just a simple method (and the main name is actually obtain()).
Download the exam dataset
You can download the exam dataset by making use of this commandline option:
studium --download-exam-dataset studium --download-dataset
This will copy into the exam_topics/ subdirectory, so make sure that you want this BEFORE calling the above. If in doubt, backup your exam dataset and store it elsewhere on top of that (which may be a good idea in general).
Showing all STEOP lectures of a curriculum
You can show all STEOP lectures that are in a curriculum.
Issue something like the following on the commandline:
steop_lectures --curriculum1 steop_lectures --curriculum2 # number-input should work steop_lectures --ktww steop_lectures --AW # as should abbreviations; AW is "Agrarwissenschaften" steop_lectures_in_this_curriculum --ktww
Where steop_lectures is an alias to where class Studium::SteopLecturesInThisCurriculum resides - usually in the file studium/steop/steop_lectures_in_this_curriculum.rb.
class Studium::ShowLecturesOfThisCurriculumId can be used to output all lectures that belong to a particular curriculum ID. That way you can see which lectures could be done for a particular curriculum; and which lectures have already been passed in this curriculum, too.
You can input either the curriculum ID to this class; or some shortcuts.
The following input works on my home system, where show_lectures_of_this_curriculum_id is alias to the .rb file that holds class Studium::ShowLecturesOfThisCurriculumId can be used to output:
show_lectures_of_this_curriculum_id 066875 show_lectures_of_this_curriculum_id Bioinformatik show_lectures_of_this_curriculum_id MolBio show_lectures_of_this_curriculum_id Landschaftsplanung
Description of lectures
Some lectures are described in the file lecture_information.yml, but not all are. I have described only some which were of relevance to me. Most of these descriptions are in german, because the teaching language for most of these lectures is in german.
If you ever want to add your own descriptions, you can do so, by populating the entry called:
!ruby/symbol description: |
KDE Konsole support
In the past we could rename KDE Konsole tabs, but this behaviour is presently (November 2018) slightly buggy. I have thus disabled it.
It may be re-enabled one day in the future, but via a configuration setting, so that users can disable/enable it. By default it will then be disabled.
The following curricula have been completely integrated into the Studium gem so far
The following table lists which curricula have been integrated fully so far:
BOKU stands short for "Universit?t f?r Bodenkultur" (Wien / Vienna). (Oddly enough, markdown seems to struggle with german umlauts, so the ? and other umlauts ("Umlaute") will show up as a ?; it is a combination of the two characters ae).
TU stands short for "Technische Universit?t" (Wien / Vienna), aka the "Technical University" in Vienna.
Keep in mind that the above table presently only lists curricula in Austria. If anyone else wants to extend this table to include other european universities, feel free to do so, but the dataset for these universities will have to be registered external (or at the least maintained by someone else for these european universities).
I am willing to add the required code to the studium gem, in order to make available any external dataset (and thus add other universities), though.
If you need to find out how many ECTS points have been passed per given year for a particular curriculum then you can use class Studium::PassedEctsPerYear.
The input is the name of that curriculum. Obviously for this to work, the curriculum has had to be registered first.
You can also invoke it from the commandline, via:
Display the amount of ECTS points passed in Bachelor/Master lectures
You can find out how many ECTS points were passed in Bachelor and Master lectures so far via:
class Studium::ShowLecturers will show the lecturers of each lecture in a given curriculum, on the commandline/terminal.
Using an environment variable to specify your replacement for lecture_information.yml
Some people may wish to use the project but wish to use another .yml file, other than the default one called lecture_information.yml. This is normally done so that you can, for example, add your own exam dataset into this .yml file (and have it persistent, that is, stored somewhere else on your filesystem, rather than use the bundled variant that comes distributed with the studium gem itself).
For people who require this, there exists an environment variable called STUDIUM_FILE_LECTURE_INFORMATION. Simply assign to this variable the full path to your dataset, which must be a .yml file in the same format.
Example for bash:
class Studium::ShowCompletedEctsInAllCurricula can be used to show the completed ECTS per curriculum, sorted by n ECTS (maximum amount of ECTS) first. This is really just an "overview" class that shall quickly tell you how many different curricula exist.
A threshold value ("cut off") exists, which is set to 5.0 ECTS by default. Only if you have passed exams worth a total of at the least 5.0 ECTS will they be shown. This is set via a constant which can be toggled.
Generating .pdf files
You can generate some .pdf files about exam-topics.
For example, for the topic amg, you can generate a .pdf file through:
This requires the gem called prawn.
class Studium::ShowConflictingLvaLectures resides at the internal location studium/utility_scripts/show_conflicting_lva_lectures.rb, within the studium gem.
The purpose of this class is to show conflicting lva-lecture dates.
For example, say that you want to know whether there are any conflicts on the day 16.10.2018 (16th October in the year 2018). Then you would simply pass that string into class Studium::ShowConflictingLvaLectures and that class will then display which exams and which lectures are on that date, sorted by time.
(I use the alias called conflict to invoke that .rb file from the commandline.)
You can pass in any number of dates in the dd.mm.yyyy format, and the class will iterate through all of them and report which lectures and exams happen on each respective day.
You can use a range of dates too, if you pass in a - between two such dates.
This will be treated as if you would have given input from the 16th, 17th, 18th, 19th and 20th. That can thus be used as a sort of "mini-calendar", on the commandline, in regards to important lectures/exams. (Remember that you will have to populate and maintain the dataset in the file called lecture_information.yml for this to work.)
You can also use a few abbreviations for class Studium::ShowConflictingLvaLectures.
For example, the capital letter A is a hardcoded entry that I may change to indicate which is the starting day of university in a given semster, such as 01.10.2018 or any such day. The capital letter B then refers to the day after that day, the capital letter C refers to the day after B, and so forth. The idea here is to use just a one-letter abbreviation rather than have to input 4 - 10 characters instead.
As already stated in this subsection, the file lecture_information.yml needs to have these lectures/exams registered first, before class Studium::ShowConflictingLvaLectures is able to display them.
Why was this class added? I needed that functionality to plan exam-dates ahead of time. That way I could display which exams may be upcoming and so forth - helped me in regards to time management.
If you have specific suggestions to make this gem more useful for others, please drop me an email at:
(Please keep in mind that responding to emails may take a while depending on the amount of work I may have at that moment in time due to reallife.)