Package: torefl
TOREFL means To REFerence List, as the list of publications you will like to reference later when you will write some latex documents… And since some parts were developed at Paris, you will get the… reference (pun intended)FeaturesNon-verbose command line interfaceEasy management of references with tags, rating etc.Pdf and metadata saved in the file systemEasy opening of a reference from its name or its IDPowerful search and system on description, tags, rating, and any bibtex fieldsMemorization of the selection you made (you can assign the result of a filter to sort of variable called register to match vim vocabulary)Export to bibtex format of either the entire bibliography either only a selectionPossibility to edit the metadata from the softwareEasy to extend (create other formatters, exports, filter etc.PhilosophyThis software is meant to respect KISS principles i.e. to be as simple as possible.To use it, you only need to have a bibliography directory, and put all your pdf in it. The name of the pdf will be the bibtex identifier for using with the\citecommand. Then, just touch a file with the same name but the.toreflextension.so you should have a file tree like thisbiblio
|--topology
|  |--MorseTheory.pdf
|  |--MorseTheory.torefl
|  |--ReebGraph.pdf
|  |--ReebGraph.torefl
|--Other
|  |--Matrices.pdf
|  |--Matrices.torefl
|--SuperArticle.pdf
|--SuperArticle.torefl.torefl formatThis file can be either empty, either contain only the reference in bibtex format, either contain some meta-data (format described below) and the bibtex both separated by a line starting with 16 stars :****************Example:#NotRead #Topology @10

Presentation of the #Morse Morse Theory

@-55.0

****************

@book{9781400881802,
  Author = {John Milnor},
  Title = {Morse Theory. (AM-51) (Annals of Mathematics Studies)},
  Publisher = {Princeton University Press},
  Year = {1963},
  ISBN = {9781400881802},
}Note :the identifier given in the bibtex will be discarded at export, and replaced by the name of the file without the extensionMetadata formatThe metadata are basically a comment for yourself of the referenced article, a sum up, a description or whatever you like. You can also specify tags you will be able to search on, and also a rating that has the meaning you want, you will also be able to search on, with comparators like lesser than greater than etc.TagsA tag is surrounded by two spaces, and begins with a#. It will be converted to CamelCase starting with an uppercase letter.#TAGwill become#Tag,#test_tagwill be converted to#TestTag.RatingThe rating is surrounded by two spaces it begins by@followed by a positive or negative, int or float number. If there are several ratings in the metadata, only the last one will be used, the others will be discarded.CommentThe parser removes all the tags and the ratings, and strip all spaces before and after the remaining. The remaining is what is called the “comment”, or “description”. It’s user-defined, and you will also be able to search for string appearing in the comments.From the previous exampleIn the previous example, the tags are#NotRead,#Topologyand#Morse, the rating is-55.0(the@10being discarded), and the comment is “Presentation of the Morse Theory”.Using ToreflTo use Torefl, just go to your bibliography root, and type:$> torefl(the$>means you are a standard user in your operating system)Then, a command line appears. Here is a list of the commands :Command ListEach command has a short and a long alias. Different aliases are separated by a coma below.l, listtorefl>l [ [ [-leg] /path/*/patern/* ] [ #tags ]... [ @[ < | > | <= | >= | = ] ]... [ -bib [ [field] [content] ]... ] [-com [commentSearch] ]...Lists the entries using or not a filter. There are 3 filters currently, legacy (-leg) (default filter at the begin), bibtex (-bib) and comment (-com). You can switch between them using the-xxxcorresponding.Without arguments, it just lists all the entries in the bibliographyYou can combine them at your will, it will do an AND between the results. For a or, just do the filter twice, and use the selections (explained below)legacy filterLegacy because it is the first filter I did, and I added the other ones after.The first parameter is a path to look into, using unix glob pattern. Then, you can add tags and priority filters. Tags will filter all articles with the given tags appearing in the.torefl.
Rating start with@, then a comparator (left member is the rating of the article, right member is the number to compare) followed by the number to compare to.@<30will give all entries with priority lesser than 30.bibtex filterBibtex filter is a list of pairsfield content, and will keep only entries with a bibtex containingcontentin the fieldfield. You can put several field/content pairs and it will combine them with an AND between the resultscomment filterThe comment filter just filters the entries containing all the arguments given to the filtero, opentorefl>o <ID|Name>Opens ID (The blue number when listed using the default formatter) or the name (same identifier than used with cite, i.e. the file name without extension) with the command given in the configuration keyopen_cmd.ed, edittorefl>ed  <ID|Name>Opens the.toreflfile corresponding to ID (The blue number when listed using the default formatter) or Name (same identifier than used with cite, i.e. the file name without extension) with the command given in the configuration keyedit_cmd, and refresh the database.s, sel, selectionThis command permits to work with selections. Its syntax is just a mind f***. Any suggestion to improve it is definitively welcome !!!torefl>s <register> <operator> [register]registercan be any register name.operatoris an operator amoung|=(union),&=(intersection),^=(symetric difference),-=(difference) and=(copy).
The left member is assigned the result of the operation. The right member can be either empty (it will use the result of the previous list call) either0(the empty set), either another register name.To do a ‘OR’ filter, one can dotorefl>l [filter]
torefl>s a =
torefl>l [filter2]
torefl>s a |=
torefl>ls alsList Selectiontorefl>ls <register>List the content ofregistere, exporttorefl>e bib <filename> [register]Exports in bibtex format the selection in register if given, else the selection of the previous call tolist. You have to type thebibbecause other exporters could be supported in the future (like an html exporter or other reference list formats)