Skip to content

Jiyuan-Yang/paper_lookup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Paper Lookup

Introduction

A simple command line tool to manage your papers. You could manage papers saved in your computer in a more efficient way with the help of this tool.

Release Notes

  • 1.0.0 Release with basic functions.
  • 1.0.1 Remove redundant codes, bug fix and modification in init module
  • 1.1.0 Add config label shell_line_length, bug fix and structure modification

Environment

Python 3.7.7
colorama 0.4.3

colorama is a tool for colorful output in command line, you could install it by conda or pip.

Installation

  • Find a proper directory to place this tool

    cd your/directory
    git clone https://github.com/Jiyuan-Yang/paper_lookup.git
  • Then check the version of your Python interpreter and install other requirements

    python --version
    Python 3.7.7
    conda install colorama
  • In order to use it in a more efficient way, you could add an alias in the configuration file of your shell (e.g. ~/.bashrc ~/.zshrc etc.)

    cd
    vim .zshrc # (or .bashrc if you use Bash)
    # add the following alias
    alias plup="python /your/path/paper_lookup/main.py"
  • Check if this tool works

    plup -v # or plup --version, plup is the abbreviation of Paper LookUP
    Paper Lookup version 1.0.0
    # done!

Usage

  • First you should make an initialization

    plup init

    Following the steps the set the root folder and backup folder. All the papers and relative files will be placed in the root folder, and backup folder is an option.

  • You could use env to reset or change environment parameters.

  • Use the import instruction to import papers. In order to make better use of other functions, please place the .bib file with your paper, and make sure they have the same name (e.g. paper: some_name.pdf, bib file: some_name.bib). You could place them in a folder, like this

    papers_directory
     ├─paper0.bib
     ├─paper0.pdf
     ├─paper1.bib
     └─paper1.pdf
    

    Then use the following instruction

    plup -f /absolute/path/to/papers_to_import -t 'tag0;tag1'

    This will import the papers into the root folder you've set during initialization

  • Then you could list or search paper by the find command

    plup find # this will list all papers
    plup find -n 'keyword && (in || title)' -a 'author && name' -t 'tag0 || tag1'
     id   | title                     | author          | tags            
        0 | paper_a                   | author0         | tag0;tag1
  • Use the open command to open the paper

    plup open 0 # open + paper_id
    # this has been tested on macOS, which use the `open` command in shell to open 
    # the pdf file
    # you may change it to the command in you own OS

    You could find it in paper_loopup/exec/open_exec.py.

  • Use the export command to export the bib file of the paper

    plup export 0 # export + paper_id
  • For more information, use -h flag, for example

    $ plup -h
    usage: main.py [-h] [-v] {init,env,import,find,open,export,backup} ...
    
    Paper Lookup, an easier way to manage your papers.
    
    positional arguments:
      {init,env,import,find,open,export,backup}
                            sub parsers for Paper Lookup
        init                initialize a configuration file
        env                 edit env arg
        import              import papers, paper and its bib file should have the
                            same name (eg. paper: some_paper.pdf, bib:
                            some_paper.bib)
        find                fetch info about papers, use ';' to add more keywords
                            and use '' to quote add the keywords
        open                open paper
        export              export bib files
    
    optional arguments:
      -h, --help            show this help message and exit
      -v, --version         print version info
    
    $ plup import -h
    usage: main.py import [-h] [-s SINGLE] [-f FOLDER] [-t TAGS] [-nb]
    
    optional arguments:
      -h, --help            show this help message and exit
      -s SINGLE, --single SINGLE
                            import single paper, -s [paper path]
      -f FOLDER, --folder FOLDER
                            import all papers in a folder, -s [paper path]
      -t TAGS, --tags TAGS  add tags for the papers, please use ';'tosplit tags,
                            and don't forget to use '' toquote the args
      -nb, --no-bib         if there is no bib file, use this flag

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages