-
Notifications
You must be signed in to change notification settings - Fork 311
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
No dotclear command in jekyll/commands/import.rb #510
Comments
Looks like a bug. We should have all the importers defined here. Would you be up for a PR to add dotclear (and any other missing importers)? If so, mention me and I'll take a look. Otherwise, I'll try to fix this bug! In the meantime, you could try: $ ruby -r rubygems -e 'require "jekyll-import";
JekyllImport::Importers::Dotclear.run({
"datafile" => "path/to/datafile",
"mediafolder" => "path/to/mediafolder"
})' |
@ashmaroli There might be a way to convert the command's explicit hash into a dynamic one based on files in the importers/ subdirectory if you'd be interested in tackling that. It would reduce the work of creating new importers! |
It looks pretty simple to tackle; in theory, downcase I'll submit a PR by tomorrow. |
Hello @jrfern, |
Issue reproduced. Remember that I use the bundle version, not the github one. Anyway I have git-cloned this repository, expecting some changes. No commit has been made, so both versions are identical. Just checked: same output - "invalid option: --datafile". I also wrote that "jekyll import --help" is of no use. No mention of importers, no related parameters. I keep on suspecting that at least a mention of dotclear should be added to jekyll/commands/import.rb. |
@jrfern There hasn't been any changes made to this repo since you last cloned. I just wanted to check if you entered the command name correctly. From what I realised, the code you and Parker pointed out isn't being used at all, so absence of |
@parkr From my tests, the code you have linked in your comment is not accessed at all when invoking an importer via CLI. This was confirmed at my end by invoking a non-existent importer:
Expected to get the graceful error message, but got nothing ergo |
@ashmaroli I tried the four options (with dotclear and with Dotclear). Here's the output
|
@jrfern Okay now try running the following:
|
This was unexpected. I thought that maybe there was a conflict with a system gem, so checked as root:
No system jekyll gems. Now as my user
|
I expected exactly these results once I got a better understanding of the source code @jrfern. I however still don't understand how your Please delete your |
Did I? No, I followed the instructions in https://import.jekyllrb.com/docs/installation/, so I used
Anyway I run 'bundle update' time after time. Is that enough? Seems it isn't.
No - is that the cause of my problems? I did 'bundle install' now, no mention of jekyll-import.
be Ok? |
Well, after filling the Gemfile with
the errors are different:
Some progress, then. But the command line "jekyll import" is no longer so straightforward. |
Looks like there are multiple problems getting surfaced here, @jrfern. The first problem is that the documentation has failed to impart the necessary information to novice users such as yourselves. Essentially, what every user has to know is about the impact of Bundler. Bundler and Gemfile work together. They cannot function independent of themselves. When a user runs Unfortunately, there comes the second problem. If The third problem that surfaced here is the fact that the CLI doesn't really bail out when given invalid subcommand (e.g. The fourth problem (w.r.t ArgumentError) is quite new and will need additional testing which is the fifth problem. The test-suite for this project is seriously lacking and therefore unreliable. 😭 😭 |
I'd vote here to use a new jekyll-import executable instead of the subcommand to eliminate the boot dependency on Jekyll. |
I'd vote against that idea (for now atleast). A new executable with an entirely different approach is expensive. We need a clear idea / design; change all existing (bundled) importers to play compatibly with new executable.. Right now, the major issue at hand is lack of a proper test-suite. The Dotclear importer among many others, isn't continuously tested. I have no idea regarding the schematics of a Dotclear datafile which is a mandatory requirement for the importer. So I can't test things at my end and have to rely on feedback from non-developer users who are not familiar with the code under the hood. 🤷 |
I don't think it would be expensive. I can try to spend some time on it this weekend. It would still be a mercenary command but would work out of the box without Jekyll. In the meantime our docs don't work right? If so we should consider fixing them. |
@parkr can I request you to work on getting the test-suite reliable? I would really love to have mock schema / export-file for as many importers as practically possible. |
That's me :-). As an external observer and a non-developer I would consider that the software should keep to its promises, or the documentation should be changed. I also understand that there are always too many things to do and too few people to do them, and that priorities must be decided. As I got to the fourth problem level (@ashmaroli) here --no longer such a newbie-- there are two tasks now: solve it and test-suite identify it. The first one is logically prior to the second one, isn't it? How can I help identify what's happening? Dotclear's backup.txt is a utf-8 file, and I suppose that everything is utf-8 by default, so why the InvalidLocaleData error? Any configuration line I should have added somewhere? |
This keeps puzzling me. I created the structure with "bundle exec jekyll new ...". The help output mentions a plugins subdirectory, should I create it manually? _config.yml mentions jekyll-feed. Also I don't know how to cope with the --source option, that contradicts the line "jekyll import dotclear --datafile PATH --mediafolder PATH". |
In theory @jrfern, you could alter the Dotclear backup file to not contain any identifying data, commit the file into a git repository and push that up to GitHub and give us the URL so that we can clone that repo.
All of those options are actually injected by Jekyll and have no relevance to jekyll-import. I guess this is why @parkr suggested introducing an entirely new CLI executable for jekyll-import instead of being an extension of the |
https://bpa.st/3J6BE |
Sorry if this is plain silly, I was trying to use "jekyll import" (bundle-updated) to import my dotclear blog, as documented in https://import.jekyllrb.com/docs/dotclear/ and I get
jekyll 4.3.2 | Error: Whoops, we can't understand your command. jekyll 4.3.2 | Error: invalid option: --datafile jekyll 4.3.2 | Error: Run your command again with the --help switch to see available options. /home/jr/gems/gems/mercenary-0.4.0/lib/mercenary/program.rb:33:in
go': invalid option: --datafile (OptionParser::InvalidOption)`
"jekyll import --help" doesn't help. Tried to find out what's the matter, and I found a jekyll/commands/import.rb file that included all the importers but dotclear. Is it an oversight or has it been removed as obsolete?
The text was updated successfully, but these errors were encountered: