Friday, November 16, 2018

Toward a HOWTO : Modifying cb2Bib to enable the use of the Annotation field natively

[I am posting this, even though it is is a month or two old, and not finished, with the intention of finishing it soon.  A new version of Cb2Bib was recently released.  It is still possible to use a patch to incorporate these modifictions.  AED] 

This Micro-HOWTO describes a method for modifying the source code of Cb3Bib, to make it possible to easily generate annotations and print PDFs of the database with comments or, if you like, annotations.  This is the one thing I have wanted most from Cb2Bib, Pere Constans's amazing reference database program.  More information, and the program itself, can be found on the website.  Most GNU/Linux distribution provides a package for Cb2Bib.

The instructions I am providing are rudimentary.  For now I will provide a patch for Cb2bib's source code, and a revised *bst for LaTeX's BibTeX component.  This is not necessarily easy, but it works.  At some point, I hope to present more thorough instructions.  I will not be able, unfortunately, to provide assistance in setting this up; I have barely been able to get it running myself.

Here's the workflow for literature searches, to generate a reference list for the libraries.
  1. Search for the references using Google Scholar
  2. Start up cb2bib (it's easier, but not essential, to do it before saving a citation.
  3. Having previously set up Google Scholar to produce bibliographic citations in the BibTeX format 
  4. Click on the Bibtex link underneath a useful item in the research results.
  5. With cb2Bib running, the GUI text input widgets may fill in, if you are fairly luck.
  6. If the Author, Title, Etc, text widgets are populated, select a *.bib database file, and save (click on the icon with a Floppy Dist).  Don't worry: this is not a complicated file; it can be edited using a text editor.  Emacs's Bibtex Mode is awesome for this.
  7. Open a new window (I think this is an editor window) by clicking on the icon with a pencil on it, to the far right at the bottom.
  8. Go to this new window frame, open "Files" and select "Postprocess and show ..", proceed.
  9. A pdf will be displayed.  For me it is displayed either by Evince ("DocumentViewer") or Okular.  Whatever is the default.
This workflow is streamlined and easy.

Perhaps even MORE magical is the way Cb2Bib handles a selections from any source, in guiding the generation of a record for the database.  I will not discuss this.  I should mention that Pere Constans has spent a considerable amount of time developing an "Annote" capacity; I have not gotten my head around it, however useful it may be for others.

What is missing for me is a means to type in a comment or annotation, and the automatic inclusion of this comment in the printed PDF.  A trivial benefit would be to present the Call Number of a book. An annotated bibliography is the obvious target for this kind of work flow.

Pere has done a great service to me, in providing instructions how to modify the code to obtain this result. Now, on page 2 of the input screens is found a space to type an "Annotation", where "Annote" used to be.  Through modification of a BibTeX .bst file, to print the Annotation field.

First, the source code must be patched.  I have had to keep my eye out for some minor glitches that may come up during the implementation of the revised program.  I found it necessary to delete all files left behind by a previous copy of Cb2Bib, including files in the ~/.config directory under MOLSpaces.


Patching cb2bib source code



  

Saturday, May 5, 2018

Linux Adventure: Manjaro, i3, and Ranger with notes on Arch linux

I have started running the i3 window manager on my Linux boxes.  I have installed Manjaro on both.  One of them is running Manjaro's i3 community edition; the other one, I think, started with an xfce4 version of Manjaro, to which I added the i3 window manager. 

It's been an adventure.  It's been this way for over 2 weeks now, and I'm not sure I'll go back to XFCE4 or Gnome.  I have distro-hopped for a good many years, and convinced myself of the advantages of various options along the way.  XFCE4 has gotten to be a favorite over the past "few" years.  It's pretty intuitive, and it doesn't get in my way much.  That's not much to say, but this isn't a review of XFCE4.  I would say, though, that if I do decide to abandon i3, XFCE4 would probably be a first step. 

i3 is something different: a tiling window manager.  I have tried a couple of these, and generally given up in a few minutes, due to the excessive amount of tweaking and steep learning curves of, for example, OpenBox.  i3, however, was pretty easy to use out of the box: I couldn't do everything in the world with it, but I could do just about anything, one way or another.  I reached some limit after a few tries, and abandoned it for a while, but I have come back, and challenged myself to learn enough to make myself dangerous. 

Manjaro is a compromise.  Arch is my goto OS, but my lack of boot manager chops generally abandons me somewhere along the line.  I was able to install Arch to my self-contructed box, Beast, but used a bootctl configuration.  Bootctl is much easier to configure on a new machine than grub, for my money.  I dislike grub very much,  But when it comes to multiple boots, I am out of my depth, so I installed Ubuntu, which does a decent job with grub out of the box, and leaves my machine easily bootable onto the Arch install on the machine.  Manjaro also does a nice job of installing. 

It has a peculiarity that has been noticed by others: once Manjaro has been installed, a manjaro splash screen is seemingly indelibly ingrained into the system, even when another OS like Ubuntu is installed over it.  I suspect that the developer(s) of Manjaro are quite knowledgeable about the fine points.  This bugs me, but I live with it.  Because Manjaro just works. 

It is an Arch Linux system with some differences, that allows me to use the AUR "repository" that makes Arch so amazingly able to easily install almost any software out there that conforms to basic source code packaging tenets of Unix. 

I am in awe of the cleanness of Arch.  The developers keep the components up to date remarkably well.  I have one Arch install that has been abandoned because of a mistake of my own installing a software package that required the Wine windoze emulator, and the result was that the desktop manager doesn't work anymore; and somehow the system seems to be corrupted.  I have to use startx to start XFCE4 or Gnome.  Ideally I would reinstall Arch. 

But I know enough to make myself dangerous; not enough to administer a GNU/Linux - Unix system at the lowest level.  I take shortcuts, so I suppose it is inevitable that I would be bitten.  But in general, I can go a long, long time just upgrading the Arch system without any issues that I know about.  I know about the precautions against deviating from the official repository, just like I know I should read every click-license.  But life is too short.

Today, I experienced something to remind me of how awesome Arch is: during an update of my Manjaro box, I started receiving a message that an update could not be performed because a certain file already existed on my filesystem.  I tried several things.  Then I remembered: I should do a search.  I use Google, with some regrets.  Duck-Duck-Go would probably work or other search engines.  But Google is an awesome search engine, as it has been since I started using it in about 1993, when it was just being developed at Stanford on Linux boxes. 

I searched the name of the file and "Arch" and "update".  A few key words usually work.  And up popped at the top of the search a message stating that upgrading requires manual intervention.  The name of the file was given, so I deleted it as suggested, and .....  Voila!  the update ran without a hitch.

This happens many times.  Well, not MANY, but it happens.  The secret is to compose a proper search, when one runs into a problem. 

Manjaro is an Arch Linux system, with some differences, most of which I don't know about.  It's easy to install, vs. Arch's somewhat more difficult installation---especially installing the boot manager.  I haven't noticed any problems with Wifi hardware for a while, excpety for an iMac, and that doesn't count as enything but domestic terrorism. 

Once it's installed it IS an arch system, with a few differences, some of which I understand.  The repos are different, so that updates are more hands on by the higher echelon developers of Manjaro.  The kernel is not as up to date, but it's reasonably recent.  I think if I understood, I could easily adopt a newer and crazier kernel, and I might try one of these days to bring the kernel up to the level of the NVME I have installed.  Most of the software on Arch repos is found on Manjaro's, but M's are not as up to date, and perhaps are under some micro-control, version wise.

Youart is a package manager with extended capabilities to deal with AUR packages.  This is already installed on Manjaro, requiring little setup to start using.  AUR. Arch User Repository (I think).

More to follow.

Thoughts about Manjaro, Endeavour, and Gentoo: Recent Dives into the rabbit holes

I have tried Endeavour Linux in the past; something always feels wrong about it.  It has some good points, though.  When I saw it overtook M...