Skip to content

Commit

Permalink
Merge pull request #118 from pyiron/syntaxreadme
Browse files Browse the repository at this point in the history
Add syntax highlighting for Readme
  • Loading branch information
jan-janssen committed Apr 23, 2024
2 parents 955cc2b + 0d57461 commit a212b1b
Showing 1 changed file with 39 additions and 38 deletions.
77 changes: 39 additions & 38 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,54 +11,55 @@ The pyfileindex helps to keep track of files in a specific directory, to monitor

# Installation
The pyfileindex can either be installed via pip using:

pip install pyfileindex

```shell
pip install pyfileindex
```
Or via anaconda from the conda-forge channel

conda install -c conda-forge pyfileindex

```shell
conda install -c conda-forge pyfileindex
```

# Usage
Import pyfileindex:

from pyfileindex import PyFileIndex
pfi = PyFileIndex(path='.')
```python
from pyfileindex import PyFileIndex
pfi = PyFileIndex(path='.')
```
Or you can filter for a specifc file extension:

def filter_function(file_name):
return '.txt' in file_name
pfi = PyFileIndex(path='.', filter_function=filter_function)

```python
def filter_function(file_name):
return '.txt' in file_name

pfi = PyFileIndex(path='.', filter_function=filter_function)
```
List files in the file system index:

pfi.dataframe

```python
pfi.dataframe
```
Update file system index:

pfi.update()

```python
pfi.update()
```
And open a subdirectory using:

pfi.open(path='subdirectory')

```python
pfi.open(path='subdirectory')
```
For more details, take a look at the example notebook: https://github.com/pyiron/pyfileindex/blob/main/notebooks/demo.ipynb


# License
The pyfileindex is released under the BSD license https://github.com/pyiron/pyfileindex/blob/main/LICENSE . It is a spin-off of the pyiron project https://github.com/pyiron/pyiron therefore if you use the pyfileindex for your publication, please cite:

@article{pyiron-paper,
title = {pyiron: An integrated development environment for computational materials science},
journal = {Computational Materials Science},
volume = {163},
pages = {24 - 36},
year = {2019},
issn = {0927-0256},
doi = {https://doi.org/10.1016/j.commatsci.2018.07.043},
url = {http://www.sciencedirect.com/science/article/pii/S0927025618304786},
author = {Jan Janssen and Sudarsan Surendralal and Yury Lysogorskiy and Mira Todorova and Tilmann Hickel and Ralf Drautz and Jörg Neugebauer},
keywords = {Modelling workflow, Integrated development environment, Complex simulation protocols},
}
```
@article{pyiron-paper,
title = {pyiron: An integrated development environment for computational materials science},
journal = {Computational Materials Science},
volume = {163},
pages = {24 - 36},
year = {2019},
issn = {0927-0256},
doi = {https://doi.org/10.1016/j.commatsci.2018.07.043},
url = {http://www.sciencedirect.com/science/article/pii/S0927025618304786},
author = {Jan Janssen and Sudarsan Surendralal and Yury Lysogorskiy and Mira Todorova and Tilmann Hickel and Ralf Drautz and Jörg Neugebauer},
keywords = {Modelling workflow, Integrated development environment, Complex simulation protocols},
}
```

0 comments on commit a212b1b

Please sign in to comment.