falkorlib 0.6.2 → 0.6.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7600749c8d04ba49cef67281021af59e6ac98265
4
- data.tar.gz: 8783231c2fb2d13c2752e2190b6132eaceab3a28
3
+ metadata.gz: c9e0eb5fd65a5039b1923814b0b4597880ee8b20
4
+ data.tar.gz: 87597d8eaae0504c3184a10fbdc4a2d614f5480c
5
5
  SHA512:
6
- metadata.gz: d8aeecab51a7e4fa565e81fef7097ac8829134a366d60425fc971de179c73c19b7f0819cdfc0e498f03fc9620790f31ea0ab6f8033d0cdada7409f9434cd2f5c
7
- data.tar.gz: 6148a7f2231b8c9e5a6892a51f0e1e21497f5e9909e968c16594835a0e44b727e5f85670b1ce44cb5cfe6ca29e40e92730b5b7980c796663618f702ac15f7212
6
+ metadata.gz: 184338250d748f654598b7e403bc92bab50d2355371152cff4cea403ac0ac1408e88a60a7841391a8e7c40479a85f0d9c1c2234472c4630d4154b2c58d50efae
7
+ data.tar.gz: c6125c2a0e552aa040ca1286828501e1859ac365986ce063ea6783b8bb8fbad62e2432681a71b87a916cabb98c58f09d9b1fd5887f68a2581c6556afb49327c7
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- falkorlib (0.6.2)
4
+ falkorlib (0.6.3)
5
5
  artii (>= 2.1)
6
6
  awesome_print (~> 1.2)
7
7
  configatron (~> 3.2)
@@ -1,6 +1,6 @@
1
1
  # -*- encoding: utf-8 -*-
2
2
  ################################################################################
3
- # Time-stamp: <Wed 2015-09-16 21:37 svarrette>
3
+ # Time-stamp: <Tue 2016-02-02 23:39 svarrette>
4
4
  ################################################################################
5
5
  # Interface for the main Bootstrapping operations
6
6
  #
@@ -35,9 +35,20 @@ module FalkorLib #:nodoc:
35
35
  :image => 'images/logo_ULHPC.pdf',
36
36
  :logo => 'images/logo_UL.pdf'
37
37
  },
38
+ :letter => {
39
+ :author_title => 'PhD',
40
+ :institute => 'University of Luxembourg',
41
+ :department => 'Parallel Computing and Optimization Group',
42
+ :department_acro => 'PCOG',
43
+ :address => '7, rue Richard Coudenhove-Kalergie',
44
+ :zipcode => 'L-1359',
45
+ :location => 'Luxembourg',
46
+ :phone => '(+352) 46 66 44 6600',
47
+ },
38
48
  :metadata => {
39
49
  :name => '',
40
50
  :type => [],
51
+ :by => "#{ENV['USER']}",
41
52
  :author => "#{ENV['GIT_AUTHOR_NAME']}",
42
53
  :mail => "#{ENV['GIT_AUTHOR_EMAIL']}",
43
54
  :summary => "rtfm",
@@ -45,6 +56,7 @@ module FalkorLib #:nodoc:
45
56
  :forge => '',
46
57
  :source => '',
47
58
  :project_page => '',
59
+ :origin => '',
48
60
  :license => '',
49
61
  :issues_url => '',
50
62
  :tags => []
@@ -90,13 +102,11 @@ module FalkorLib #:nodoc:
90
102
  :puppet => {},
91
103
  :forge => {
92
104
  :none => { :url => '', :name => "None"},
93
- :gforge => { :url => 'https://gforge.uni.lu', :name => 'GForge @ Uni.lu' },
94
- :github => { :url => 'https://github.com', :name => 'Github', :login => "#{`whoami`.chomp.capitalize}" },
95
- :gitlab => { :url => 'https://gitlab.uni.lu', :name => 'Gitlab @ Uni.lu' },
105
+ :gforge => { :url => 'gforge.uni.lu', :name => 'GForge @ Uni.lu' },
106
+ :github => { :url => 'github.com', :name => 'Github', :login => "#{`whoami`.chomp.capitalize}" },
107
+ :gitlab => { :url => 'gitlab.uni.lu', :name => 'Gitlab @ Uni.lu', :login => "#{`whoami`.chomp.capitalize}" },
96
108
  },
97
109
  }
