Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
suqingdong committed Jan 11, 2023
1 parent 94815d2 commit 2cff6f6
Show file tree
Hide file tree
Showing 9 changed files with 28 additions and 180 deletions.
21 changes: 0 additions & 21 deletions docs/source/api/impact_factor.bin.rst

This file was deleted.

29 changes: 0 additions & 29 deletions docs/source/api/impact_factor.db.rst

This file was deleted.

20 changes: 0 additions & 20 deletions docs/source/api/impact_factor.rst

This file was deleted.

45 changes: 0 additions & 45 deletions docs/source/api/impact_factor.util.rst

This file was deleted.

7 changes: 0 additions & 7 deletions docs/source/api/modules.rst

This file was deleted.

2 changes: 1 addition & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
# -- Project information -----------------------------------------------------

project = 'impact_factor'
copyright = '2022, suqingdong'
copyright = '2023, suqingdong'
author = 'suqingdong'

# The full version, including alpha/beta/rc tags
Expand Down
2 changes: 1 addition & 1 deletion docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
====================================
ImpactFactor |version| Documentation
====================================
ImpactFactor is a Impact Factor Toolkits, which contains ``build``, ``version``, ``search``, ``pubmed_filter``
ImpactFactor is a Impact Factor Toolkits, which contains ``build``, ``search``, ``filter``
sub-commands. You can search the IF of a journal, and you can generate a pubmed filter for NCBI Pubmed.

Installation Guide
Expand Down
2 changes: 1 addition & 1 deletion docs/source/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Installation guide

Install with ``pip``::

pip install impact_factor
python3 -m pip install -U impact_factor

Install from `source code`_ ::

Expand Down
80 changes: 25 additions & 55 deletions docs/source/tutorial.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,57 +5,26 @@ Tutorials
``build``
=========

Download NCBI Journals
----------------------

`NCBI Journal List`_

.. _NCBI Journal List: https://www.ncbi.nlm.nih.gov/books/NBK3827/table/pubmedhelp.T.journal_lists/

download with ``wget``::

wget -c ftp://ftp.ncbi.nih.gov/pubmed/J_Entrez.gz
wget -c ftp://ftp.ncbi.nih.gov/pubmed/J_Medline.gz

.. note::
You can also download the journals from browser, or you can speed up with ``ascp``


Build the Database
build the database
------------------

.. code:: console
impact_factor build -ef J_Entrez.gz -mf J_Medline.gz -t 32
.. note::
* ``--threads N`` parameter can be used to speed up building
* ``--echo`` parameter will show the detail processing of building

impact_factor build # default
impact_factor -d test.db build -i IF.xlsx
``version``
===========

Show the informations of database

.. code:: console
impact_factor version
might shown as follows::
.. note::
* ``-d dbfile`` specify a dbfile
* ``-i excel`` specify a excel file

==========================================================
program version: 1.0.0
database version: 2020 [2020-08-20 15:32:34.141140]
total journals: 9167
indexed journals: 8714
database filepath: /data/work/suqingdong/code/impact_factor/impact_factor/data/impact_factor.db
==========================================================

``search``
==========

search the database
-------------------

* search with ISSN::

impact_factor search 0028-0836
Expand All @@ -73,40 +42,41 @@ might shown as follows::
impact_factor search "nature com%"


``pubmed_filter``
``filter``
=================

filter with factor
------------------

IF >= 30::

impact_factor pubmed_filter -min 30
impact_factor filter -min 30
IF <= 1::

impact_factor pubmed_filter -min 1
impact_factor filter -min 1

5 <= IF <= 10::

impact_factor pubmed_filter -min 5 -max 10
impact_factor filter -min 5 -max 10

save result to a file::
output pubmed filter format::

impact_factor pubmed_filter -min 5 -max 10 -o 5_10.txt
impact_factor filter -min 5 -max 10 --pubmed-filter


use as a module
===============
.. code:: python
from impact_factor import ImpactFactor
IF = ImpactFactor()
IF.check_version()
from impact_factor.core import Factor
IF.search('nature')
fa = Factor()
IF.search('nature com%')
print(fa.dbfile)
IF.pubmed_filter(min_value=30)
fa.search('nature')
fa.search('nature c%')
IF.pubmed_filter(min_value=5, max_value=10)
fa.filter(min_value=100, max_value=200)
fa.filter(min_value=100, max_value=200, pubmed_filter=True)

0 comments on commit 2cff6f6

Please sign in to comment.