[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

[ANN] xmlresume2x 0.1.0

Thomas Leitner

11/24/2004 2:46:00 AM

Hi everybody,

here is the initial release of xmlresume2x which "converts an xml resume to various output formats"!

Homepage: http://xmlresume2x.rub...
Download: http://rubyforge.org/frs/?gr...
News entry: http://rubyforge.org/forum/forum.php?for...

Currently there is only a .tgz and .zip package available and an .rps file for directly installing via the rpa tool (not yet in the RPA - Mauricio?) by using:

# rpa install http://rubyforge.org/frs/download.php/2010/xmlresume2x...

It seems as if RubyGems do not support data dirs (/usr/share/...), therefore there is no RubyGem file for xmlresume2x available. If someone could point me at the right documentation on how to install files to the data directory with RubyGems, it would be great!

And last but not least the essential part of the README file:

= Description

The "XML Resume Library" at http://xmlresume.sourc... provides a way for storing one's resume
data in a consistent way. The XML résumé can be transformed to various output formats, including
text, HTML and PDF by utilizing XSLT.

I came across the European Curriculum Vitae format at http://www.cedefop.eu..int/transpare...
which provides a standard for CVs in Europe. Nicola Vitacolonna has used this information to provide
a LaTeX class - europecv (http://www.ctan.org/tex-archive/help/Catalogue/entries/eur...) -
which (nearly) conforms to this standard. As the XML Résumé Library does not have a converter for
this, I wrote this program to convert an XML résumé to a LaTeX file which uses the europecv class.

During the development process I realized that it would be useful to add support for other output
formats. Therefore I changed the conversion process to use configuration files so that this program
can be used to transform a résumé to any output format.

= Dependencies

No Ruby dependencies but if you want to convert the resulting LaTeX file to a PDF file, you need to
have LaTeX and the europecv class installed.

= Installation

$ ruby setup.rb config
$ ruby setup.rb setup
$ ruby setup.rb install

Or you could use Rake and substitute the above commands with this:
$ rake install
3 Answers

Mauricio Fernández

11/24/2004 12:00:00 PM

0

On Wed, Nov 24, 2004 at 11:48:01AM +0900, Thomas Leitner wrote:
> here is the initial release of xmlresume2x which "converts an xml resume to various output formats"!
[...]
> Currently there is only a .tgz and .zip package available and an .rps
>file for directly installing via the rpa tool (not yet in the RPA -
>Mauricio?) by using:
>
> # rpa install http://rubyforge.org/frs/download.php/2010/xmlresume2x...

Thank you for thinking about us, humble repackagers :-)
I have uploaded xmlresume2x to the preliminary Ruby Production Archive,
so it is now available with
rpa install xmlresume2x
That makes it port #152 ;)

I did some minor changes (added a description and tried to install
all the relevant docs) to the install script:

require 'rpa/install'

class Install_xmlresume2x < RPA::Install::FullInstaller
name 'xmlresume2x'
version '0.1.0-2'
classification Application
build do
installdocs %w[COPYING ChangeLog TODO]
installdocs "doc" # default, which was overriden by the above
installrdoc %w[README] + Dir["lib/**/*.rb"]
installdata
end
description <<-EOF
Converts an XML resume to various output formats.

xmlresume2x can convert CVs written in the XML Résumé
Library format (http://xmlresume.sourc...), based
on the 'standard' European Curriculum Vitae format at
http://www.cedefop.eu.int/transpare..., to a number
of formats, including LaTeX markup which uses the europecv
(http://www.ctan.org/tex-archive/help/Catalogue/entries/eur...)
class.
EOF
end


Is the description OK?

> It seems as if RubyGems do not support data dirs (/usr/share/...),
>therefore there is no RubyGem file for xmlresume2x available. If someone
>could point me at the right documentation on how to install files to
>the data directory with RubyGems, it would be great!

It is not possible to install under the standard datadir with RubyGems,
by design. You'd have to change your code for RubyGems, using something
like

if defined?(Gem::Cache)
gempath = Gem::Cache.from_installed_gems.search("xmlresume2x",
"=#{MYVERSION}").last.full_gem_path
datapath = File.join(gempath, "data")
else
datapath = File.join(Config::CONFIG["datadir"], "xmlresume2x")
end

in addition to the 'standard'

# try the one in site_lib first
begin
require 'otherlibstuff'
rescue LoadError
raise if $".include "rubygems.rb"
require 'rubygems'
retry
end

or

# try the RubyGems version first.
begin
require 'rubygems'
rescue LoadError
end
require 'otherlibstuff'

--
Hassle-free packages for Ruby?
RPA is available from http://www.rubyar...


Thomas Leitner

11/24/2004 5:20:00 PM

0

On Wed, 24 Nov 2004 21:00:07 +0900
Mauricio Fernández <batsman.geo@yahoo.com> wrote:

| [...]
|
| description <<-EOF
| Converts an XML resume to various output formats.
|
| xmlresume2x can convert CVs written in the XML Résumé
| Library format (http://xmlresume.sourc...), based
| on the 'standard' European Curriculum Vitae format at
| http://www.cedefop.eu.int/transpare..., to a number
| of formats, including LaTeX markup which uses the europecv
| (http://www.ctan.org/tex-archive/help/Catalogue/entries/eur...)
| class.
| EOF
| end
|
|
| Is the description OK?

It's basically okay, but the XML Résumé Library format is not based on the European Curriculum Vitate format. The former is an XML format defined by individuals and the latter a document defined by the European Union. So the description should be:

-----------
xmlresume2x can convert CVs written in the XML Résumé
Library format (http://xmlresume.sourc...) to a number
of formats, including LaTeX markup which uses the europecv
(http://www.ctan.org/tex-archive/help/Catalogue/entries/eur...)
class which is based on the 'standard' European Curriculum Vitae
format at http://www.cedefop.eu.int/transpare....
-----------

| > It seems as if RubyGems do not support data dirs (/usr/share/...),
| >therefore there is no RubyGem file for xmlresume2x available. If
| >someone could point me at the right documentation on how to install
| >files to the data directory with RubyGems, it would be great!
|
| It is not possible to install under the standard datadir with
| RubyGems, by design. You'd have to change your code for RubyGems,
| using something like
|
| if defined?(Gem::Cache)
| gempath = Gem::Cache.from_installed_gems.search("xmlresume2x",
| "=#{MYVERSION}").last.full_gem_path
| datapath = File.join(gempath, "data")
| else
| datapath = File.join(Config::CONFIG["datadir"], "xmlresume2x")
| end
|
| in addition to the 'standard'
|
| # try the one in site_lib first
| begin
| require 'otherlibstuff'
| rescue LoadError
| raise if $".include "rubygems.rb"
| require 'rubygems'
| retry
| end
|
| or
|
| # try the RubyGems version first.
| begin
| require 'rubygems'
| rescue LoadError
| end
| require 'otherlibstuff'
|

Thanks for that information, I will try to add this to xmlresume2x and I'll change the generator for the RPA'fied install.rb to include your changes!

Thomas Leitner

Mauricio Fernández

11/24/2004 7:37:00 PM

0

On Thu, Nov 25, 2004 at 02:18:00AM +0900, Thomas Leitner wrote:
> | Is the description OK?
>
> It's basically okay, but the XML Résumé Library format is not based
>on the European Curriculum Vitate format. The former is an XML format
>defined by individuals and the latter a document defined by the European
>Union. So the description should be:
>
[...]

Thanks a lot for the corrections.

The metadata is now:

name: xmlresume2x
version: 0.1.0-3
classification: Top.Application
requires:
description: Converts an XML resume to various output formats.

xmlresume2x can convert CVs written in the XML Résumé
Library format (http://xmlresume.sourc...) to a number
of formats, including LaTeX markup which uses the europecv
(http://www.ctan.org/tex-archive/help/Catalogue/entries/eur...)
class which is based on the 'standard' European Curriculum Vitae
format at http://www.cedefop.eu.int/transpare....


> | > It seems as if RubyGems do not support data dirs (/usr/share/...),
> | >therefore there is no RubyGem file for xmlresume2x available. If
> | >someone could point me at the right documentation on how to install
> | >files to the data directory with RubyGems, it would be great!
> |
> | It is not possible to install under the standard datadir with
> | RubyGems, by design. You'd have to change your code for RubyGems,
> | using something like
[...]
> Thanks for that information, I will try to add this to xmlresume2x
>and I'll change the generator for the RPA'fied install.rb to include
>your changes!

The port in RPA will be kept up-to-date if we don't miss your releases ;)
Good ways to ensure that include announcing it here, on
raa.ruby-lang.org, or dropping by #RPA @ irc.freenode.net.

--
Hassle-free packages for Ruby?
RPA is available from http://www.rubyar...