Update docs
This commit is contained in:
parent
ce67d74415
commit
9038974707
1 changed files with 12 additions and 12 deletions
24
README.md
24
README.md
|
@ -4,7 +4,7 @@ This repository complements my [third blog post about my note taking setup](http
|
||||||
|
|
||||||
## A quick overview:
|
## A quick overview:
|
||||||
|
|
||||||
### File structure
|
#### File structure
|
||||||
|
|
||||||
```
|
```
|
||||||
ROOT
|
ROOT
|
||||||
|
@ -59,12 +59,12 @@ A lecture file contains a line
|
||||||
```
|
```
|
||||||
which is the lecture number, date an title of the lecture. Date format is configurable in `config.py`.
|
which is the lecture number, date an title of the lecture. Date format is configurable in `config.py`.
|
||||||
|
|
||||||
### `config.py`
|
#### `config.py`
|
||||||
|
|
||||||
This is where you configure what calendar to use for the countdown script, the root folder of the file structure, and similar stuff. You can also configure the date format used in some places (lecture selection dialog and LaTeX files).
|
This is where you configure what calendar to use for the countdown script, the root folder of the file structure, and similar stuff. You can also configure the date format used in some places (lecture selection dialog and LaTeX files).
|
||||||
My university uses a system where we label the weeks in a semester from 1 to 13, and this is what the `get_week` function does: it returns the week number of the given date.
|
My university uses a system where we label the weeks in a semester from 1 to 13, and this is what the `get_week` function does: it returns the week number of the given date.
|
||||||
|
|
||||||
### `courses.py`
|
#### `courses.py`
|
||||||
|
|
||||||
This file defines `Course` and `Courses`.
|
This file defines `Course` and `Courses`.
|
||||||
`Courses` is a list of `Course`s in the `ROOT` folder.
|
`Courses` is a list of `Course`s in the `ROOT` folder.
|
||||||
|
@ -77,7 +77,7 @@ When setting this property, the script updates the `~/current_course` symlink to
|
||||||
Furthermore, it writes the short course code to `/tmp/current_course`.
|
Furthermore, it writes the short course code to `/tmp/current_course`.
|
||||||
This way, when using polybar, you can add the following to show the current course short code in your panel.
|
This way, when using polybar, you can add the following to show the current course short code in your panel.
|
||||||
|
|
||||||
```
|
```ini
|
||||||
[module/currentcourse]
|
[module/currentcourse]
|
||||||
type = custom/script
|
type = custom/script
|
||||||
tail = true
|
tail = true
|
||||||
|
@ -85,7 +85,7 @@ exec = echo '/tmp/current_course' | entr cat /tmp/current_course
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
### `countdown.py`
|
#### `countdown.py`
|
||||||
|
|
||||||
This script hooks into your calendar, which you can configure in the `config.py` file.
|
This script hooks into your calendar, which you can configure in the `config.py` file.
|
||||||
If you're using polybar, you can use the following config:
|
If you're using polybar, you can use the following config:
|
||||||
|
@ -111,7 +111,7 @@ You can easily change this by for example adding a `calendar_name` to each `info
|
||||||
|
|
||||||
To get it working, follow step 1 and 2 of the [Google Calendar Python Quickstart](https://developers.google.com/calendar/quickstart/python), and place `credentials.json` in the `scripts` directory.
|
To get it working, follow step 1 and 2 of the [Google Calendar Python Quickstart](https://developers.google.com/calendar/quickstart/python), and place `credentials.json` in the `scripts` directory.
|
||||||
|
|
||||||
### `lectures.py`
|
#### `lectures.py`
|
||||||
|
|
||||||
This file defines `Lectures`, the lectures for one course and `Lecture`, a single lecture file `lec_xx.tex`.
|
This file defines `Lectures`, the lectures for one course and `Lecture`, a single lecture file `lec_xx.tex`.
|
||||||
A `Lecture` has a `title`, `date`, `week`, which get parsed from the LaTeX source code. It also has a reference to its course.
|
A `Lecture` has a `title`, `date`, `week`, which get parsed from the LaTeX source code. It also has a reference to its course.
|
||||||
|
@ -120,27 +120,27 @@ When calling `.edit()` on a lecture, it opens up lecture in Vim.
|
||||||
`Lectures` is class that inherits from `list` that represents the lectures in one course.
|
`Lectures` is class that inherits from `list` that represents the lectures in one course.
|
||||||
It has a method `new_lecture` which creates a new lecture, `update_lectures_in_master`, which when you call with `[1, 2, 3]` updates `master.tex` to include the first three lectures, `compile_master` which compiles the `master.tex` file.
|
It has a method `new_lecture` which creates a new lecture, `update_lectures_in_master`, which when you call with `[1, 2, 3]` updates `master.tex` to include the first three lectures, `compile_master` which compiles the `master.tex` file.
|
||||||
|
|
||||||
### `rofi-courses.py`
|
#### `rofi-courses.py`
|
||||||
|
|
||||||
When you run this file, it opens rofi allows you to activate a course.
|
When you run this file, it opens rofi allows you to activate a course.
|
||||||
|
|
||||||
### `rofi-lectures.py`
|
#### `rofi-lectures.py`
|
||||||
|
|
||||||
When you run this file, it show you lectures of the current course.
|
When you run this file, it show you lectures of the current course.
|
||||||
Selecting one opens up the file in Vim, pressing `Ctrl+N` creates a new lecture.
|
Selecting one opens up the file in Vim, pressing `Ctrl+N` creates a new lecture.
|
||||||
|
|
||||||
### `rofi-lectures-view.py`
|
#### `rofi-lectures-view.py`
|
||||||
|
|
||||||
This opens up a rofi dialog to update which lectures are included in `master.tex`
|
This opens up a rofi dialog to update which lectures are included in `master.tex`
|
||||||
|
|
||||||
### `rofi.py`
|
#### `rofi.py`
|
||||||
|
|
||||||
Wrapper function for rofi
|
Wrapper function for rofi
|
||||||
|
|
||||||
### `utils.py`
|
#### `utils.py`
|
||||||
|
|
||||||
Some utility functions
|
Some utility functions
|
||||||
|
|
||||||
### `compile-all-masters.py`
|
#### `compile-all-masters.py`
|
||||||
|
|
||||||
This script updates the `master.tex` files to include all lectures and compiles them. I use when syncing my notes to the cloud. This way I always have access to my compiles notes on my phone.
|
This script updates the `master.tex` files to include all lectures and compiles them. I use when syncing my notes to the cloud. This way I always have access to my compiles notes on my phone.
|
||||||
|
|
Loading…
Reference in a new issue