98
-
99
-
100
110
  end
101
111
  end
102
112
  end
@@ -377,11 +387,13 @@ module FalkorLib
377
387
  # get the local configuration
378
388
  local_config = FalkorLib::Config.get(dir)
379
389
  config = FalkorLib::Config::Bootstrap::DEFAULTS[:metadata].clone
390
+ name = get_project_name(dir)
380
391
  if local_config[:project]
381
392
  config.deep_merge!( local_config[:project])
382
393
  else
383
- config[:name] = ask("\tProject name: ", get_project_name(dir)) unless options[:name]
394
+ config[:name] = ask("\tProject name: ", name) unless options[:name]
384
395
  end
396
+
385
397
  # Type of project
386
398
  config[:type] << :latex if options[:latex]
387
399
  if config[:type].empty?
@@ -398,25 +410,35 @@ module FalkorLib
398
410
  end
399
411
  path = normalized_path(dir)
400
412
  config[:filename] = options[:filename] ? options[:filename] : File.join(path, 'README.md')
401
- config[:forge] = select_forge(config[:forge]).to_sym if config[:forge].empty?
413
+ if ( FalkorLib::Git.init?(dir) && FalkorLib::Git.remotes(dir).include?( 'origin' ))
414
+ config[:origin] = FalkorLib::Git.config('remote.origin.url')
415
+ if config[:origin] =~ /((gforge|gitlab|github)[\.\w_-]+)[:\d\/]+(\w*)/
416
+ config[:forge] = $2.to_sym
417
+ config[:by] = $3
418
+ end
419
+ else
420
+ config[:forge] = select_forge(config[:forge]).to_sym if config[:forge].empty?
421
+ end
402
422
  forges = FalkorLib::Config::Bootstrap::DEFAULTS[:forge][ config[:forge].to_sym ]
423
+ #ap config
403
424
  default_source = case config[:forge]
404
425
  when :gforge
405
- forges[:url] + "/projects/" + config[:name].downcase
406
- when :github
407
- forges[:url] + "/" + forges[:login] + "/" + config[:name].downcase
408
- when :gitlab
409
- forges[:url] + "/" + forges[:name].downcase
426
+ 'https://' + forges[:url] + "/projects/" + name.downcase
427
+ when :github, :gitlab
428
+ 'https://' + forges[:url] + "/" + config[:by] + "/" + name.downcase
410
429
  else
411
430
  ""
412
431
  end
413
- ap config
414
432
  FalkorLib::Config::Bootstrap::DEFAULTS[:metadata].each do |k,v|
415
433
  next if v.kind_of?(Array) or [ :license, :forge ].include?( k )
416
434
  next if k == :name and ! config[:name].empty?
417
435
  next if k == :issues_url and ! [ :github, :gitlab ].include?( config[:forge] )
418
436
  #next unless [ :name, :summary, :description ].include?(k.to_sym)
419
437
  default_answer = case k
438
+ when :author
439
+ (config[:by] == 'ULHPC') ? 'UL HPC Management Team' : config[:author]
440
+ when :mail
441
+ (config[:by] == 'ULHPC') ? 'hpc-sysadmins@uni.lu' : config[:mail]
420
442
  when :description
421
443
  config[:description].empty? ? "#{config[:summary]}" : "#{config[:description]}"
422
444
  when :source
@@ -491,13 +513,45 @@ module FalkorLib
491
513
  end
492
514
  end # rootlink
493
515
 
516
+ ###### makefile_link ######
517
+ # Create a symlink to the one of Falkor's Makefile, typically bring as a Git submodule
518
+ # Supported options:
519
+ # * :force [boolean] force action
520
+ # * :latex [boolean] Makefile to compile LaTeX documents
521
+ # * :gnuplot [boolean] Makefile to compile GnuPlot scripts
522
+ # * :markdown [boolean] Makefile to convert Markdown files to HTML
523
+ # * :target [string] Path to target
524
+ # * :repo [string] Path to Falkor's Makefile repository
525
+ ##
526
+ def makefile_link(dir = Dir.pwd, options = {})
527
+ path = normalized_path(dir)
528
+ rootdir = FalkorLib::Git.rootdir(path)
529
+ info "Create a symlink to the one of Falkor's Makefile"
530
+ # Add Falkor's
531
+ submodules = FalkorLib.config[:git][:submodules]
532
+ submodules['Makefiles'] = {
533
+ :url => 'https://github.com/Falkor/Makefiles.git',
534
+ :branch => 'devel'
535
+ } if submodules['Makefiles'].nil?
536
+ FalkorLib::Git.submodule_init(rootdir, submodules)
537
+
538
+ end # makefile_link
539
+
540
+
541
+
542
+
494
543
  ###### latex ######
495
- # Bootstrap a LaTeX sub-project within a given repository
544
+ # Bootstrap a LaTeX sub-project of type <type> within a given repository <dir>.
545
+ # Supported types:
546
+ # * :beamer LaTeX Beamer Slides
547
+ # * :article LaTeX article
548
+ # * :letter LaTeX Letter
496
549
  # Supported options:
497
550
  # * :force [boolean] force action
498
551
  ##
499
552
  def latex(dir = Dir.pwd, type = :beamer, options = {})
500
553
  ap options if options[:debug]
554
+ print_error_and_exit "Unsupported type" unless [ :beamer, :article, :letter ].include?( type )
501
555
  path = normalized_path(dir)
502
556
  config = FalkorLib::Config::Bootstrap::DEFAULTS[:latex].clone
503
557
  # initiate the repository if needed
@@ -511,7 +565,7 @@ module FalkorLib
511
565
  info "Initiate a LaTeX #{type} project from the Git root directory: '#{rootdir}'"
512
566
  really_continue? unless options[:force]
513
567
  relative_path_to_root = (Pathname.new( FalkorLib::Git.rootdir(dir) ).relative_path_from Pathname.new( File.realpath(path))).to_s
514
- config[:name] = options[:name] ? options[:name] : ask("\tEnter the name of the #{type} project: ", File.basename(path))
568
+ config[:name] = options[:name] ? options[:name] : ask("\tEnter the name of the #{type} LaTeX project: ", File.basename(path))
515
569
  raise FalkorLib::ExecError "Empty project name" if config[:name].empty?
516
570
  default_project_dir = (Pathname.new( File.realpath(path) ).relative_path_from Pathname.new( FalkorLib::Git.rootdir(dir))).to_s
517
571
  if relative_path_to_root == '.'
@@ -519,16 +573,18 @@ module FalkorLib
519
573
  when :article
520
574
  "articles/#{Time.now.year}/#{config[:name]}"
521
575
  when :beamer
522
- "slides/#{Time.now.year}/#{config[:name]}/"
576
+ "slides/#{Time.now.year}/#{config[:name]}"
523
577
  when :bookchapter
524
578
  "chapters/#{config[:name]}"
579
+ when :letter
580
+ "letters/#{Time.now.year}/#{config[:name]}"
525
581
  else
526
582
  "#{config[:name]}"
527
583
  end
528
584
  else
529
585
  default_project_dir += "/#{config[:name]}" unless default_project_dir =~ /#{config[:name]}$/
530
586
  end
531
- project_dir = ask("\tLaTeX Project directory (relative to the Git root directory)", default_project_dir)
587
+ project_dir = ask("\tLaTeX Sources directory (relative to the Git root directory)", "#{default_project_dir}/src")
532
588
  raise FalkorLib::ExecError "Empty project directory" if project_dir.empty?
533
589
  subdir = File.join(rootdir, project_dir)
534
590
  if File.exists?(File.join(subdir, '.root'))
@@ -544,7 +600,7 @@ module FalkorLib
544
600
  } if [ :article, :beamer, :bookchapter].include?(type)
545
601
  submodules['beamerthemeFalkor'] = { :url => 'https://github.com/Falkor/beamerthemeFalkor' } if type == :beamer
546
602
  FalkorLib::Git.submodule_init(rootdir, submodules)
547
- info "bootstrapping the #{type} project '#{project_dir}'"
603
+ info "bootstrapping the #{type} project sources in '#{project_dir}'"
548
604
  # Create the project directory
549
605
  Dir.chdir( rootdir ) do
550
606
  run %{ mkdir -p #{project_dir}/images } unless File.directory?("#{subdir}/images")
@@ -571,6 +627,8 @@ module FalkorLib
571
627
  'Slides '
572
628
  when :bookchapter
573
629
  'Book Chapter '
630
+ when :letter
631
+ 'Letter '
574
632
  else
575
633
  ''
576
634
  end
@@ -587,7 +645,7 @@ module FalkorLib
587
645
  end
588
646
  # Create the trash directory
589
647
  trash(subdir)
590
-
648
+
591
649
  # populate the images/ directory
592
650
  baseimages = File.join( FalkorLib.templates, 'latex', 'images')
593
651
  images_makefile_src = "#{FalkorLib.config[:git][:submodulesdir]}/Makefiles/generic/Makefile.insubdir"
@@ -1,6 +1,6 @@
1
1
  # -*- encoding: utf-8 -*-
2
2
  ################################################################################
3
- # Time-stamp: <Mon 2015-06-15 18:15 svarrette>
3
+ # Time-stamp: <Thu 2015-10-22 20:16 svarrette>
4
4
  ################################################################################
5
5
 
6
6
  require 'thor'
@@ -25,6 +25,20 @@ module FalkorLib
25
25
  end # rootdir
26
26
 
27
27
 
28
+ ###### make ######
29
+ method_option :latex, :default => true, :type => :boolean, :aliases => '-l', :desc => "Makefile to compile LaTeX documents"
30
+ method_option :gnuplot, :type => :boolean, :aliases => ['--plot', '-g', '-p'], :desc => "Makefile to compile GnuPlot scripts"
31
+ method_option :markdown, :type => :boolean, :aliases => '-m', :desc => "Makefile to convert Markdown files to HTML"
32
+ method_option :markdown, :type => :boolean, :aliases => '-m', :desc => "Makefile to convert Markdown files to HTML"
33
+ method_option :repo, :default => "#{FalkorLib.config[:git][:submodulesdir]}/Makefiles",
34
+ :aliases => '-r', :desc => "Path to Falkor's Makefile repository (Relative to Git root dir)"
35
+ method_option :target, :aliases => '-t', :desc => "Symlink target"
36
+ #......................................
37
+ desc "make [options]", "Create a symlink to one of Falkor's Makefile, set as Git submodule"
38
+ def make(dir = Dir.pwd)
39
+ FalkorLib::Bootstrap.makefile_link(dir, options)
40
+ end # make
41
+
28
42
 
29
43
  end # class Link
30
44
  end # module CLI
@@ -1,6 +1,6 @@
1
1
  # -*- encoding: utf-8 -*-
2
2
  ################################################################################
3
- # Time-stamp: <Wed 2015-09-16 21:59 svarrette>
3
+ # Time-stamp: <Mon 2015-10-12 16:48 svarrette>
4
4
  ################################################################################
5
5
 
6
6
  require 'thor'
@@ -69,6 +69,18 @@ By default, NAME is '.' meaning that the repository will be initialized in the c
69
69
  # end # article
70
70
 
71
71
 
72
+ ###### letter ######
73
+ method_option :name, :aliases => '-n', :desc => 'Name of the LaTeX project'
74
+ method_option :dir, :aliases => '-d', :desc => 'Project directory (relative to the git root directory)'
75
+ #......................................
76
+ desc "letter [options]", "LaTeX-based letter"
77
+ #___________________
78
+ def letter(path = Dir.pwd)
79
+ FalkorLib::Bootstrap.latex(path, :letter, options)
80
+ end # letter
81
+
82
+
83
+
72
84
  ###### slides ######
73
85
  #......................................
74
86
  desc "slides [options]", "Bootstrap LaTeX Beamer slides"
@@ -1,6 +1,6 @@
1
1
  # -*- encoding: utf-8 -*-
2
2
  ################################################################################
3
- # Time-stamp: <Tue 2015-06-16 10:12 svarrette>
3
+ # Time-stamp: <Tue 2016-02-02 20:58 svarrette>
4
4
  ################################################################################
5
5
  # Interface for the main Git operations
6
6
  #
@@ -19,7 +19,7 @@ module FalkorLib #:nodoc:
19
19
  # MAJOR: Defines the major version
20
20
  # MINOR: Defines the minor version
21
21
  # PATCH: Defines the patch version
22
- MAJOR, MINOR, PATCH = 0, 6, 2
22
+ MAJOR, MINOR, PATCH = 0, 6, 3
23
23
 
24
24
  module_function
25
25
 
@@ -3,31 +3,35 @@
3
3
  <% unless (config[:license].empty? or config[:license] == "none") %>
4
4
  [![Licence](<%= FalkorLib::Bootstrap::get_badge("license", config[:license], 'blue') %>)](<%= FalkorLib::Config::Bootstrap::DEFAULTS[:licenses][ config[:license] ][:url] %>)
5
5
  <% end %>
6
+ ![By <%= config[:by] %>](https://img.shields.io/badge/by-<%= config[:by] %>-blue.svg) [![<%= config[:forge] %>](https://img.shields.io/badge/git-<%= config[:forge] %>-lightgray.svg)](<%= config[:source] %>) [![Issues](https://img.shields.io/badge/issues-<%= config[:forge] %>-green.svg)](<%= config[:issues_url] %>)
6
7
 
7
- Time-stamp: <Dim 2015-03-29 14:28 svarrette>
8
+ Time-stamp: <Tue 2016-02-02 23:42 svarrette>
8
9
 
9
10
  <%= ::Artii::Base.new().asciify( config[:name] ).split("\n").join("\n ") %>
10
11
  Copyright (c) <%= Time.now.year %> <%= config[:author] %> <<%= config[:mail] %>>
11
12
 
12
13
  <%= config[:summary] %>
13
14
 
14
- <% unless (config[:license].empty? or config[:license] == "none") %>
15
- * [<%= config[:license] %> Licence](<%= FalkorLib::Config::Bootstrap::DEFAULTS[:licenses][ config[:license] ][:url] %>)
16
- <% end %>
17
- * [Sources](<%= config[:source] %>)
18
-
19
15
  ## Synopsis
20
16
 
21
17
  <%= config[:description] %>
22
18
 
23
-
24
- ## Installation
19
+ ## Installation / Repository Setup
25
20
 
26
21
  This repository is hosted on [<%= FalkorLib::Config::Bootstrap::DEFAULTS[:forge][ config[:forge].to_sym ][:name] %>](<%= config[:project_page] %>).
27
22
 
23
+ <% if (config[:forge] == :gitlab) %>
24
+ * Git interactions with this repository (push, pull etc.) are performed over SSH using the port 8022
25
+ <% end %>
26
+ * To clone this repository, proceed as follows (adapt accordingly):
27
+
28
+ $> mkdir -p ~/git/<%= FalkorLib::Config::Bootstrap::DEFAULTS[:forge][ config[:forge].to_sym ][:url] %>/<%= config[:by] %>
29
+ $> cd ~/git/<%= FalkorLib::Config::Bootstrap::DEFAULTS[:forge][ config[:forge].to_sym ][:url] %>/<%= config[:by] %>
30
+ $> git clone <%= config[:origin] %>
31
+
28
32
  **`/!\ IMPORTANT`**: Once cloned, initiate your local copy of the repository by running:
29
33
 
30
- $> cd <%= config[:name].downcase %>
34
+ $> cd <%= name.downcase %>
31
35
  <% if options[:make] %>
32
36
  $> make setup
33
37
  <% else %>
@@ -35,3 +39,12 @@ This repository is hosted on [<%= FalkorLib::Config::Bootstrap::DEFAULTS[:forge]
35
39
  $> rake setup
36
40
  <% end %>
37
41
 
42
+ This will initiate the [Git submodules of this repository](.gitmodules) and setup the [git flow](https://www.atlassian.com/git/tutorials/comparing-workflows/gitflow-workflow) layout for this repository.
43
+
44
+ Later on, you can upgrade the [Git submodules](.gitmodules) to the latest version by running:
45
+
46
+ <% if options[:make] %>
47
+ $> make upgrade
48
+ <% else %>
49
+ $> rake git:submodules:upgrade
50
+ <% end %>
@@ -1,13 +1,15 @@
1
+ ## Issues / Feature request
1
2
 
2
- ## Resources
3
+ You can submit bug / issues / feature request using the [`<%= config[:by] %>/<%= config[:name].downcase %>` Project Tracker](<%= config[:issues_url] %>)
4
+
5
+ ## Advanced Topics
3
6
 
4
7
  ### Git
5
8
 
6
- This repository make use of [Git](http://git-scm.com/) such that you should have
7
- it installed on your working machine:
9
+ This repository make use of [Git](http://git-scm.com/) such that you should have it installed on your working machine:
8
10
 
9
11
  $> apt-get install git-core # On Debian-like systems
10
- $> yum install git # On CentOS-like systems
12
+ $> yum install git # On CentOS-like systems
11
13
  $> brew install git # On Mac OS, using [Homebrew](http://mxcl.github.com/homebrew/)
12
14
  $> port install git # On Mac OS, using MacPort
13
15
 
@@ -42,5 +42,5 @@ Once you have finished to commit your last changes, make the release effective b
42
42
 
43
43
  $> <%= options[:make] ? 'make release' : 'rake version:release' %>
44
44
 
45
- it will finish the release using `git-flow`, create the appropriate tag in the `<%= FalkorLib::GitFlow.branches(:master) %>` branch and merge all things the way they should be.
45
+ It will finish the release using `git-flow`, create the appropriate tag in the `<%= FalkorLib::GitFlow.branches(:master) %>` branch and merge all things the way they should be.
46
46
 
@@ -0,0 +1,38 @@
1
+ This letter is to motivate my request to apply for ...
2
+
3
+ Feel free to use the Markdown format to feed this letter
4
+
5
+ For instance, here is an enumerated list:
6
+
7
+ 1. clone the repository
8
+ 2. install `pandoc`
9
+ 3. Install the dependencies
10
+ a. `texlive-latex-base`
11
+ b. `latex-beamer`
12
+ 4. Install a reader such as `Skim`
13
+
14
+ Footnotes:
15
+
16
+ This is from [*Mitch Resnick*](https://en.wikipedia.org/wiki/Mitchel_Resnick).
17
+
18
+ > If you learn to read, you can then read to learn.\
19
+ > If you learn to code, you can then code to learn.[^ted]
20
+
21
+ [^ted]: \tiny<http://www.ted.com/talks/mitch_resnick_let_s_teach_kids_to_code.html>
22
+
23
+ etc.
24
+
25
+ * item 1
26
+ * item 2
27
+ - sub item 1
28
+
29
+ The main interest of using markdown is to simplify \LaTeX tables
30
+
31
+
32
+ | Test | col2 | col3 |
33
+ |--------|------|------|
34
+ | item 1 | 14 | 28 |
35
+ | item 2 | 1 | 1 |
36
+ | | | |
37
+
38
+
@@ -0,0 +1,154 @@
1
+ % =============================================================================
2
+ % File: <%= config[:name] %>.tex --
3
+ % Author(s): <%= config[:author] %> (<%= config[:mail] %>)
4
+ % Time-stamp: <Fri 2015-10-09 20:05 svarrette>
5
+ %
6
+ % Copyright (c) <%= Time.now.year %> <%= config[:author] %><Sebastien.Varrette@uni.lu>
7
+ %
8
+ % For more information:
9
+ % - LaTeX: http://www.latex-project.org/
10
+ % - LaTeX symbol list:
11
+ % http://www.ctan.org/tex-archive/info/symbols/comprehensive/symbols-a4.pdf
12
+ % =============================================================================
13
+
14
+ \documentclass[11pt,a4paper]{letter}
15
+
16
+ \usepackage{_style}
17
+ \usepackage{microtype} % Improves typography
18
+
19
+ \graphicspath{{images/}} % Add this directory to the searched paths for graphics
20
+
21
+ % Create a new command for the horizontal rule in the document which allows thickness specification
22
+ \makeatletter
23
+ \def\vhrulefill#1{\leavevmode\leaders\hrule\@height#1\hfill \kern\z@}
24
+ \makeatother
25
+
26
+ % ----------------------------------------------------------------------------------------
27
+ % DOCUMENT MARGINS
28
+ % ----------------------------------------------------------------------------------------
29
+
30
+ \textwidth 6.7in
31
+ \textheight 9.75in
32
+ \oddsidemargin -.25in
33
+ \evensidemargin -.25in
34
+ \topmargin -1in
35
+ \rightmargin 1in
36
+ \longindentation 0.50\textwidth
37
+ \parindent 0.4in
38
+
39
+ % ----------------------------------------------------------------------------------------
40
+ % SENDER INFORMATION
41
+ % ----------------------------------------------------------------------------------------
42
+
43
+ \def\Location{<%= config[:location] %>} % Location
44
+ \def\Who{<%= config[:author] %>} % Your name
45
+ \def\What{<%= config[:author_title] %>} % Your title
46
+ \def\Where{<%= config[:department] %> (<%= config[:department_acro] %>)} % Your department/institution
47
+ \def\Address{<%= config[:address] %>} % Your address
48
+ \def\CityZip{<%= config[:zipcode] %>, <%= config[:location] %>} % Your city, zip code, country, etc
49
+ \def\Email{E-mail: \href{mailto:<%= config[:mail] %>}{<%= config[:mail] %>}} % Your email address
50
+ \def\TEL{Phone: <%= config[:phone] %>} % Your phone number
51
+ \def\URL{} %URL: http://csc.uni.lu/sebastien.varrette} % Your URL
52
+
53
+ % ----------------------------------------------------------------------------------------
54
+ % HEADER AND FROM ADDRESS STRUCTURE
55
+ % ----------------------------------------------------------------------------------------
56
+
57
+ \address{
58
+ \includegraphics[width=1in]{<%= config[:logo] %>} % Include the logo of your institution
59
+ \hspace{5.1in} % Position of the institution logo, increase to move left, decrease to move right
60
+ \vskip -1.07in~\\ % Position of the text in relation to the institution logo, increase to move down, decrease to move up
61
+ \Large\hspace{1.5in}\hfill ~\\[0.05in] % First line of institution name, adjust hspace if your logo is wide
62
+ \hspace{1.5in}\hfill \normalsize % Second line of institution name, adjust hspace if your logo is wide
63
+ \makebox[0ex][r]{\bf \Who \What }\hspace{0.08in} % Print your name and title with a little whitespace to the right
64
+ ~\\[-0.11in] % Reduce the whitespace above the horizontal rule
65
+ \hspace{1.5in}\vhrulefill{1pt} \\ % Horizontal rule, adjust hspace if your logo is wide and \vhrulefill for the thickness of the rule
66
+ \hspace{\fill}\parbox[t]{3.85in}{ % Create a box for your details underneath the horizontal rule on the right
67
+ \footnotesize % Use a smaller font size for the details
68
+ %\Who \\ \em % Your name, all text after this will be italicized
69
+ \Where\\ % Your department
70
+ \Address\\ % Your address
71
+ \CityZip\\ % Your city and zip code
72
+ \TEL\\ % Your phone number
73
+ \Email\\[2em] % Your email address
74
+ %\URL % Your URL
75
+ \Location, \today
76
+ }
77
+ \hspace{-1.4in} % Horizontal position of this block, increase to move left, decrease to move right
78
+ \vspace{-1in} % Move the letter content up for a more compact look
79
+ }
80
+
81
+ % ----------------------------------------------------------------------------------------
82
+ % TO ADDRESS STRUCTURE
83
+ % ----------------------------------------------------------------------------------------
84
+
85
+ \def\opening#1{\thispagestyle{empty}
86
+ %\hfill \Location, \today
87
+ {\centering\fromaddress \vspace{0.6in} \\ % Print the header and from address here, add whitespace to move date down
88
+ %\hspace*{\longindentation}\today\hspace*{\fill}
89
+ \par} % Print today's date, remove \today to not display it
90
+ {\raggedright \toname \\ \toaddress \par} % Print the to name and address
91
+ \vspace{0.4in} % White space after the to address
92
+ \noindent #1 % Print the opening line
93
+ % Uncomment the 4 lines below to print a footnote with custom text
94
+ % \def\thefootnote{}
95
+ % \def\footnoterule{\hrule}
96
+ % \footnotetext{\hspace*{\fill}{\footnotesize\em Footnote text}}
97
+ % \def\thefootnote{\arabic{footnote}}
98
+ }
99
+
100
+ % ----------------------------------------------------------------------------------------
101
+ % SIGNATURE STRUCTURE
102
+ % ----------------------------------------------------------------------------------------
103
+
104
+ \signature{\Who \What} % The signature is a combination of your name and title
105
+
106
+ \long\def\closing#1{
107
+ \vspace{0.1in} % Some whitespace after the letter content and before the signature
108
+ \noindent % Stop paragraph indentation
109
+ \hspace*{\longindentation} % Move the signature right
110
+ \parbox{\indentedwidth}{\raggedright
111
+ #1 % Print the signature text
112
+ \vskip 0.65in % Whitespace between the signature text and your name
113
+ \fromsig}} % Print your name and title
114
+
115
+ % ----------------------------------------------------------------------------------------
116
+
117
+ \begin{document}
118
+
119
+ % ----------------------------------------------------------------------------------------
120
+ % TO ADDRESS
121
+ % ----------------------------------------------------------------------------------------
122
+
123
+ \begin{letter}
124
+ {
125
+ % To
126
+ }
127
+
128
+ % ----------------------------------------------------------------------------------------
129
+ % LETTER CONTENT
130
+ % ----------------------------------------------------------------------------------------
131
+
132
+ \opening{To whom it may concern,}
133
+
134
+ \input{_content.md}
135
+
136
+ \closing{Sincerely,}
137
+
138
+ % ----------------------------------------------------------------------------------------
139
+
140
+ \end{letter}
141
+
142
+ %\bibliography{biblio.bib}
143
+
144
+ \end{document}
145
+
146
+ % ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
147
+ % eof
148
+ %
149
+ % Local Variables:
150
+ % mode: latex
151
+ % mode: flyspell
152
+ % mode: visual-line
153
+ % TeX-master: "<%= config[:name] %>.tex"
154
+ % End:
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: falkorlib
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.2
4
+ version: 0.6.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sebastien Varrette
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-09-28 00:00:00.000000000 Z
11
+ date: 2016-02-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -414,12 +414,13 @@ files:
414
414
  - templates/Rakefile/footer_rakefile.erb
415
415
  - templates/Rakefile/header_rakefile.erb
416
416
  - templates/Rakefile/rakefile_gitflow.erb
417
- - templates/latex/beamer/.texinfo/main.tex.el
418
417
  - templates/latex/beamer/_content.md.erb
419
418
  - templates/latex/beamer/main.tex.erb
420
419
  - templates/latex/images/logo_UL.pdf
421
420
  - templates/latex/images/logo_ULHPC.pdf
422
421
  - templates/latex/images/question.jpg
422
+ - templates/latex/letter/_content.md.erb
423
+ - templates/latex/letter/main.tex.erb
423
424
  - templates/motd/motd.erb
424
425
  - templates/puppet/modules/.gitignore
425
426
  - templates/puppet/modules/.pmtignore
@@ -1,21 +0,0 @@
1
- (TeX-add-style-hook
2
- "main.tex"
3
- (lambda ()
4
- (add-to-list 'LaTeX-verbatim-environments-local "semiverbatim")
5
- (add-to-list 'LaTeX-verbatim-macros-with-braces-local "hyperref")
6
- (add-to-list 'LaTeX-verbatim-macros-with-braces-local "hyperimage")
7
- (add-to-list 'LaTeX-verbatim-macros-with-braces-local "hyperbaseurl")
8
- (add-to-list 'LaTeX-verbatim-macros-with-braces-local "nolinkurl")
9
- (add-to-list 'LaTeX-verbatim-macros-with-braces-local "url")
10
- (add-to-list 'LaTeX-verbatim-macros-with-braces-local "path")
11
- (add-to-list 'LaTeX-verbatim-macros-with-delims-local "url")
12
- (add-to-list 'LaTeX-verbatim-macros-with-delims-local "path")
13
- (TeX-run-style-hooks
14
- "latex2e"
15
- "_content"
16
- "beamer"
17
- "beamer10"
18
- "_style")
19
- (LaTeX-add-counters
20
- "finalframe")))
21
-