Skip to content

abartov/bybeconv

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This codebase runs https://benyehuda.org -- the Project Ben-Yehuda digital library of works in Hebrew.

I make little effort to make the code general, but if you're looking to do something similar (e.g. a digital library in Yiddish), maybe you can adapt some of my code.

External (i.e. hosting system) dependencies:

  • Pandoc 2.10 or higher for generating ebooks and other formats. (previous versions skip SmartTag tags in DOCX files, causing random letters to disappear in certain DOCXes with extraneous mark-up.
  • wkhtmltopdf for PDF generation
  • ElasticSearch for search ** https://github.com/synhershko/elasticsearch-analysis-hebrew for the Hebrew analyzer for ElasticSearch
  • YAZ and libyaz-dev for the 'zoom' gem for the bibliographic workshop
  • watir and selenium for scraping other catalogue systems
  • libpcap-dev for net-dns2
  • libmagickwand-dev for RMagick
  • libmysqlclient-dev for mysql2
  • sidekiq for scheduled jobs using systemd
  • redis as backend for sidekiq
  • memcached for caching

Linters

Since 2024 we've included some linters in project, namely:

Some quick rubocop tips

Most simple command:

rubocop

Will check whole project. In most cases it is not required. Also it will produce tons of warnings, as many parts of codebase does not follow style guidelines.

In most cases you may want to check single file:

rubocop <Path to file>

Another useful feature is rubocop's autocorrection. In some cases rubocop can try to fix style violations on its own.

There is "safe" autocorrection which should be OK in most cases:

rubocop -a <Path to file>

And more risky version of it, which can fix more issues, but known to produce errors more often:

rubocop -A <Path to file>

In any case you should be careful with autocorrection and always check result of autocorrection before commiting it to git.

Pronto

To run linters only on those parts of projects, affected by your PR you can use pronto tool. For example following command:

pronto run -c origin/master

will run linters only on lines of code which were changed compared to origin/master branch. Our CI pipeline uses this approach for all PRs.

License

The code is available for re-use under the GNU Affero General Public License http://www.gnu.org/licenses/agpl-3.0.html