mo2tex 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +26 -3
- data/Rakefile +6 -0
- data/config/templates/pic/{header.pic → header.pic.erb} +1 -2
- data/lib/mo2tex/pic.rb +7 -2
- data/lib/mo2tex/version.rb +1 -1
- metadata +7 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f68191fdbb4823e1f2918d06fc359c049094683a488e10a3dba6173372e6f195
|
4
|
+
data.tar.gz: ebec861600d24f1e1e95e860ed705861829928cd1a3489d8495bb8c7a5bc39ca
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0277efd60def0f56f639e2f93bf7b73f1927240bffa7605aaf5e3a425664d205c6f476a959920d50c1970d11a9ad18000c3e55de4eda3359013c79739274f805
|
7
|
+
data.tar.gz: 66a0283cb729da2a976a14157cdaa987885f67d839152990a3f1739c19d64f019c5da0f78dfde3329aa640812f8149f32655777742a8b0072b6d9568a33bd256
|
data/README.md
CHANGED
@@ -1,22 +1,45 @@
|
|
1
|
-
# `mo2tex` - A pure `ruby` monteore-to-`latex` table generator
|
1
|
+
# `mo2tex` - A pure `ruby` monteore-to-`latex`, `ical` and `pic` table generator
|
2
2
|
|
3
3
|
](https://gitlab.com/SMELAT/mo2tex/badges/master/pipeline.svg)
|
4
4
|
|
5
|
-
`mo2tex` is a pure `ruby` monteore-to-`latex` table generator
|
5
|
+
`mo2tex` is a pure `ruby` monteore-to-`latex`, `ical` and `pic` table generator
|
6
6
|
|
7
7
|
## Installation
|
8
8
|
|
9
9
|
Install the gem and add to the application's Gemfile by executing:
|
10
10
|
|
11
|
+
```sh
|
11
12
|
$ bundle add mo2tex
|
13
|
+
```
|
12
14
|
|
13
15
|
If bundler is not being used to manage dependencies, install the gem by executing:
|
14
16
|
|
17
|
+
```sh
|
15
18
|
$ gem install mo2tex
|
19
|
+
```
|
20
|
+
|
21
|
+
## Configuration
|
22
|
+
|
23
|
+
You will have to write a `yaml` configuration file before using `mo2tex`.
|
24
|
+
Please check the [example provided](./config/courses.yml) for a sample configuration file.
|
16
25
|
|
17
26
|
## Usage
|
18
27
|
|
19
|
-
|
28
|
+
After installation, you should be able to run:
|
29
|
+
|
30
|
+
```sh
|
31
|
+
$ m2l <config file> # this should create a latex file on standard out with your monteore listing
|
32
|
+
```
|
33
|
+
|
34
|
+
Please check the [example provided](./config/courses.yml) for a configuration file.
|
35
|
+
|
36
|
+
```sh
|
37
|
+
$ m2c <config file> > <ical calendar file> # this should create an ical file on standard out which you can upload anywhere fitting
|
38
|
+
```
|
39
|
+
|
40
|
+
```sh
|
41
|
+
$ m2p <config file> | groff -p -mpic -Tpdf -P-pa4 # this should create a pdf file on standard out with a table of the lessons
|
42
|
+
```
|
20
43
|
|
21
44
|
## Development
|
22
45
|
|
data/Rakefile
CHANGED
data/lib/mo2tex/pic.rb
CHANGED
@@ -200,12 +200,16 @@ module Mo2tex
|
|
200
200
|
result = ''
|
201
201
|
self.pages.each do
|
202
202
|
|page|
|
203
|
-
|
203
|
+
result += self.header.result(binding)
|
204
204
|
result += self.body.result(binding)
|
205
205
|
result += self.trailer.result(binding)
|
206
206
|
end
|
207
207
|
return result
|
208
208
|
end
|
209
|
+
|
210
|
+
def absolute_pic_objects_include_path
|
211
|
+
return File.expand_path(File.join(['..'] * 3, 'config', 'templates', 'pic', 'objects.pic'), __FILE__)
|
212
|
+
end
|
209
213
|
|
210
214
|
DAYS_PER_PAGE = 12
|
211
215
|
DAYS_PER_ROW = 4
|
@@ -273,7 +277,8 @@ module Mo2tex
|
|
273
277
|
end
|
274
278
|
|
275
279
|
def read_header
|
276
|
-
|
280
|
+
template = read('header.pic.erb')
|
281
|
+
return ERB.new(template, trim_mode: '-')
|
277
282
|
end
|
278
283
|
|
279
284
|
def read_trailer
|
data/lib/mo2tex/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mo2tex
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nicola Bernardini
|
8
8
|
bindir: exe
|
9
9
|
cert_chain: []
|
10
|
-
date:
|
10
|
+
date: 2025-01-08 00:00:00.000000000 Z
|
11
11
|
dependencies:
|
12
12
|
- !ruby/object:Gem::Dependency
|
13
13
|
name: rdoc
|
@@ -65,7 +65,8 @@ dependencies:
|
|
65
65
|
- - ">="
|
66
66
|
- !ruby/object:Gem::Version
|
67
67
|
version: '0'
|
68
|
-
description: mo2tex transforms a Monte Ore calendar into a
|
68
|
+
description: mo2tex transforms a Monte Ore calendar into a LaTex table, or an ical
|
69
|
+
file, or a pic table
|
69
70
|
email:
|
70
71
|
- nicola.bernardini.rome@gmail.com
|
71
72
|
executables:
|
@@ -86,7 +87,7 @@ files:
|
|
86
87
|
- config/templates/latex/header.tex
|
87
88
|
- config/templates/latex/trailer.tex
|
88
89
|
- config/templates/pic/body.pic.erb
|
89
|
-
- config/templates/pic/header.pic
|
90
|
+
- config/templates/pic/header.pic.erb
|
90
91
|
- config/templates/pic/objects.pic
|
91
92
|
- config/templates/pic/trailer.pic.erb
|
92
93
|
- exe/m2c
|
@@ -132,5 +133,6 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
132
133
|
requirements: []
|
133
134
|
rubygems_version: 3.6.0.dev
|
134
135
|
specification_version: 4
|
135
|
-
summary: mo2tex transforms a Monte Ore calendar into a
|
136
|
+
summary: mo2tex transforms a Monte Ore calendar into a LaTex table, or an ical file,
|
137
|
+
or a pic table
|
136
138
|
test_files: []
|