
Security News
Oxlint Introduces Type-Aware Linting Preview
Oxlint’s new preview brings type-aware linting powered by typescript-go, combining advanced TypeScript rules with native-speed performance.
The gem is intended for copying and automatically integrating the front-end of the target site into Rails. It is also possible to automatically translate site pages, and create a multilingual site structure in Rails.
Runtime versions tested: Ruby 3.0.0 Rails 7.0.4.3
Install the gem and add it to the Gemfile:
$ bundle add parsergem
If you are not using bundler, you can install the gem like this:
$ gem install parsergem
It is important that the target site meets certain requirements:
At this stage, the gem provides one generator to perform the declared functions. After installing the gem, run the generator:
$ rails g parser_gem:test --target-url "target.com"
The generator takes the following parameters:
For normal cloning:
--target_url
- Domain name of the target site
To template the header and footer of the site:
--header_class_name
- ID of the block in which the header is located
--footer_class_name
- ID of the block containing the footer
To create language versions (You must fill in all parameters):
--target_site_language
- Current site language
--languages
- "en es de" format string, with a list of language codes to which the original site should be translated
--aws_region
- AWS Region
--aws_public_key
- The public key of your AWS TRANSLATE API
--aws_secret_key
- The secret key of your AWS TRANSLATE API
After the generator has finished its work, you will most likely need to modify the header and footer parshals to fix the links. And in current version some media files includes in css may be broken.
Bug reports and pull requests are welcome on GitHub at https://github.com/d1mentor/parser.
Гем предназначен для копирования и автоматической интеграции в Rails фронтенда целевого сайта. Так-же есть возможность автоматического перевода страниц сайта, и создания в Rails структуры мультиязычного сайта.
Проверенные версии среды выполнения: Ruby 3.0.0 Rails 7.0.4.3
Установить гем и добавить его в Gemfile:
$ bundle add parsergem
Если вы не используете bundler, установить гем можно так:
$ gem install parsergem
Важно, что-бы целевой сайт соответствовал некоторым требованиям:
На данном этапе гем предоставляет один генератор, для выполнения заявленных функций. После установки гема, запустите генератор:
$ rails g parser_gem:test --target-url "target.com"
Генератор принимает следующие параметры:
Для обычного клонирования:
--target_url
- Доменное имя целевого сайта
Для шаблонизации хедера и футера сайта:
--header_class_name
- ID блока в котором находится хедер
--footer_class_name
- ID блока в котором находится футер
Для создания языковых версий(Необходимо заполнить все параметры):
--target_site_language
- Текущий язык сайта
--languages
- Строка формата "en es de", с перечнем кодов языков, на которые стоит перевести оригинальный сайт
--aws_region
- Регион AWS
--aws_public_key
- Публичный ключ вашего AWS TRANSLATE API
--aws_secret_key
- Секретный ключ вашего AWS TRANSLATE API
После того как генератор закончит свою работу, вам, скорее всего, придётся доработать паршалы хедеров и футеров для исправления ссылок. Так же в текущей версии некоторые ссылки на подключение фотографий в css файлах могут не работать.
Сообщения об ошибках и запросы на доработку гема приветствуются на GitHub по адресу https://github.com/d1mentor/parser
The gem is available as open source under the terms of the MIT License.
FAQs
Unknown package
We found that parsergem demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oxlint’s new preview brings type-aware linting powered by typescript-go, combining advanced TypeScript rules with native-speed performance.
Security News
A new site reviews software projects to reveal if they’re truly FOSS, making complex licensing and distribution models easy to understand.
Security News
Astral unveils pyx, a Python-native package registry in beta, designed to speed installs, enhance security, and integrate deeply with uv.