Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

theme paths converted to lowercase #172

Closed
ael-code opened this issue Oct 20, 2016 · 5 comments
Closed

theme paths converted to lowercase #172

ael-code opened this issue Oct 20, 2016 · 5 comments
Assignees
Milestone

Comments

@ael-code
Copy link
Contributor

In the help message you can find the following two sentences regarding the theme parameter:

--theme -t    Path to a FRESH or JSON Resume theme.

and under tips section:

You can use any FRESH or JSON Resume theme with HackMyResume.

The first strange behaviour that I noticed is that it seems that all the path passed through --theme parameter are converted to lowercase.

To reproduce the bug you can create a temporary empty directory: mkdir /tmp/UPPERcase
and then run hackmyresume --debug BUILD resume.json --theme="/tmp/UPPERcase"

First of all the following debug message is printed:
Verifying /TMP/UPPERCASE theme.
The question is why it is converted to uppercase here?

Moreover the error message raised is:
Couldn't find the '/tmp/uppercase' theme. Please specify the name of a preinstalled FRESH theme or the path to a locally installed FRESH or JSON Resume theme.

And according to strace:
access("/tmp/uppercase", F_OK) = -1 ENOENT (No such file or directory)

@ael-code
Copy link
Contributor Author

ael-code commented Oct 20, 2016

In the code I found that of the theme parameter is converted to lowercase before to be passed to _verifyTheme function

On the other hand I think that the reason why is printed uppercase in the debug messages is due to the string format in msg.yml. But I really don't know what the double stars ** is triggering

@giodamelio
Copy link

I just ran into this problem today. Does anyone know the reasoning behind this?

@ael-code
Copy link
Contributor Author

Actually the fix would be really easy, but I'm waiting for @hacksalot to comment on this

@hacksalot
Copy link
Owner

hacksalot commented Jan 30, 2018

IIRC this issue dates back to when we could make stronger assumptions because we were embedding themes and not attempting to support arbitrary JRS themes found in the wild. This is in progress now.

@hacksalot hacksalot added this to the v1.9.0 milestone Jan 30, 2018
@hacksalot hacksalot self-assigned this Feb 1, 2018
@hacksalot
Copy link
Owner

hacksalot commented Feb 1, 2018

Seems fixed in latest code although we'll want to respect the theme casing in the console output.

λ hackmyresume build resume.json to out.all -t ../fresh-standard/fresh-test-themes/fresh/UPPERcase

*** HackMyResume v1.9.0 ***
Reading FRESH resume: resume.json
Applying UPPERCASE theme (3 formats)
Generating TXT  resume: out.txt
Generating JSON resume: out.json
Generating YML  resume: out.yml

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants